Skip to content

Commit

Permalink
Update ruff formating
Browse files Browse the repository at this point in the history
  • Loading branch information
MetinSa committed Apr 13, 2024
1 parent f583e9c commit 5321cf4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.4
rev: v0.3.7
hooks:
- id: ruff
- id: ruff-format
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ See [CITATION](https://github.com/Cosmoglobe/zodipy/blob/dev/CITATION.bib) if yo


# For developers
Contributing developers will need to download the following additional dependencies to test, lint and build documentation locally:
Contributing developers will need to download the following additional dependencies to test, lint, format and build documentation locally:
- pytest
- pytest-cov
- hypothesis
Expand Down Expand Up @@ -96,11 +96,11 @@ from the repositry root. This will read and download all the dependencies from t

Note that developers using Python 3.12 will need to upgrade their pip versions with `python3 -m pip install --upgrade pip` before being able to install ZodiPy. This is due to known incompatibilities between older pip versions and Python 3.12

## Tests and formatting
## Tests, linting and formatting
The following tools should be run from the root of the repository with no errors. (These are ran automatically as part of the CI workflows on GitHub, but should be tested locally first)

- [pytest](https://docs.pytest.org/en/8.0.x/): Tests are run with pytest by simply running `pytest` in the command line in the root of the repository.
- [ruff](https://github.com/astral-sh/ruff): Formating and linting is done with `ruff` by simply running `ruff check zodipy/` in the command line in the root of the repository.
- [ruff](https://github.com/astral-sh/ruff): Formating and linting is done with `ruff` by simply running `ruff check zodipy/` and `ruff format zodipy/` in the command line in the root of the repository.
- [mypy](https://mypy-lang.org/): Type checking is done with `mypy` by simply running `mypy zodipy/` in the root of the repository.

Remeber to add tests when implementing new features to maintain a high code coverage.
Expand Down
3 changes: 1 addition & 2 deletions zodipy/_ipd_dens_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,7 @@ def compute_feature_density_rmm(


class ComponentDensityFn(Protocol):
def __call__(self, X_helio: npt.NDArray[np.float64]) -> npt.NDArray[np.float64]:
...
def __call__(self, X_helio: npt.NDArray[np.float64]) -> npt.NDArray[np.float64]: ...


def construct_density_partials(
Expand Down

0 comments on commit 5321cf4

Please sign in to comment.