Skip to content

Commit

Permalink
chore: use pipx instead of asdf for readthedocs (#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
huxuan authored Jul 1, 2024
1 parent 8e8439a commit 0a2ae94
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
build:
apt_packages:
- pipx
jobs:
post_checkout:
- git fetch --unshallow || true
Expand All @@ -20,9 +22,7 @@ build:
post_system_dependencies:
- env | sort
pre_create_environment:
- asdf plugin add pdm
- asdf install pdm 2.16.1
- asdf global pdm 2.16.1
- PIPX_BIN_DIR=$READTHEDOCS_VIRTUALENV_PATH/bin pipx install pdm==2.16.1
post_install:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH make dev-doc
post_build:
Expand Down
4 changes: 1 addition & 3 deletions .renovaterc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"customType": "regex",
"datasourceTemplate": "pypi",
"description": "Match Python packages installed with pip, pipx and asdf",
"description": "Match Python packages installed with pip/pipx",
"fileMatch": [
"^README\\.md$",
"^\\.devcontainer/Dockerfile$",
Expand All @@ -26,8 +26,6 @@
"^template/docs/.+\\.md(\\.jinja)?$"
],
"matchStrings": [
"asdf global (?<depName>.*?) (?<currentValue>.*?)\n",
"asdf install (?<depName>.*?) (?<currentValue>.*?)\n",
"pip install.* (?<depName>.*?)==(?<currentValue>.*?)[\"\n]",
"pipx install (?<depName>.*?)==(?<currentValue>.*?)[;\n]"
]
Expand Down
2 changes: 1 addition & 1 deletion docs/management/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The project template tracks the following dependencies:
1. [gitlabci](https://docs.renovatebot.com/modules/manager/gitlabci/): Containers in GitLab CI/CD.
1. [pre-commit](https://docs.renovatebot.com/modules/manager/pre-commit/): Pre-commit hooks.
1. Regex manager:
1. Python packages installed with pip, pipx and asdf, listed in the README, DevContainer Dockerfile, GitHub Actions, GitLab CI/CD, ReadTheDocs configuration, Renovate configuration and documentation.
1. Python packages installed with pip/pipx, listed in the README, DevContainer Dockerfile, GitHub Actions, GitLab CI/CD, ReadTheDocs configuration, Renovate configuration and documentation.
1. Debian packages installed in the DevContainer Dockerfile.
1. PDM version specified in the `pdm-project/setup-pdm` GitHub action.
1. PDM version specified in the renovate constraints.
Expand Down
6 changes: 3 additions & 3 deletions template/.readthedocs.yaml.jinja
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
build:
apt_packages:
- pipx
jobs:
post_checkout:
- git fetch --unshallow || true
Expand All @@ -20,9 +22,7 @@ build:
post_system_dependencies:
- env | sort
pre_create_environment:
- asdf plugin add pdm
- asdf install pdm 2.16.1
- asdf global pdm 2.16.1
- PIPX_BIN_DIR=$READTHEDOCS_VIRTUALENV_PATH/bin pipx install pdm==2.16.1
post_install:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH make dev-doc
post_build:
Expand Down
4 changes: 1 addition & 3 deletions template/.renovaterc.json.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"customType": "regex",
"datasourceTemplate": "pypi",
"description": "Match Python packages installed with pip, pipx and asdf",
"description": "Match Python packages installed with pip/pipx",
"fileMatch": [
"^README\\.md$",
"^\\.devcontainer/Dockerfile$",
Expand All @@ -29,8 +29,6 @@
[%- endif %]
],
"matchStrings": [
"asdf global (?<depName>.*?) (?<currentValue>.*?)\n",
"asdf install (?<depName>.*?) (?<currentValue>.*?)\n",
"pip install.* (?<depName>.*?)==(?<currentValue>.*?)[\"\n]",
"pipx install (?<depName>.*?)==(?<currentValue>.*?)[;\n]"
]
Expand Down
2 changes: 1 addition & 1 deletion template/docs/management/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The project template tracks the following dependencies:
1. [gitlabci](https://docs.renovatebot.com/modules/manager/gitlabci/): Containers in GitLab CI/CD.
1. [pre-commit](https://docs.renovatebot.com/modules/manager/pre-commit/): Pre-commit hooks.
1. Regex manager:
1. Python packages installed with pip, pipx and asdf, listed in the README, DevContainer Dockerfile, GitHub Actions, GitLab CI/CD, ReadTheDocs configuration, Renovate configuration and documentation.
1. Python packages installed with pip/pipx, listed in the README, DevContainer Dockerfile, GitHub Actions, GitLab CI/CD, ReadTheDocs configuration, Renovate configuration and documentation.
1. Debian packages installed in the DevContainer Dockerfile.
1. PDM version specified in the `pdm-project/setup-pdm` GitHub action.
1. PDM version specified in the renovate constraints.
Expand Down

0 comments on commit 0a2ae94

Please sign in to comment.