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

Extend public API and fix documentation #59

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

ericpre
Copy link
Member

@ericpre ericpre commented Jun 16, 2024

Add back some functions which were removed when splitting from hyperspy. Some modules and functions that were not to the public API as listed in the API reference have been removed.

Progress of the PR

  • Add some functionalities back to public API,
  • Rename private modules to start with underscore to reduce their visibility and make more clear that they are not part of the public API,
  • docstring updated: there were still a lot of leftover from hyperspy,
  • update user guide: there were still a lot of leftover from hyperspy,
  • [n/a] added tests,
  • add a changelog entry in the upcoming_changes folder (see upcoming_changes/README.rst),
  • Check formatting of the changelog entry (and eventual user guide changes) in the docs/readthedocs.org:exspy build of this PR (link in github checks)
  • ready for review.

@ericpre ericpre linked an issue Jun 16, 2024 that may be closed by this pull request
Copy link

codecov bot commented Jun 16, 2024

Codecov Report

Attention: Patch coverage is 77.01318% with 157 lines in your changes missing coverage. Please review.

Project coverage is 88.62%. Comparing base (3b7425e) to head (9e0d0be).

Files Patch % Lines
exspy/_misc/eels/tools.py 40.93% 95 Missing and 6 partials ⚠️
exspy/_misc/material.py 83.78% 11 Missing and 13 partials ⚠️
exspy/_misc/eds/utils.py 92.59% 7 Missing and 9 partials ⚠️
...py/_misc/eels/electron_inelastic_mean_free_path.py 59.25% 11 Missing ⚠️
exspy/material.py 80.00% 1 Missing ⚠️
exspy/misc/eds/utils.py 85.71% 1 Missing ⚠️
exspy/misc/eels/tools.py 85.71% 1 Missing ⚠️
exspy/utils/__init__.py 80.00% 1 Missing ⚠️
exspy/utils/eels.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
+ Coverage   88.55%   88.62%   +0.06%     
==========================================
  Files          67       76       +9     
  Lines        7341     7411      +70     
  Branches     1187     1192       +5     
==========================================
+ Hits         6501     6568      +67     
- Misses        571      574       +3     
  Partials      269      269              

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

@ericpre ericpre requested a review from jlaehne June 16, 2024 12:18
@ericpre ericpre added this to the v0.2 milestone Jun 16, 2024
@ericpre ericpre added bug-fix documentation Improvements or additions to documentation labels Jun 16, 2024
@ericpre ericpre modified the milestones: v0.2, v0.3 Aug 14, 2024
@CSSFrancis
Copy link
Member

@ericpre I can review this today!

Copy link
Member

@CSSFrancis CSSFrancis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good to me. And probably should have been done a little bit ago.

My one hesitation is that this will move all of the functions in the misc to a different place. Tecnically I think these were part of the public api even if they weren't documentated. It might be worthwhile to create a misc.py file which redirects to the _misc.py file and then raises a deprecation warning.

That's what we have been doing in pyxem just to catch people.

doc/user_guide/eds.rst Outdated Show resolved Hide resolved
@ericpre
Copy link
Member Author

ericpre commented Aug 16, 2024

Thank you @CSSFrancis for the review. I added a shim for the functionalities that have been added to the public API. Do you want to have another look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix documentation Improvements or additions to documentation needs review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot find element database and get_xray_lines_near_energy()
2 participants