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

Use pyproject.toml #1073

Merged
merged 1 commit into from
May 23, 2024
Merged

Use pyproject.toml #1073

merged 1 commit into from
May 23, 2024

Conversation

getzze
Copy link
Collaborator

@getzze getzze commented May 8, 2024

In this PR:

  • create a pyproject.toml
  • remove the setup.{cfg,py}, {dev-,}requirements.txt and pytest.ini files.
  • add configuration for using ruff, mypy and typos.
  • create a separate _version.py file that holds only the __version__ variable. For later use of bump-my-version for instance.

Needs to be merged after #1072
Partially solves #1071

@ptrcnull
Copy link
Collaborator

ptrcnull commented May 9, 2024

could we perhaps use something like setuptools_scm? i've found it the most convenient so far, both for maintenance as a project developer and also packaging for Linux distro usage

Copy link
Owner

@Diaoul Diaoul left a comment

Choose a reason for hiding this comment

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

Massive overhaul, thanks!
LGTM

pyproject.toml Outdated
Comment on lines 12 to 13
authors = [{ name = "Antoine Bertin", email = "[email protected]" }]
maintainers = [{ name = "Antoine Bertin", email = "[email protected]" }]
Copy link
Owner

Choose a reason for hiding this comment

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

Please add yourself and other maintainers 🙏

pyproject.toml Outdated Show resolved Hide resolved
@getzze
Copy link
Collaborator Author

getzze commented May 9, 2024

could we perhaps use something like setuptools_scm? i've found it the most convenient so far, both for maintenance as a project developer and also packaging for Linux distro usage

I used it before but it has a huge problem: it needs all the .git folder to install. So you cannot install from the source tarball (which is the main install media for Arch Linux for instance).
I personnally switched to bump-my-version (https://github.com/callowayproject/bump-my-version/) after realizing this.

But maybe I can revert creating a _version.py file and we decide later.

@getzze
Copy link
Collaborator Author

getzze commented May 9, 2024

I reverted creating _version.py and created an issue to discuss solutions: #1076

@getzze
Copy link
Collaborator Author

getzze commented May 14, 2024

wait for #1082

@getzze getzze force-pushed the use-pyproject branch 2 times, most recently from cbad366 to e35584d Compare May 14, 2024 20:52
@getzze
Copy link
Collaborator Author

getzze commented May 14, 2024

good for a final review :)

@getzze
Copy link
Collaborator Author

getzze commented May 15, 2024

I added some rules for ruff: FA, BLE, RET, SIM, DTZ, FBT, ASYNC, TRY, full A and ANN2xx and ANN001 (the other are painful)

One doubt that I have, should we add this? :

[tool.ruff.format]
quote-style = "single"

I prefer double-quote, but given that historically, all the strings in subliminal are single-quote, it will be a huge change... Done automatically by ruff but still.

@ptrcnull
Copy link
Collaborator

changing all quotes would be a mess in git history, imo we can keep the current style ( and enforce it with lints ) rather than change it

@getzze
Copy link
Collaborator Author

getzze commented May 16, 2024

added the quote-style = single option

@getzze
Copy link
Collaborator Author

getzze commented May 16, 2024

Anything else or do you thing this can be merged @ptrcnull ?

@ptrcnull
Copy link
Collaborator

i think the only thing left is to add the current maintainers

@getzze
Copy link
Collaborator Author

getzze commented May 23, 2024

hey @ptrcnull , can you add yourself to the list of maintainer so we can merge this PR please?

@ptrcnull
Copy link
Collaborator

oh, i forgot i can just push to the branch; added

@getzze getzze merged commit c1a0107 into develop May 23, 2024
@getzze
Copy link
Collaborator Author

getzze commented May 23, 2024

Thanks, merged!

@Diaoul Diaoul deleted the use-pyproject branch June 23, 2024 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants