From 8712160adb8c70a165827cddb4dc06b78c3858ca Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Mon, 3 Aug 2026 20:52:29 +0200 Subject: [PATCH] scripts: point the generated Python client at gitea, and make the scripts runnable The openapi-generator invocation still passed --git-host=git.psi.ch and a user id of jungfraujoch, from before the move to gitea.psi.ch/mx/jungfraujoch. Those properties are not cosmetic: they become the source URL in the generated README and pyproject, so the published client documentation - docs/python_client/README.md, which is copied out of the generated tree - told readers to pip install from a host that no longer answers. Regenerating with the corrected flags changes those two lines and nothing else, verified against the committed tree. update_version.sh, make_doc.sh and gen_python_client.sh were all mode 644, so the "run update_version.sh" the documentation asks for fails on the shebang. CMake and the CI both work around it by invoking them through bash. make_doc.sh builds a throw-away venv in the working tree and deletes it on the last line, which set -e skips whenever pip or sphinx fails - so a failed docs build left tmp_venv/ behind. Delete it from a trap instead, and ignore it along with the default output directory and the sdist directory gen_python_client.sh creates. Co-Authored-By: Claude Opus 5 (1M context) --- .gitignore | 8 ++++++++ docs/python_client/README.md | 4 ++-- gen_python_client.sh | 2 +- make_doc.sh | 6 ++++-- update_version.sh | 4 +++- 5 files changed, 18 insertions(+), 6 deletions(-) mode change 100644 => 100755 gen_python_client.sh mode change 100644 => 100755 make_doc.sh mode change 100644 => 100755 update_version.sh diff --git a/.gitignore b/.gitignore index 8670afc6..09f67f50 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,14 @@ build*/ python-client/ openapi-generator-cli.jar +# make_doc.sh: rendered HTML (default output dir) and the throw-away venv it builds in. The venv is +# normally deleted at the end, but stays behind when the build fails. +public/ +tmp_venv/ + +# gen_python_client.sh: the built sdist/wheel. +/dist/ + # rugnux_vs_xds.py output dirs (the default, and the ad-hoc ones used when comparing runs) rugnux_cmp*/ diff --git a/docs/python_client/README.md b/docs/python_client/README.md index 07c512ca..87c34b4b 100644 --- a/docs/python_client/README.md +++ b/docs/python_client/README.md @@ -37,9 +37,9 @@ Python 3.9+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://git.psi.ch/jungfraujoch/jungfraujoch.git +pip install git+https://gitea.psi.ch/mx/jungfraujoch.git ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://git.psi.ch/jungfraujoch/jungfraujoch.git`) +(you may need to run `pip` with root permission: `sudo pip install git+https://gitea.psi.ch/mx/jungfraujoch.git`) Then import the package: ```python diff --git a/gen_python_client.sh b/gen_python_client.sh old mode 100644 new mode 100755 index 87492a55..c5d7c303 --- a/gen_python_client.sh +++ b/gen_python_client.sh @@ -6,7 +6,7 @@ VERSION=$(