-
-
Notifications
You must be signed in to change notification settings - Fork 48
Use declarative setup.cfg; use setuptools_scm to set version #32
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
Conversation
This partly replaces #31 |
I will have a look but I would try and squeeze one thing per PR when it comes to the build system. Also, I am not so sure what happens to the documentation deployment with this, since it peaks up the version from _version.py which (from my understanding) will not have been generated unless we build the extension. The states between github actions do not persist |
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.
Good job overall. I am slightly concerned about the documentation generation.
I will allow it to run on the CI and see how that goes.
Codecov Report
@@ Coverage Diff @@
## dev #32 +/- ##
==========================================
- Coverage 81.02% 80.94% -0.09%
==========================================
Files 10 10
Lines 4290 4298 +8
==========================================
+ Hits 3476 3479 +3
- Misses 814 819 +5
Continue to review full report at Codecov.
|
* dev: Update changelog Add additional shields Disable GPG signing of auto-commit Increments version Updates docs with proper json syntax Update CHANGELOG.md Fixes multiprocess bug Simplifies uri file and swaps os to Path Simplify unittest caller Preserves paths when using shlex Makes unittest input to be a list Makes unittest use Path instead of os.path Adds Windows CI Improves coverage Further removal of fstrings Imports commit version to doc Improve code structure Improves code style Improves test case paths Disable the incrementation of the version
Guards against future package renames
Ensures version is correct
I've added |
I might suggest also replacing the |
About the docs. I don't see a compelling reason to change/add to GitHub Pages readthedocs for this project. From my understanding readthedocs, as proposed here, would replace gh-pages. The existing Actions implementations work robustly with no maintenance required, the same is not true for the .readthedocs.yaml. There is no easy way to simulate deployment and that hardcoded Python version, looks exactly like the thing we will forget to change in a future upgrade. Implementing the proposed changes would just increase maintenance time substantially. I would resist the urge to make any more changes, other than setup.py, setup.cfg and pyproject.toml (and versions). You can open a separate issue for the readthedocs and what improvements it adds to the documentation (I am not overly familiar with it's features). FYI the sphinx docs Action is the recommended route according to the documentation. When ammaraskar/sphinx-action stops using requirements.txt, that would be a good time for us to switch too or basically whatever sphinx says is the prefered way to deploy on gh-pages. |
This reverts commit 97d1629.
Ah, apologies, I had assumed the project was already using readthedocs and the GHA here was just for testing, so I was just intending to add some config! I'll revert that commit and add a |
No worries, I use the sphinx readdocs theme (which I might change to puro) but not readocs itself.
The Action runs from within docs directory so you will have to do a relative import. That said I don't see a reason why change the docs requirements.txt. To build docs you still need to cd into docs and call |
The docs action should work now! It turns out the action hasn't been maintained for some time, and it has a few bugs. Notably that the image it's based on is very out of date which uses a version of sphinx incompatible with some of the docs dependencies. Switching to the sphinx-toolbox fork, and bumping the required version of sphinx fixes that. While
|
Let me know when you are happy with this |
@ZedThree is this ready to merge? If so could you enable the option for me to push changes to the branch, otherwise I will have to cherry-pick into another PR. Either way is fine by me |
* dev: Create codeql-analysis.yml Increments version Do not include debug cmd arguments Adds unittest for autocompletion as snippets Updates formatting for fr strings Create FUNDING.yml Fix text completion for procedures
Yep, ready to merge. I've merged in |
Okay don't worry I will cherry-pick your commits into another PR then. BTW I was thinking something like this about |
Fixed in #44 |
This does two related things:
setup.cfg
oversetup.py
setuptools_scm
to set the version automaticallysetup.py
is slowly getting phased out in favour ofsetup.cfg
. The main benefit is there's much less need for any kind of code, which means there's no chicken-and-egg problem with building the package -- this actually isn't a problem withfortls
because it has no third-party dependencies.setuptools_scm
is really nice because it completely handles setting the version number. Runningfortls --version
on this commit now reports2.0.2.dev7+g98adb50
-- this encodes how many commits since the previous release, along with the exact commit hash, while still being compatible with semver.