Skip to content

WIP: Version placeholders in repo - #188

Draft
jo-mueller wants to merge 3 commits into
ome:mainfrom
jo-mueller:version-placeholders-in-examples
Draft

WIP: Version placeholders in repo#188
jo-mueller wants to merge 3 commits into
ome:mainfrom
jo-mueller:version-placeholders-in-examples

Conversation

@jo-mueller

@jo-mueller jo-mueller commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

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.py script, 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 a examples/_static directory and the updated json files are then kept at examples/_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 .dev in 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

  • json files under examples/
  • index.md (The actual spec)
  • json file in tests

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

@github-actions

Copy link
Copy Markdown

Automated Review URLs

@jo-mueller

Copy link
Copy Markdown
Contributor Author

In the RTD preview build, it comes out alright :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant