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

Move some general utils here #51

Closed
wants to merge 3 commits into from
Closed

Move some general utils here #51

wants to merge 3 commits into from

Conversation

teutoburg
Copy link
Collaborator

@teutoburg teutoburg commented Feb 13, 2025

Three utils functions from ScopeSim that are general enough to be kept here, and also only depend on standard library stuff.

I didn't find any unit tests for those in ScopeSim, so I added some here. Also added some better docstrings.

Also added custom warning base classes inspired by astropy, to be used throughout our ecosystem in the future.

@teutoburg teutoburg self-assigned this Feb 13, 2025
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.36%. Comparing base (0b3537d) to head (644d5fe).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
+ Coverage   99.31%   99.36%   +0.05%     
==========================================
  Files           6        8       +2     
  Lines         435      472      +37     
==========================================
+ Hits          432      469      +37     
  Misses          3        3              

☔ View full report in Codecov by Sentry.
📢 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.

@teutoburg teutoburg marked this pull request as ready for review February 13, 2025 16:08
@teutoburg
Copy link
Collaborator Author

This is a bad idea. check_keys() will become obsolete when we use dataclasses, stringify_dict() is smelly anyway, and close_loop() alone isn't worth moving here unless we actually need it in another package (which might still happen at some point). I might add the tests and docstrings I added here to the current location of those functions and also reuse the custom warnings in a separate PR, as those might actually be useful elsewhere.

@teutoburg teutoburg closed this Mar 13, 2025
@teutoburg teutoburg deleted the fh/general-utils branch March 13, 2025 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

1 participant