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

Replace setup with pyproject.toml #2763

Merged
merged 2 commits into from
Apr 10, 2024
Merged

Conversation

mraspaud
Copy link
Member

This PR removes setup.[py,cfg] and fills up pyproject.toml instead.

@mraspaud mraspaud added the enhancement code enhancements, features, improvements label Mar 19, 2024
@mraspaud mraspaud self-assigned this Mar 19, 2024
@mraspaud mraspaud requested a review from djhoese as a code owner March 19, 2024 22:20
Copy link

codecov bot commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.89%. Comparing base (5ffe15e) to head (8a54645).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2763      +/-   ##
==========================================
- Coverage   95.92%   95.89%   -0.03%     
==========================================
  Files         377      377              
  Lines       53489    53488       -1     
==========================================
- Hits        51310    51293      -17     
- Misses       2179     2195      +16     
Flag Coverage Δ
behaviourtests 4.09% <ø> (-0.01%) ⬇️
unittests 95.99% <ø> (-0.04%) ⬇️

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.

@coveralls
Copy link

coveralls commented Mar 19, 2024

Pull Request Test Coverage Report for Build 8357659803

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-96.0%) to 0.0%

Totals Coverage Status
Change from base Build 8350021041: -96.0%
Covered Lines: 0
Relevant Lines: 0

💛 - Coveralls

@djhoese
Copy link
Member

djhoese commented Mar 20, 2024

It should also be noted this switches the build system to use hatchling instead of setuptools. If you haven't already, please review other uses throughout the repository of setuptools-scm. For example it is needed to install unstable dependencies here:

python -m pip install versioneer extension-helpers setuptools-scm configobj pkgconfig

But this isn't for satpy, but likely other pytroll packages that we depend on that use setuptools-scm during the build process.

@mraspaud does hatch-vcs default to the same versioning for dev/dirty environments? Not that it matters much, just curious.

@djhoese
Copy link
Member

djhoese commented Mar 20, 2024

Oh and is hatch defaulting to finding the v* prefixed tags?

@mraspaud
Copy link
Member Author

Oh and is hatch defaulting to finding the v* prefixed tags?

Yes it does if my regex isn't too rusty https://github.com/pypa/setuptools_scm/blob/v6.4.0/src/setuptools_scm/config.py#L13

@djhoese
Copy link
Member

djhoese commented Mar 20, 2024

That's a setuptools scm file, not hatch, right?

@mraspaud
Copy link
Member Author

That's a setuptools scm file, not hatch, right?

Yes, it is, but setuptools-scm is a dependency of hatch-vcs :)

@mraspaud
Copy link
Member Author

mraspaud commented Mar 20, 2024

It should also be noted this switches the build system to use hatchling instead of setuptools. If you haven't already, please review other uses throughout the repository of setuptools-scm. For example it is needed to install unstable dependencies here:

python -m pip install versioneer extension-helpers setuptools-scm configobj pkgconfig

But this isn't for satpy, but likely other pytroll packages that we depend on that use setuptools-scm during the build process.

Yes, just for the unstable build, this seemed correct to me.

There is another mention of setuptools_scm in the rtd_environment.yml file, but as far as I can see that yaml file isn't used anywhere, so my assumption was that we are good.

@mraspaud does hatch-vcs default to the same versioning for dev/dirty environments? Not that it matters much, just curious.

the version number looks very similar for dev situations indeed, except that the date is also appended. See the screen capture here.

Screenshot from 2024-03-20 11-07-52

@djhoese
Copy link
Member

djhoese commented Mar 20, 2024

That RTD environment file is used by RTD and is configured here:

environment: doc/rtd_environment.yml

@mraspaud
Copy link
Member Author

That RTD environment file is used by RTD and is configured here:

environment: doc/rtd_environment.yml

indeed! The rtd build seems to be working, so I suspect there is not need to add anything.

@mraspaud
Copy link
Member Author

mraspaud commented Apr 9, 2024

@djhoese ok merging this?

@djhoese
Copy link
Member

djhoese commented Apr 9, 2024

Yes I think so. Go for it.

@mraspaud mraspaud merged commit 2e5136c into pytroll:main Apr 10, 2024
17 of 19 checks passed
@mraspaud mraspaud deleted the feature-pyproject branch April 10, 2024 06:32
Comment on lines -22 to -25
[coverage:run]
relative_files = True
omit =
satpy/version.py
Copy link
Member

Choose a reason for hiding this comment

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

Darn it @mraspaud. This is why coveralls is broken. The coverage config never got transferred to pyproject.toml. Fixing now...

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants