Skip to content

Commit

Permalink
update precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
zigaLuksic committed Sep 27, 2024
1 parent aa01920 commit b357778
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ repos:
types_or: [json]

- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
language_version: python3

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.4.9"
rev: "v0.6.8"
hooks:
- id: ruff

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.5
rev: 1.8.7
hooks:
- id: nbqa-black
- id: nbqa-ruff
2 changes: 1 addition & 1 deletion eogrow/utils/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def compare_content(
stats_path: str,
*,
config: StatCalcConfig | None = None,
save_new_stats: bool = True,
save_new_stats: bool = False,
) -> None:
"""Compares the results from a pipeline run with the saved statistics. Constructed to be coupled with `run_config`
hence the `Optional` input.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ lint.ignore = [
"PT011", # complains for `pytest.raises(ValueError)` but we use it a lot
]
lint.per-file-ignores = { "__init__.py" = ["F401"] }
exclude = [".git", "__pycache__", "build", "dist"]
exclude = [".git", "__pycache__", "build", "dist", "*.ipynb"]


[tool.ruff.lint.isort]
Expand Down
2 changes: 1 addition & 1 deletion tests/core/area/test_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_no_batch_id_error(storage, area_config):
manager.get_grid()


@pytest.mark.integration()
@pytest.mark.integration
@pytest.mark.usefixtures("configured_requests_mock")
def test_grid(storage, area_config):
manager = BatchAreaManager.from_raw_config(area_config, storage)
Expand Down
2 changes: 1 addition & 1 deletion tests/pipelines/test_byoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _get_tile_cover_geometry_mock(_: str) -> Geometry:
return pipeline, relevant_requests


@pytest.mark.chain()
@pytest.mark.chain
@pytest.mark.parametrize(("preparation_config", "config"), [("prepare_lulc_data", "ingest_lulc")])
@pytest.mark.order(after=["test_rasterize.py::test_rasterize_feature_with_resolution"])
def test_timeless_byoc(config_and_stats_paths, preparation_config, config, configured_requests_mock):
Expand Down
2 changes: 1 addition & 1 deletion tests/pipelines/test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
pytestmark = pytest.mark.integration


@pytest.mark.chain()
@pytest.mark.chain
@pytest.mark.order(before=["test_download_pipeline"])
@pytest.mark.usefixtures("storage")
def test_preparation():
Expand Down
2 changes: 1 addition & 1 deletion tests/pipelines/test_import_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
pytestmark = pytest.mark.integration


@pytest.mark.chain()
@pytest.mark.chain
@pytest.mark.parametrize("experiment_name", ["import_vector", "import_vector_temporal"])
def test_import_vector_pipeline(config_and_stats_paths, experiment_name):
config_path, stats_path = config_and_stats_paths("import_vector", experiment_name)
Expand Down
2 changes: 1 addition & 1 deletion tests/pipelines/test_merge_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
pytestmark = pytest.mark.integration


@pytest.mark.chain()
@pytest.mark.chain
@pytest.mark.order(after="test_features.py::test_features_pipeline")
def test_merge_samples_pipeline(config_and_stats_paths):
config_path, stats_path = config_and_stats_paths("merge_samples", "merge_features_samples")
Expand Down
4 changes: 2 additions & 2 deletions tests/pipelines/test_rasterize.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_rasterize_file(config_and_stats_paths, experiment_name):
compare_content(output_path, stats_path)


@pytest.mark.chain()
@pytest.mark.chain
@pytest.mark.order(before="test_rasterize_feature_with_resolution")
@pytest.mark.parametrize(("preparation_config", "config"), [("load_crops_vector_data", "rasterize_feature_with_shape")])
def test_rasterize_feature_with_shape(config_and_stats_paths, preparation_config, config):
Expand All @@ -24,7 +24,7 @@ def test_rasterize_feature_with_shape(config_and_stats_paths, preparation_config
compare_content(output_path, stats_path)


@pytest.mark.chain()
@pytest.mark.chain
@pytest.mark.parametrize(
("preparation_config", "config"), [("load_lulc_vector_data", "rasterize_feature_with_resolution")]
)
Expand Down
2 changes: 1 addition & 1 deletion tests/pipelines/test_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
pytestmark = pytest.mark.integration


@pytest.mark.chain()
@pytest.mark.chain
@pytest.mark.parametrize("experiment_name", ["testing", "timestamps_only"])
def test_data_generating_pipeline(config_and_stats_paths, experiment_name):
config_path, stats_path = config_and_stats_paths("testing", experiment_name)
Expand Down
2 changes: 1 addition & 1 deletion tests/tasks/test_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
)


@pytest.fixture()
@pytest.fixture
def dummy_eopatch() -> EOPatch:
return EOPatch(bbox=BBox((0, 0, 1, 1), CRS.POP_WEB))

Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_pipeline_chain_validation(config_folder):
assert subprocess.call(f"eogrow-validate {config_folder}/chain_pipeline.json", shell=True) == 0


@pytest.mark.integration()
@pytest.mark.integration
@pytest.mark.order(after="tests/pipelines/test_zipmap.py::test_zipmap_pipeline")
def test_pipeline_chain_execution(config_folder):
"""Tests a simple execution from command line"""
Expand Down

0 comments on commit b357778

Please sign in to comment.