From 72acd99b15b25bfc25af7eff9d92cbc16e5a26cf Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Sun, 12 Feb 2023 09:39:12 -0500 Subject: [PATCH 1/6] docs: add read the docs configuration file Details from https://docs.readthedocs.io/en/stable/tutorial/index.html and https://mastodon.social/@hynek/109849829588314515 Addresses #49 --- .readthedocs.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..67875cf --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,12 @@ +version: 2 + +build: + os: "ubuntu-20.04" + tools: + python: "3.11" + +python: + # Install our python package before building the docs + install: + - method: pip + path: . From d896fb033447a845b2a764692a9752a316dbab4d Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Sun, 12 Feb 2023 09:43:58 -0500 Subject: [PATCH 2/6] Revert "doc build take version from git when package not installed" This reverts commit 8fc971c63078e6e7a2b4bc7b75cdefb04342637a. We should not need this now that the rtd.org build is installing our package via pip. --- docs/source/conf.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 3d8530e..6d46571 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,15 +14,7 @@ import datetime -# Try to import the version from our package, but if that fails -# because of the way the RTD build works fall back to at least using -# the git tag information. -try: - from virtualenvwrapper.version import version -except ImportError: - import subprocess - p = subprocess.run(['git', 'describe'], stdout=subprocess.PIPE) - version = p.stdout.decode('utf-8').strip() +import virtualenvwrapper.version # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -60,7 +52,7 @@ # built documents. # # The short X.Y version. -# version = "SEE IMPORTS ABOVE" +version = virtualenvwrapper.version.version # The full version, including alpha/beta/rc tags. release = version From 5e330f400f1bc89b5f2ce63462e5bb3710f548cf Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Sun, 12 Feb 2023 09:44:22 -0500 Subject: [PATCH 3/6] Revert "restore python 3.7 support" This reverts commit dbd54a45a7f76fc80df1a3df4af9e663a57aaa34. We no longer need this now that rtd.org is using 3.11. --- .github/workflows/test.yml | 1 - pyproject.toml | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4de60e7..438c5d5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,6 @@ jobs: fail-fast: false matrix: python-version: - - 3.7 - 3.8 - 3.9 - "3.10" diff --git a/pyproject.toml b/pyproject.toml index 1d1176a..0c88714 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,6 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -28,7 +27,7 @@ dynamic = ["version"] keywords = ["virtualenv"] license = {text = "MIT"} readme = "README.txt" -requires-python = ">=3.7" +requires-python = ">=3.8" dependencies = [ "virtualenv", From 2f90581295b625c18d8b8d740c6db53581a17a8c Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Sun, 12 Feb 2023 09:44:31 -0500 Subject: [PATCH 4/6] Revert "pin python version in doc build test" This reverts commit 5e0d73a324ffda0e75e9a963989ebb68153fdecb. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 438c5d5..a075696 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -141,7 +141,7 @@ jobs: # Pin this low because RTD doesn't seem to adopt new # versions quickly and this ensures we don't have a # dependency problem with importlib.metadata. - python-version: "3.7" + python-version: "3.9" - name: Install dependencies run: python -m pip install tox From 1b86035e64dc0058d812abd74a74b5d1b81456e8 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Sun, 12 Feb 2023 09:45:28 -0500 Subject: [PATCH 5/6] docs: github action to test build should use same version rtd.org --- .github/workflows/test.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a075696..f90f4ed 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -138,10 +138,8 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - # Pin this low because RTD doesn't seem to adopt new - # versions quickly and this ensures we don't have a - # dependency problem with importlib.metadata. - python-version: "3.9" + # Pin this to the same version used on in .readthedocs.yaml + python-version: "3.11" - name: Install dependencies run: python -m pip install tox From 11c201ec9c08b5383f35fedeefa58a7c06a23583 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Sun, 12 Feb 2023 09:49:57 -0500 Subject: [PATCH 6/6] mergify: update documentation label rule to include rtd config file --- .mergify.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.mergify.yml b/.mergify.yml index ad3cb2c..c92fa0a 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -28,6 +28,7 @@ pull_request_rules: - "title~=^docs:" - "files~=docs" - "files~=.rst$" + - "files~=.readthedocs.yaml$" actions: label: add: