Skip to content

[v2.3] Binary population test suite and reorganizing dev-tools#817

Open
sgossage wants to merge 62 commits intov2.3from
sg_v2.3_binpop_test_suite
Open

[v2.3] Binary population test suite and reorganizing dev-tools#817
sgossage wants to merge 62 commits intov2.3from
sg_v2.3_binpop_test_suite

Conversation

@sgossage
Copy link
Copy Markdown
Contributor

@sgossage sgossage commented Mar 8, 2026

This is a cherry picked version of PR#779 for v2.3.

If you go into dev-tools you can run

./run_test_suite.sh <branch-name>

to run the full test suite. This will run the binary tests and then the population tests right after. Output is saved to logs/<branch-name>/evolve_populations.log. Populations that are run as a result of the test suite show up in output/population_tests/<branch-name>/.

This adds a population synthesis test suite and performs 4 tests currently:

  • BinaryPopulation saving binaries to RAM.
  • BinaryPopulation saving to hdf5, plus check saved/loaded DataFrame is equivalent to binaries in RAM.
  • BinaryPopulation saving in multiple batch hdf5 files (i.e., w/ optimize_ram = True).
  • PopulationRunner with multiple metallicities1. TODO: add a flag to turn on/OFF
  • Test full pop synth pipeline via CLI. Right now, there's a small test for this that uses 3 metallicities, run locally. Running our full eight can cause OOM errors.

This also reorganizes dev-tools as follows:

dev-tools/
├── run_test_suite.sh
├── validate_binaries.sh
├── generate_baseline.sh
└── script_data/
    ├── inlists/
    ├── workdirs/
    ├── baselines/
    ├── logs/
    ├── output/
    │   ├── binary_star_tests/
    │   └── population_tests/
    └── src/
        ├── binaries_suite.py
        ├── binary_test_cases.py
        ├── compare_runs.py
        ├── formatting.py
        ├── popsynth_suite.py
        └── utils.py

where the .ini files are generated on-the-fly in inlists/ and test output is saved to the various output/ subdirectories.

Footnotes

  1. ⚠️ The PopulationRunner test is implemented but it can break without appropriate system resources. (The RAM fix helps here: PR#818, so this branch and v2.3 should be safe to use it).

@sgossage sgossage self-assigned this Mar 8, 2026
@sgossage sgossage added the enhancement New feature or request label Mar 8, 2026
@sgossage sgossage requested a review from a team March 10, 2026 02:01
sgossage and others added 30 commits March 12, 2026 13:43
…lt; this is code that would otherwise be repeated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants