Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
}}
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v5
Expand Down
9 changes: 9 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Changelog
=========

Upcoming
--------

The minimum Python version is 3.10.

Fixes
~~~~~
- HOD: fix reseed in NumPy 2 by updating ``parallel_numpy_rng`` dependency

2.1.2 (2025-10-13)
------------------

Expand Down
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ dependencies = [
'h5py',
'pyyaml',
'msgpack>=1',
'parallel_numpy_rng>=0.1.2',
'parallel_numpy_rng>=0.2.0',
'asdf-astropy>=0.3',
]
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.10"
urls = {Repository = "https://github.com/abacusorg/abacusutils"}
classifiers = [
"Programming Language :: Python :: 3",
Expand Down Expand Up @@ -66,6 +66,11 @@ test = [
'pytest',
]

[dependency-groups]
dev = [
"abacusutils[test]",
]

[tool.setuptools]
include-package-data = true

Expand Down
2 changes: 1 addition & 1 deletion scripts/hod/run_hod.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

def main(path2config):
# load the yaml parameters
config = yaml.load(open(path2config))
config = yaml.safe_load(open(path2config))
sim_params = config['sim_params']
HOD_params = config['HOD_params']
clustering_params = config['clustering_params']
Expand Down
15 changes: 12 additions & 3 deletions tests/test_hod.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_hod(tmp_path, reference_mode=False):
# create a new abacushod object
newBall = AbacusHOD(sim_params, HOD_params, clustering_params)
mock_dict = newBall.run_hod(
newBall.tracers, want_rsd, write_to_disk=True, Nthread=2
newBall.tracers, want_rsd, write_to_disk=True, Nthread=4
)

# test mode
Expand Down Expand Up @@ -107,7 +107,7 @@ def test_hod(tmp_path, reference_mode=False):

# throw away run for jit to compile, write to disk
mock_dict = newBall.run_hod(
newBall.tracers, want_rsd, write_to_disk=True, Nthread=2
newBall.tracers, want_rsd, write_to_disk=True, Nthread=4
)
savedir_gal = (
config['sim_params']['output_dir']
Expand All @@ -133,6 +133,15 @@ def test_hod(tmp_path, reference_mode=False):
data1 = ascii.read(savedir_gal)
assert_close(data, data1)

# smoke test for reseed
mock_dict = newBall.run_hod(
newBall.tracers,
want_rsd,
write_to_disk=True,
Nthread=4,
reseed=0xABCDEF,
)

# smoke test for zcv
config['sim_params']['sim_name'] = (
'AbacusSummit_base_c000_ph006' # so that meta can find it
Expand All @@ -145,7 +154,7 @@ def test_hod(tmp_path, reference_mode=False):
newBall.tracers,
want_rsd=config['HOD_params']['want_rsd'],
write_to_disk=False,
Nthread=2,
Nthread=4,
)
del mock_dict['ELG'] # drop ELG since zcv works with a single tracer currently
# zcv_dict =
Expand Down