From 069de58e6b3b6fd5afe302276bdca2d3f54ac5df Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 18:51:28 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/kynan/nbstripout: 0.8.2 → 0.9.0](https://github.com/kynan/nbstripout/compare/0.8.2...0.9.0) - [github.com/psf/black-pre-commit-mirror: 25.12.0 → 26.1.0](https://github.com/psf/black-pre-commit-mirror/compare/25.12.0...26.1.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 82d3d70..b57adf6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: https://github.com/kynan/nbstripout - rev: 0.8.2 + rev: 0.9.0 hooks: - id: nbstripout files: ".ipynb" @@ -14,7 +14,7 @@ repos: - id: check-merge-conflict # Check for files that contain merge conflict strings. - id: check-added-large-files # Prevent large files from being added to the repository. - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.12.0 + rev: 26.1.0 hooks: - id: black - repo: https://github.com/pycqa/isort From 61d3ef40088df33de25596487e5b7d8a504ddcbb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 18:51:41 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- rubix/core/data.py | 8 ++++---- rubix/logger.py | 6 ++---- tests/test_illustris_api.py | 6 +++--- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/rubix/core/data.py b/rubix/core/data.py index ebc55fe..3bdf41c 100644 --- a/rubix/core/data.py +++ b/rubix/core/data.py @@ -415,7 +415,7 @@ def prepare_input(config: Union[dict, str]) -> RubixData: >>> rubixdata.stars.coords """ - logger_config = config["logger"] if "logger" in config else None # type:ignore + logger_config = config["logger"] if "logger" in config else None # type: ignore logger = get_logger(logger_config) file_path = config["output_path"] file_path = os.path.join(file_path, "rubix_galaxy.h5") @@ -464,13 +464,13 @@ def prepare_input(config: Union[dict, str]) -> RubixData: if rubixdata.stars.coords is not None: indices = np.random.choice( np.arange(len(rubixdata.stars.coords)), - size=size, # type:ignore + size=size, # type: ignore replace=False, - ) # type:ignore + ) # type: ignore elif rubixdata.gas.coords is not None: indices = np.random.choice( np.arange(len(rubixdata.gas.coords)), - size=size, # type:ignore + size=size, # type: ignore replace=False, ) else: diff --git a/rubix/logger.py b/rubix/logger.py index 6cb5d54..fefb64f 100644 --- a/rubix/logger.py +++ b/rubix/logger.py @@ -45,15 +45,13 @@ def get_logger(config=None): if first_time: - logger.info( - r""" + logger.info(r""" ___ __ _____ _____ __ / _ \/ / / / _ )/ _/ |/_/ / , _/ /_/ / _ |/ /_> < /_/|_|\____/____/___/_/|_| -""" - ) +""") logger.info(f"Rubix version: {version.__version__}") logger.info(f"JAX version: {jax.__version__}") logger.info(f"Running on {jax.devices()} devices") diff --git a/tests/test_illustris_api.py b/tests/test_illustris_api.py index e4b544a..cea4756 100644 --- a/tests/test_illustris_api.py +++ b/tests/test_illustris_api.py @@ -385,11 +385,11 @@ def test_append_subhalo_data(api_instance, tmp_path): dataset = f["SubhaloData"][key] # type: ignore if isinstance(value, np.ndarray): np.testing.assert_array_equal( - dataset[:], value # type:ignore - ), f"Data '{key}' does not match the expected value." # type:ignore + dataset[:], value # type: ignore + ), f"Data '{key}' does not match the expected value." # type: ignore else: assert ( - dataset[()] == value # type:ignore + dataset[()] == value # type: ignore ), f"Data '{key}' does not match the expected value."