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

[Feature request] - update python packaging #294

Open
shimwell opened this issue May 30, 2024 · 4 comments
Open

[Feature request] - update python packaging #294

shimwell opened this issue May 30, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@shimwell
Copy link
Contributor

shimwell commented May 30, 2024

I've been looking through a few F4E repos recently and I see most have setup.py or setup.cfg files. I noticed this one also has a partial pyproject.toml file. We could move these setup files entirely to pyproject.toml files to keep up to date with the latest python packaging recommendations

While updating we could also move to a src/jade layout instead of the jade folder structure. The version could be moved to the pyprojects and we could make use of import importlib.metadata to make the jade.__version__ attribute or if we are really keen then we could make use of the setuptools_scm to track the version for us.

Describe the solution you'd like

  • pyproject.toml instead of setup.py + setup.cfg
  • src/jade instead of jade folder structure
  • importlib.metadata or setuptools_scm to get version number

Describe alternatives you've considered
could also leave things as they are

Additional context
while setup.py is not depreciated the command commonly associated with a setup.py file python setup.py install is now depreciated and pyproject.toml is "strongly recommened" for python packaging

@shimwell shimwell added the enhancement New feature or request label May 30, 2024
@dodu94
Copy link
Member

dodu94 commented Oct 31, 2024

Due to the number of times we are forgetting to update the version number before release I'm starting to think we should find the time to do this with a quick "git mv" and then implement dynamic versioning

@Radiation-Transport
Copy link
Collaborator

Radiation-Transport commented Oct 31, 2024

I agree on dynamic versioning for python. May we use something similar for the versioning of JADE (for the prompt header for instance)?

@dodu94
Copy link
Member

dodu94 commented Oct 31, 2024

I was referring to dynamic versioning for JADE. The prompt header (and other strings) are already all connected to a single variable in the version.py file. The problem is that at the moment we are updating this constant by hand.

@shimwell
Copy link
Contributor Author

Perhaps this package helps, it takes the version number from the git release tags
https://github.com/pypa/setuptools-scm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants