Skip to content

Commit

Permalink
fix(tensorstore): Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
devsjc committed Nov 4, 2024
1 parent 1b17f0f commit d836b23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/nwp_consumer/internal/entities/tensorstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def initialize_empty_store(
store_range = f"{coords.init_time[0]:%Y%m%d%H}-{coords.init_time[-1]:%Y%m%d%H}"

store_path = pathlib.Path(
os.getenv("ZARRDIR", f"~/.local/cache/nwp/{repository}/{model}/data")
os.getenv("ZARRDIR", f"~/.local/cache/nwp/{repository}/{model}/data"),
) / f"{store_range}.zarr"

# * Define a set of chunks allowing for intermediate parallel writes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TestECMWFRealTimeS3ModelRepository(unittest.TestCase):
@unittest.skipIf(
condition="CI" in os.environ,
reason="Skipping integration test that requires S3 access.",
) # TODO: Move into integration tests, or remove
) # TODO: Move into integration tests, or remove
def test__download_and_convert(self) -> None:
"""Test the _download_and_convert method."""

Expand All @@ -47,7 +47,7 @@ def test__download_and_convert(self) -> None:
]

for url in urls:
with (self.subTest(url=url)):
with self.subTest(url=url):
result = c._download_and_convert(url)

self.assertTrue(is_successful(result), msg=f"Error: {result}")
Expand Down Expand Up @@ -105,5 +105,6 @@ class TestCase:
result = NOAAGFSS3ModelRepository._wanted_file(
filename=t.filename,
it=test_it,
max_step=max(NOAAGFSS3ModelRepository.model().expected_coordinates.step))
max_step=max(NOAAGFSS3ModelRepository.model().expected_coordinates.step),
)
self.assertEqual(result, t.expected)

0 comments on commit d836b23

Please sign in to comment.