Skip to content

Small fix to inifile/arg parsing in cosmic-pop for METISSE#797

Merged
katiebreivik merged 1 commit into
COSMIC-PopSynth:developfrom
d-maclean:cosmic-pop-m2_min-fix
Jun 5, 2026
Merged

Small fix to inifile/arg parsing in cosmic-pop for METISSE#797
katiebreivik merged 1 commit into
COSMIC-PopSynth:developfrom
d-maclean:cosmic-pop-m2_min-fix

Conversation

@d-maclean

Copy link
Copy Markdown
Contributor

Hello,

Currently, cosmic-pop will throw a TypeError under the following specific circumstances:

  • the stellar_engine is metisse
  • the inifile value for m2_min is commented out (default) or None (default value when uncommented)

This exception is related to how m2_min and m1_min are parsed to set the truncation limits for the IMF. For users who use qmin instead this can cause a bit of a headache. I changed the indentation levels here to avoid these checks if m2_min is not passed or is set to None.

The behavior where an exception is thrown if you pass both qmin and m2_min is preserved.

@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.14%. Comparing base (8772c07) to head (ced4b32).
⚠️ Report is 170 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #797       +/-   ##
============================================
- Coverage    86.91%   76.14%   -10.77%     
============================================
  Files           40       58       +18     
  Lines        25542    28169     +2627     
  Branches         0      985      +985     
============================================
- Hits         22198    21448      -750     
- Misses        3344     6416     +3072     
- Partials         0      305      +305     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@katiebreivik katiebreivik merged commit 4c111f7 into COSMIC-PopSynth:develop Jun 5, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants