Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing config parser for bright limit #1024

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

astronomerritt
Copy link
Collaborator

Fixes #1022.

Desired behaviour:

  • if the bright limit keyword is not in the config file (e.g. if you are using Rubin_known_object_prediction.ini) the bright limit cut should be skipped

Actual behaviour:

  • code broke completely because I forgot to wrap some stuff in an if-statement in PPConfigParser

Fix:

  • put the if-statement in

Review Checklist for Source Code Changes

  • Does pip install still work?
  • Have you written a unit test for any new functions?
  • Do all the units tests run successfully?
  • Does Sorcha run successfully on a test set of input files/databases?
  • Have you used black on the files you have updated to confirm python programming style guide enforcement?

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 41.66667% with 7 lines in your changes missing coverage. Please review.

Project coverage is 81.04%. Comparing base (c2b800c) to head (8ab8dbf).
Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
src/sorcha/modules/PPConfigParser.py 41.66% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1024      +/-   ##
==========================================
+ Coverage   80.90%   81.04%   +0.13%     
==========================================
  Files          70       70              
  Lines        3148     3149       +1     
==========================================
+ Hits         2547     2552       +5     
+ Misses        601      597       -4     

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

@astronomerritt
Copy link
Collaborator Author

Please ignore CodeCov, PPConfigParser is impossible to unit test properly in its current form. (One day I'll fix it. ONE DAY.)

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.

The known_objects config file breaks PPConfigParser
2 participants