-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add pyproject.toml and versioning #140
Conversation
Falcon provides a WSGI app which can be used by any server, not just gunicorn. Thus, make gunicorn optional in case the user wants to use a different server. There shouldn't be any import errors since the class is now in an isolated module. The only time that module is imported is when gunicorn loads its config. Sentry is there for Python Discord mainly, so this dependency shouldn't be imposed on others.
Use the HEAD commit's date as the package's version. Append the number of commits made on the same date as HEAD to ensure multiple releases on the same date still have unique versions.
Subpackages weren't being included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work as intended! I did find one typo.
@@ -2,8 +2,13 @@ | |||
* | |||
|
|||
# Make exceptions for what's needed | |||
!snekbox | |||
!.git/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be further filtered to speed up transfer time, but I doubt it is worth spending time on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with the structure of the directory and what exactly I need. However, it's never even copied; it's just mounted.
Co-authored-by: Matteo Bertucci <[email protected]>
Summary
pyproject.toml
using setuptools as the PEP 517 build backendpyproject.toml
The addition of versioning is progress towards #138. Originally I planned to just use the commit SHA, but I realised that it's not an adequate version since it cannot be properly constrained (except for
==
). I chose CalVer because I don't want the maintenance burden of SemVer and I don't want to have to tag releases. Deriving the version from the commit allows for the current workflow to remain: every push to master creates a new release that is deployed automatically.Review Process
Try installing the package (
pip install .
), importing it, and checking that the__version__
matches the HEAD commit's date. Also run the tests withmake test
to ensure the dev container still works.