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

Test updates #28

Merged
merged 4 commits into from
May 6, 2024
Merged

Test updates #28

merged 4 commits into from
May 6, 2024

Conversation

telegraphic
Copy link
Owner

Addresses #27 and adds some basic unit tests for missing files

Copy link

what-the-diff bot commented May 6, 2024

PR Summary

  • Introduction of .gitignore file
    A new .gitignore file has been set up to house multiple files and directory patterns that should be disregarded in the repository. This ensures a cleaner and more efficient workspace by excluding unnecessary items.

  • Improvements to pygdsm/base_skymodel.py

  • The os module has been implemented to provide a way of using operating system dependent functionality.
  • The file existence check in the BaseSkyModel class has been made more robust. If a file is not found, the system will raise an error, thus avoiding crashes and unforeseen effects.
  • Certain unnecessary white spaces have been eliminated from the view and get_sky_temperature methods leading to a cleaner code.
  • Addition of test_base_skymodel.py
    A new file designated tests/test_base_skymodel.py has been generated exclusively for testing the BaseSkyModel class. This will enable more thorough evaluation of the BaseSkyModel class's functionality.

  • Enhancements to tests/test_gsm.py

  • Implementation of pytest and SkyCoord, providing testing tools and coordinate representations respectively.
  • A variety of new tests have been created:
    • test_compare_to_gsm measures the coherence between the Python and Fortran versions of the GSM to ensure consistent output.
    • test_get_sky_temperature provides a critical review of get_sky_temperature method from the GlobalSkyModel class.
    • test_stupid_values verifies the software's response to invalid input values ensuring the system handles such scenarios gracefully.
    • test_set_interpolation_method checks the functionality of the set_interpolation_method of GlobalSkyModel class to assure it’s working as expected.

Copy link

codecov bot commented May 6, 2024

Codecov Report

Attention: Patch coverage is 76.92308% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 94.90%. Comparing base (f830df7) to head (3556c58).

Files Patch % Lines
pygdsm/base_skymodel.py 76.92% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
+ Coverage   91.59%   94.90%   +3.30%     
==========================================
  Files           9        9              
  Lines         488      491       +3     
==========================================
+ Hits          447      466      +19     
+ Misses         41       25      -16     

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

@telegraphic telegraphic merged commit e6837a2 into master May 6, 2024
2 of 3 checks passed
@telegraphic telegraphic deleted the dcp_test_updates branch May 6, 2024 06:24
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.

None yet

1 participant