Skip to content

Switch to pyproject.toml #1300

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

Merged
merged 3 commits into from
Apr 4, 2025
Merged

Switch to pyproject.toml #1300

merged 3 commits into from
Apr 4, 2025

Conversation

ianhi
Copy link
Contributor

@ianhi ianhi commented Apr 1, 2025

When I tried to install in editable mode (force of habit) I ran into this deprecation warning:

DEPRECATION: Legacy editable install of sgkit==0.9.1.dev54+geef911e8.d20250401 from file:///Users/ian/Documents/dev/sgkit (setup.py develop) is deprecated.
 pip 25.1 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. 
If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. 
Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457

I used ini2toml to do the initial conversion from setup.cfg to pyproject.toml then manually configured flake8 in .flake8 as flake8 does not support pyproject toml. Finally I added a line to the contributing docs about editable installs.

  • [NA] Fixes #xxxx
  • [NA] Tests added
  • [NA] User visible changes (including notable bug fixes) are documented in changelog.rst
  • [NA] New functions are listed in api.rst

Copy link
Collaborator

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

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

LGTM!

@jeromekelleher jeromekelleher requested a review from tomwhite April 2, 2025 08:07
Copy link
Contributor

mergify bot commented Apr 2, 2025

This PR has conflicts, @ianhi please rebase and push updated version 🙏

@mergify mergify bot added the conflict PR conflict label Apr 2, 2025
@tomwhite
Copy link
Collaborator

tomwhite commented Apr 2, 2025

This looks great - thanks for the contribution @ianhi!

The build was failing due to changes not related to this PR, which I have now fixed in #1297. Can you rebase this PR and change the pins to the following in pyproject.toml:

  • numpy < 2.2
  • xarray < 2025.03.1
  • cbgen > 1.0.5

Also, it looks like Black is complaining (perhaps the settings have changed slightly?), see https://github.com/sgkit-dev/sgkit/actions/runs/14207381471/job/39820084873?pr=1300, so can you run pre-commit run --all-files please.

Thanks!

@mergify mergify bot removed the conflict PR conflict label Apr 3, 2025
ianhi added 3 commits April 3, 2025 11:23
Previously pip was generating a warning when trying to do an editable
install
@ianhi
Copy link
Contributor Author

ianhi commented Apr 3, 2025

Somewhat relatedly do you know the person who maintains the cbgen package? I had to install that from source when trying to follow the sgkit tutorial because it doesn't have any builds for macos 15: limix/cbgen#18

@tomwhite tomwhite merged commit 0aeb7c6 into sgkit-dev:main Apr 4, 2025
10 checks passed
@tomwhite
Copy link
Collaborator

tomwhite commented Apr 4, 2025

Somewhat relatedly do you know the person who maintains the cbgen package? I had to install that from source when trying to follow the sgkit tutorial because it doesn't have any builds for macos 15: limix/cbgen#18

Yes, it's @horta.

@tomwhite tomwhite mentioned this pull request Apr 4, 2025
@ianhi ianhi deleted the pyproject branch April 4, 2025 14:13
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.

3 participants