Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

repos:
- repo: https://github.com/kynan/nbstripout
rev: 0.8.2
rev: 0.9.0
hooks:
- id: nbstripout
files: ".ipynb"
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions rubix/core/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 2 additions & 4 deletions rubix/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions tests/test_illustris_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."


Expand Down