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

Add support for pep 660 editable installs in extension #3252

Merged
merged 2 commits into from Nov 3, 2023

Conversation

ericpre
Copy link
Member

@ericpre ericpre commented Oct 31, 2023

To allow using pyproject.toml based builds in extension and simplify packaging of the split extension.
Relevant documentation:

Progress of the PR

  • Add support for pep660 on editable installs for pyproject.toml based builds of extension,
  • [n/a] update docstring (if appropriate),
  • [n/a] update user guide (if appropriate),
  • add an changelog entry in the upcoming_changes folder (see upcoming_changes/README.rst),
  • Check formatting changelog entry in the readthedocs doc build of this PR (link in github checks)
  • [n/a] add tests,
  • ready for review.

@ericpre ericpre added this to the v2.0 Split milestone Oct 31, 2023
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9ecef39) 80.84% compared to head (9eb4983) 80.78%.

Additional details and impacted files
@@                  Coverage Diff                   @@
##           RELEASE_next_major    #3252      +/-   ##
======================================================
- Coverage               80.84%   80.78%   -0.06%     
======================================================
  Files                     140      140              
  Lines                   20361    20364       +3     
  Branches                 4821     4820       -1     
======================================================
- Hits                    16460    16451       -9     
- Misses                   2827     2840      +13     
+ Partials                 1074     1073       -1     
Files Coverage Δ
hyperspy/extensions.py 75.00% <100.00%> (+2.27%) ⬆️

... and 2 files with indirect coverage changes

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

@CSSFrancis
Copy link
Member

@ericpre So if I understand this correctly this should better handle installing hyperspy and extension packages in the development mode using pip?

@ericpre
Copy link
Member Author

ericpre commented Nov 1, 2023

Yes, but only for extensions using pyproject.toml to define the package metadata. See for example: the packaging in hyperspy/exspy#10 will not work without this PR. This PR allows more flexibility in the packaging of extensions. This is only necessary for editable installation (pip -e), so it will not affect users but it still needs to work for developers too! 😅

@ericpre
Copy link
Member Author

ericpre commented Nov 1, 2023

Considering the scope of this changes, I don't think that this is worth testing on CI, because it is something that will very rarely.
However, the behaviour needs to be tested manually now on various platform, I have tested on windows and linux but it would be good if someone else test it too. It simply need to install this branch of exspy and checked if the signal registration mechanism works, etc. by running the test suite, for example.

@ericpre
Copy link
Member Author

ericpre commented Nov 2, 2023

@CSSFrancis, did you have to check it?

@CSSFrancis
Copy link
Member

@CSSFrancis, did you have to check it?

Sorry, I've been out of the office the last couple of days. I'll check it tonight! I have an M1 Mac that I can try

@CSSFrancis
Copy link
Member

@ericpre This appears to work on an M1 Mac as well.

@ericpre
Copy link
Member Author

ericpre commented Nov 3, 2023

Thanks @CSSFrancis!

@ericpre ericpre merged commit 3842ca3 into hyperspy:RELEASE_next_major Nov 3, 2023
21 of 23 checks passed
@ericpre ericpre deleted the support_for_pepe660 branch November 8, 2023 18:45
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

2 participants