-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate nox and the GitHub actions to use uv instead of Poetry.
- Loading branch information
Showing
15 changed files
with
1,576 additions
and
1,883 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,26 @@ | ||
name: Assets | ||
|
||
on: | ||
schedule: | ||
- cron: "37 3 * * 0" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update: | ||
name: Update DocSearch assets | ||
name: Update dependencies | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Install poetry | ||
python-version: "3.13" | ||
- name: Update dependencies | ||
run: | | ||
pip install -U pip poetry | ||
poetry --version | ||
poetry install --with dev | ||
uv sync -U | ||
- name: Update assets | ||
run: poetry run python update_assets.py | ||
|
||
run: | | ||
uv run --with httpx update_assets.py | ||
- name: Create PR | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -37,11 +31,11 @@ jobs: | |
git config --global user.email "[email protected]" | ||
git checkout -b "${branch}" | ||
git add . | ||
git commit --message "chore: update DocSearch assets" | ||
git commit --message "chore: update dependencies" | ||
git push --force --set-upstream origin "${branch}" | ||
if ! [[ "$(gh pr list --base main --head ${branch})" ]]; then | ||
gh pr create --title "Update DocSearch assets" --body "Update DocSearch assets" | ||
gh pr create --title "Update dependencies" --body "Update dependencies" | ||
fi | ||
else | ||
echo "DocSearch assets up to date." | ||
echo "Dependencies up to date." | ||
fi |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,110 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
tags: | ||
- "*.*.*" | ||
pull_request: | ||
|
||
jobs: | ||
docs: | ||
strategy: | ||
matrix: | ||
python-version: | ||
- 3.9 | ||
- 3.13 | ||
theme: ["alabaster", "awesome", "furo", "pydata", "rtd"] | ||
name: Build docs with ${{ matrix.theme }} theme on Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install nox | ||
run: | | ||
uv tool install nox | ||
- name: Build docs with ${{ matrix.theme }} | ||
run: | | ||
nox -p ${{ matrix.python-version }} -s docs -- -t ${{ matrix.theme }} | ||
env: | ||
DOCSEARCH_APP_ID: test | ||
DOCSEARCH_API_KEY: test | ||
DOCSEARCH_INDEX_NAME: test | ||
test: | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
|
||
python-version: ["3.9", "3.13"] | ||
name: Test with Python ${{ matrix.python-version }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install nox and poetry | ||
- name: Install nox | ||
run: | | ||
pip install -U pip nox poetry poetry-plugin-export | ||
nox --version | ||
pip --version | ||
poetry --version | ||
- name: Run tests | ||
uv tool install nox | ||
- name: Run workflow | ||
run: | | ||
nox -p ${{ matrix.python-version }} | ||
env: | ||
DOCSEARCH_APP_ID: test | ||
DOCSEARCH_API_KEY: test | ||
DOCSEARCH_INDEX_NAME: test | ||
|
||
lint: | ||
name: Lint | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
|
||
- name: Install nox and poetry | ||
python-version: 3.13 | ||
- name: Install nox | ||
run: | | ||
pip install -U pip nox poetry poetry-plugin-export | ||
nox --version | ||
pip --version | ||
poetry --version | ||
uv tool install nox | ||
- name: Lint Python code | ||
run: nox -s lint | ||
|
||
- name: Check links | ||
run: nox -s check_links | ||
|
||
release: | ||
name: Publish to PyPI | ||
needs: [test, lint] | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
|
||
build: | ||
name: Build the package | ||
runs-on: ubuntu-latest | ||
|
||
needs: | ||
- test | ||
- lint | ||
- docs | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
|
||
- name: Install nox and poetry | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
- name: Build packages | ||
run: | | ||
pip install -U pip nox poetry poetry-plugin-export | ||
nox --version | ||
pip --version | ||
poetry --version | ||
- name: Publish package | ||
env: | ||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} | ||
run: nox -s publish | ||
|
||
tag-release: | ||
name: Tag new release | ||
needs: release | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
|
||
uv build | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-packages | ||
path: dist/ | ||
publish: | ||
name: Publish package to PyPI | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
permissions: | ||
id-token: write | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
steps: | ||
- uses: marvinpinto/action-automatic-releases@latest | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
prerelease: false | ||
name: python-packages | ||
path: dist/ | ||
- name: Upload to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,54 @@ | ||
accessible-pygments==0.0.4 ; python_version >= "3.8" and python_version < "4.0" | ||
alabaster==0.7.13 ; python_version >= "3.8" and python_version < "3.9" | ||
alabaster==0.7.16 ; python_version >= "3.9" and python_version < "3.10" | ||
alabaster==1.0.0 ; python_version >= "3.10" and python_version < "4.0" | ||
babel==2.16.0 ; python_version >= "3.8" and python_version < "4.0" | ||
beautifulsoup4==4.12.3 ; python_version >= "3.8" and python_version < "4.0" | ||
certifi==2024.8.30 ; python_version >= "3.8" and python_version < "4.0" | ||
charset-normalizer==3.3.2 ; python_version >= "3.8" and python_version < "4.0" | ||
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" | ||
docutils==0.20.1 ; python_version >= "3.8" and python_version < "4.0" | ||
furo==2024.8.6 ; python_version >= "3.8" and python_version < "4.0" | ||
idna==3.10 ; python_version >= "3.8" and python_version < "4.0" | ||
imagesize==1.4.1 ; python_version >= "3.8" and python_version < "4.0" | ||
importlib-metadata==8.5.0 ; python_version >= "3.8" and python_version < "3.10" | ||
jinja2==3.1.4 ; python_version >= "3.8" and python_version < "4.0" | ||
livereload==2.7.0 ; python_version >= "3.8" and python_version < "4.0" | ||
markdown-it-py==3.0.0 ; python_version >= "3.8" and python_version < "4.0" | ||
markupsafe==2.1.5 ; python_version >= "3.8" and python_version < "4.0" | ||
mdit-py-plugins==0.4.2 ; python_version >= "3.8" and python_version < "4.0" | ||
mdurl==0.1.2 ; python_version >= "3.8" and python_version < "4.0" | ||
myst-parser==3.0.1 ; python_version >= "3.8" and python_version < "3.10" | ||
myst-parser==4.0.0 ; python_version >= "3.10" and python_version < "4.0" | ||
packaging==24.1 ; python_version >= "3.8" and python_version < "4.0" | ||
pydata-sphinx-theme==0.14.4 ; python_version >= "3.8" and python_version < "4.0" | ||
pygments==2.18.0 ; python_version >= "3.8" and python_version < "4.0" | ||
python-dotenv==1.0.1 ; python_version >= "3.8" and python_version < "4.0" | ||
pytz==2024.2 ; python_version >= "3.8" and python_version < "3.9" | ||
pyyaml==6.0.2 ; python_version >= "3.8" and python_version < "4.0" | ||
requests==2.32.3 ; python_version >= "3.8" and python_version < "4.0" | ||
snowballstemmer==2.2.0 ; python_version >= "3.8" and python_version < "4.0" | ||
soupsieve==2.6 ; python_version >= "3.8" and python_version < "4.0" | ||
sphinx-autobuild==2021.3.14 ; python_version >= "3.8" and python_version < "4.0" | ||
sphinx-basic-ng==1.0.0b2 ; python_version >= "3.8" and python_version < "4.0" | ||
sphinx==7.1.2 ; python_version >= "3.8" and python_version < "3.9" | ||
sphinx==7.4.7 ; python_version >= "3.9" and python_version < "3.10" | ||
sphinx==8.0.2 ; python_version >= "3.10" and python_version < "4.0" | ||
sphinxawesome-theme==5.3.0 ; python_version >= "3.8" and python_version < "4.0" | ||
sphinxcontrib-applehelp==1.0.4 ; python_version >= "3.8" and python_version < "3.9" | ||
sphinxcontrib-applehelp==2.0.0 ; python_version >= "3.9" and python_version < "4.0" | ||
sphinxcontrib-devhelp==1.0.2 ; python_version >= "3.8" and python_version < "3.9" | ||
sphinxcontrib-devhelp==2.0.0 ; python_version >= "3.9" and python_version < "4.0" | ||
sphinxcontrib-htmlhelp==2.0.1 ; python_version >= "3.8" and python_version < "3.9" | ||
sphinxcontrib-htmlhelp==2.1.0 ; python_version >= "3.9" and python_version < "4.0" | ||
sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.8" and python_version < "4.0" | ||
sphinxcontrib-qthelp==1.0.3 ; python_version >= "3.8" and python_version < "3.9" | ||
sphinxcontrib-qthelp==2.0.0 ; python_version >= "3.9" and python_version < "4.0" | ||
sphinxcontrib-serializinghtml==1.1.5 ; python_version >= "3.8" and python_version < "3.9" | ||
sphinxcontrib-serializinghtml==2.0.0 ; python_version >= "3.9" and python_version < "4.0" | ||
tomli==2.0.2 ; python_version >= "3.9" and python_version < "3.11" | ||
tornado==6.4.1 ; python_version >= "3.8" and python_version < "4.0" | ||
typing-extensions==4.12.2 ; python_version >= "3.8" and python_version < "4.0" | ||
urllib3==2.2.3 ; python_version >= "3.8" and python_version < "4.0" | ||
zipp==3.20.2 ; python_version >= "3.8" and python_version < "3.10" | ||
# This file was autogenerated by uv via the following command: | ||
# uv export --group=docs --no-hashes --output-file=docs/requirements.txt | ||
-e . | ||
accessible-pygments==0.0.5 | ||
alabaster==0.7.16 | ||
anyio==4.6.2.post1 | ||
babel==2.16.0 | ||
beautifulsoup4==4.9.3 | ||
certifi==2024.8.30 | ||
charset-normalizer==3.4.0 | ||
click==8.1.7 | ||
colorama==0.4.6 | ||
docutils==0.21.2 | ||
exceptiongroup==1.2.2 ; python_full_version < '3.11' | ||
furo==2024.8.6 | ||
h11==0.14.0 | ||
idna==3.10 | ||
imagesize==1.4.1 | ||
importlib-metadata==8.5.0 ; python_full_version < '3.10' | ||
jinja2==3.1.4 | ||
markdown-it-py==3.0.0 | ||
markupsafe==3.0.2 | ||
mdit-py-plugins==0.4.2 | ||
mdurl==0.1.2 | ||
myst-parser==3.0.1 | ||
packaging==24.2 | ||
pydata-sphinx-theme==0.16.0 | ||
pygments==2.18.0 | ||
python-dotenv==1.0.1 | ||
pyyaml==6.0.2 | ||
requests==2.32.3 | ||
sniffio==1.3.1 | ||
snowballstemmer==2.2.0 | ||
soupsieve==2.6 | ||
sphinx==7.4.7 | ||
sphinx-autobuild==2024.10.3 | ||
sphinx-basic-ng==1.0.0b2 | ||
sphinx-rtd-theme==3.0.2 | ||
sphinxawesome-theme==6.0.0b1 | ||
sphinxcontrib-applehelp==2.0.0 | ||
sphinxcontrib-devhelp==2.0.0 | ||
sphinxcontrib-htmlhelp==2.1.0 | ||
sphinxcontrib-jquery==4.1 | ||
sphinxcontrib-jsmath==1.0.1 | ||
sphinxcontrib-qthelp==2.0.0 | ||
sphinxcontrib-serializinghtml==2.0.0 | ||
starlette==0.41.3 | ||
tomli==2.2.1 ; python_full_version < '3.11' | ||
typing-extensions==4.12.2 | ||
urllib3==2.2.3 | ||
uvicorn==0.32.1 | ||
watchfiles==1.0.0 | ||
websockets==14.1 | ||
zipp==3.21.0 ; python_full_version < '3.10' |
Oops, something went wrong.