Skip to content

Change pkg_resources to importlib.resources#75

Merged
HarrisonKramer merged 2 commits intoHarrisonKramer:masterfrom
SeckinBerkay:pkg_deprecation
Feb 18, 2025
Merged

Change pkg_resources to importlib.resources#75
HarrisonKramer merged 2 commits intoHarrisonKramer:masterfrom
SeckinBerkay:pkg_deprecation

Conversation

@SeckinBerkay
Copy link
Collaborator

The library named pkg_resources kept giving warnings on the tests. It will be deprecated as stated in https://setuptools.pypa.io/en/latest/pkg_resources.html .

This PR includes switching from pkg_resources to importlib.resources, as suggested in the formerly given link.

@HarrisonKramer
Copy link
Owner

I only see changes to the spot diagram code. Is it possible you referenced the wrong branch?

@SeckinBerkay
Copy link
Collaborator Author

I only see changes to the spot diagram code. Is it possible you referenced the wrong branch?

Yes, sorry for the inconvenience. Updated it now.

@codecov
Copy link

codecov bot commented Feb 18, 2025

Codecov Report

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

Files with missing lines Patch % Lines
optiland/analysis/spot_diagram.py 53.33% 7 Missing ⚠️

❌ Your patch status has failed because the patch coverage (65.00%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
- Coverage   96.82%   96.59%   -0.23%     
==========================================
  Files         105      105              
  Lines        6322     6337      +15     
==========================================
  Hits         6121     6121              
- Misses        201      216      +15     
Files with missing lines Coverage Δ
optiland/materials/abbe.py 96.77% <100.00%> (ø)
optiland/materials/material.py 97.64% <100.00%> (ø)
optiland/analysis/spot_diagram.py 87.89% <53.33%> (-7.69%) ⬇️

... and 1 file with indirect coverage changes

@HarrisonKramer
Copy link
Owner

No inconvenience at all. Thanks for making this change!

@HarrisonKramer
Copy link
Owner

Looks good! Merging now.

@HarrisonKramer HarrisonKramer merged commit 02d57db into HarrisonKramer:master Feb 18, 2025
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