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

Switching to pyproject.toml for specifying package metadata #173

Merged
merged 5 commits into from
Sep 27, 2024

Conversation

matt-graham
Copy link
Collaborator

Switches from current setup.py approach of specifying package metadata to instead use a pyproject.toml configuration file and sets up setuptools_scm to automatically set package version number from Git release tags.

I think I've directly translated all the arguments passed to setup function in previous setup.py to equivalent pyproject.toml properties, so this should retain same metadata when publishing to PyPI, other than there was previously a slight typo in one argument (pacakge_data instead of package_data) which is now fixed. I've also added the additional requirements files as optional dependencies which can be installed with pip using the extras syntax, for example pip install s2fft[tests]. I also integrated the previous content in pytest.ini in to the pyproject.toml file.

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.42%. Comparing base (2c3d9e5) to head (6bec4a5).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #173      +/-   ##
==========================================
+ Coverage   93.10%   93.42%   +0.32%     
==========================================
  Files          29       28       -1     
  Lines        3146     3135      -11     
==========================================
  Hits         2929     2929              
+ Misses        217      206      -11     
Flag Coverage Δ
93.42% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@matt-graham
Copy link
Collaborator Author

This PR is a dependency for #204 and we would ideally also merge before resolving #205 as then we can integrate the formatter configuration directly in to the pyproject.toml file, so tagging you for a review @CosmoMatt!

I've merged in latest changes from main (there was a conflict due to update of version specifier setup.py on main but we should be able to safely ignore this as version will be automatically derived from latest Git release tag when this goes in) and also removed the generated s2fft/_version.py file that was added in 95ea4f5 as this file shouldn't be version controlled (it will be generated on the fly at package installation by setuptools_scm based on current latest Git tag).

@CosmoMatt
Copy link
Collaborator

@matt-graham I had some issues here relating to healpy dropping support for older MacOS versions. I also ran into a version control issue relating to SciPy and healpy, a solution to which was just pinning the SciPy version. This should be fine for now, we'll just need to keep an eye on that in future.

Copy link
Collaborator

@CosmoMatt CosmoMatt left a comment

Choose a reason for hiding this comment

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

Looks good to me! Only change was pinning the SciPy version to avoid version conflicts.

@CosmoMatt CosmoMatt merged commit 5df8106 into main Sep 27, 2024
2 of 3 checks passed
@CosmoMatt CosmoMatt deleted the mmg/switch-to-pyproject-toml branch September 27, 2024 10:02
@matt-graham matt-graham mentioned this pull request Oct 1, 2024
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