WIP: Version placeholders in repo - #188
Draft
jo-mueller wants to merge 3 commits into
Draft
Conversation
Automated Review URLs |
Contributor
Author
|
In the RTD preview build, it comes out alright :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So...since updating version keys across the project already bit me a few times, this would be a solution to starting having this key replaced by a placeholder in the various places where it occurs.
I have added a new function in the
_prebuild.pyscript, that goes through all json in the examples dir, searches for"{{ VERSION }}"and replaces it with whatever is written in_version.py, so that would be the only place in the future where the version would need to be updated. For this to work, all the json examples need to sit in aexamples/_staticdirectory and the updated json files are then kept atexamples/_build.To be considered: It would be nice to have this ´_version.py´ under the control of a versioning tool like
setuptools_scm, but these fundamentally conflict with versions that have.devin them. So if we wanted to do this in the future, maybe we should think about a different tag. But maybe just updating the version in a single file wouldn't be too much overhead 🤷This is to be done with
examples/This PR will conflict big time with #140 , so I would opt for that to go in first and then I'll continue here or I'll rebase right away.
cc @jni