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

Pyproject toml #100

Merged
merged 5 commits into from
May 17, 2024
Merged

Pyproject toml #100

merged 5 commits into from
May 17, 2024

Conversation

kyleaoman
Copy link
Member

Move from setup.py to pyproject.toml. Notes:

  • The version is hardcoded in the pyproject.toml file instead of read from the version file. Some googling suggests that there is not way around this that doesn't make more of a mess than it's worth.
  • I didn't include a long description, but pyproject.toml lets you point to the readme file, so I think that covers the same role.

@JBorrow
Copy link
Member

JBorrow commented Sep 7, 2023

As discussed before, I think simply adding the build environment pyproject.toml should suffice here :)

@kyleaoman
Copy link
Member Author

@JBorrow I put back the setup.py file.

@MatthieuSchaller
Copy link
Member

@JBorrow any last thoughts?

@JBorrow
Copy link
Member

JBorrow commented Oct 5, 2023

Can pyproject.toml not be much reduced now we are still using the old build system? I think all you need to do is specify that it uses setuptools.

@MatthieuSchaller
Copy link
Member

@kyleaoman any thoughts on Josh's last point?

@kyleaoman
Copy link
Member Author

(long delay because...)

I guess I'm unsure whether to follow Josh's whims or the recommendations of setuptools and python. The general recommendation seems to be to use first pyproject.toml (including with setuptools) and then include setup.py if it is needed. For instance (source, which is the up to date guidance following PEP 621):

Also, the setuptools build backend supports both the [project] table, and the older format in setup.cfg or setup.py. For new projects, it is recommended to use the [project] table, and keep setup.py only if some programmatic configuration is needed (such as building C extensions), but the setup.cfg and setup.py formats are still valid. See Is setup.py deprecated?.

And from setuptools:

Starting with PEP 621, the Python community selected pyproject.toml as a standard way of specifying project metadata. Setuptools has adopted this standard and will use the information contained in this file as an input in the build process.

If compatibility with legacy builds or versions of tools that don’t support certain packaging standards (e.g. PEP 517 or PEP 660), a simple setup.py script can be added to your project [1] (while keeping the configuration in pyproject.toml):

from setuptools import setup
setup()

My suggestion would therefore be to revert the last commit on this branch (i.e. delete setup.py again) and merge. But @JBorrow if you have a different preference that's of course fine, however in that case I don't know how you want to implement it so I'll leave it to you.

Copy link
Member

@JBorrow JBorrow left a comment

Choose a reason for hiding this comment

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

Ok, I am happy with this now.

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@JBorrow
Copy link
Member

JBorrow commented May 8, 2024

I think we should merge this and then re-visit changing from setup.py to pyproject.toml from there. Kyle, we should also get you write access to the repo.

@MatthieuSchaller
Copy link
Member

Kyle is already a maintainer.

Note that this whole project should be destined for death pretty soon. We should access the SOAP catalogs directly via swiftsimio without the need of an intermediate tool.

@JBorrow
Copy link
Member

JBorrow commented May 8, 2024

Unless this has been changed, the autoplotter still lives in velociraptor. Kyle is a maintainer because I just made him a maintainer :).

@MatthieuSchaller
Copy link
Member

Indeed, but that should really disappear too.

@JBorrow
Copy link
Member

JBorrow commented May 8, 2024

As in it will be re-written, or moved?

@MatthieuSchaller
Copy link
Member

neither at this stage.

@kyleaoman
Copy link
Member Author

When this is killed off I'd appreciate a bit of warning so that I can update swiftgalaxy, which relies heavily on this for docs and tests. Would like to move that to SOAP first, but that implies having a functional i/o package for SOAP.

@kyleaoman
Copy link
Member Author

Should I deal with the suggested changes and merge this in, then? Probably not worth the bother woth pyproject.toml if this is getting mothballed anyway.

@JBorrow
Copy link
Member

JBorrow commented May 17, 2024

I think that makes the most sense, thanks Kyle.

kyleaoman and others added 2 commits May 17, 2024 21:02
Co-authored-by: Josh Borrow <[email protected]>
Co-authored-by: Josh Borrow <[email protected]>
@kyleaoman
Copy link
Member Author

@JBorrow I think that I've done all that I can on my end, merging is blocked until there's an approving review (and I can't approve as the PR author).

@JBorrow JBorrow merged commit 69e488b into SWIFTSIM:master May 17, 2024
1 check passed
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