CI: Use locked Poetry setup in release workflows#24
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the external release/documentation GitHub Actions workflows to use the repository’s pinned Poetry version (from .poetry-version) and to install docs dependencies via Poetry so the workflow follows poetry.lock.
Changes:
- Read Poetry version from
.poetry-versionin the PyPI publish workflow and use it to configureabatilo/actions-poetry. - Read Poetry version from
.poetry-versionin the GitHub Pages docs publish workflow and use it to configureabatilo/actions-poetry. - Replace the docs workflow’s inline requirements generation/install with
poetry install --with docs(lockfile-driven installs).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/ext-publish-to-pypi.yml | Uses .poetry-version output to pin Poetry in the PyPI build workflow. |
| .github/workflows/ext-publish-to-gh-pages.yml | Uses .poetry-version output to pin Poetry and switches docs dependency installation to Poetry/lockfile. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
74
to
+75
| - name: Install documentation dependencies | ||
| run: | | ||
| cat > requirements.txt << 'EOF' | ||
| alabaster==0.7.13 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| antlr4-python3-runtime==4.13.1 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| babel==2.12.1 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| certifi==2023.7.22 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| charset-normalizer==3.2.0 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| click==8.1.7 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| colorama==0.4.6 ; python_full_version >= "3.8.3" and python_version < "4.0" and (sys_platform == "win32" or platform_system == "Windows") | ||
| commonmark==0.9.1 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| docutils==0.19 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| idna==3.4 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| imagesize==1.4.1 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| importlib-metadata==6.8.0 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| jinja2==3.1.2 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| loguru==0.7.1 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| markdown-it-py==3.0.0 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| markdown==3.4.4 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| markupsafe==2.1.3 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| mdurl==0.1.2 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| more-itertools==10.1.0 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| packaging==23.1 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| pillow==10.4.0 ; python_full_version >= "3.8.3" and python_version < "4" | ||
| pygments==2.16.1 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| pytz==2023.3.post1 ; python_full_version >= "3.8.3" and python_version < "3.9" | ||
| pyyaml==6.0.1 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| recommonmark==0.6.0 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| reportlab==4.0.4 ; python_full_version >= "3.8.3" and python_version < "4" | ||
| requests==2.29.0 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| rich==13.5.2 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| rst2pdf==0.99 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| smartypants==2.0.1 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| snowballstemmer==2.2.0 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| sphinx-autodoc-typehints==1.12.0 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| sphinx-markdown-tables==0.0.17 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| sphinx-rtd-theme==2.0.0 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| sphinx==6.2.1 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| sphinxcontrib-applehelp==1.0.4 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| sphinxcontrib-devhelp==1.0.2 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| sphinxcontrib-htmlhelp==2.0.1 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| sphinxcontrib-jquery==4.1 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| sphinxcontrib-jsmath==1.0.1 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| sphinxcontrib-qthelp==1.0.3 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| sphinxcontrib-serializinghtml==1.1.5 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| typing-extensions==4.7.1 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| urllib3==1.26.19 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| win32-setctime==1.1.0 ; python_full_version >= "3.8.3" and python_version < "4.0" and sys_platform == "win32" | ||
| zipp==3.16.2 ; python_full_version >= "3.8.3" and python_version < "4.0" | ||
| EOF | ||
| poetry run pip install -r requirements.txt | ||
| run: poetry install --with docs |
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.
Summary
.poetry-versionin release workflows instead of hardcoding the old version.poetry install --with docsso it usespoetry.lock.Test plan
.github/workflows/ext-publish-to-pypi.ymland.github/workflows/ext-publish-to-gh-pages.ymlgit diff --check -- .github/workflows/ext-publish-to-pypi.yml .github/workflows/ext-publish-to-gh-pages.ymlrgchecks for the removed old Poetry pin and generated requirements installMade with Cursor