Skip to content

docs: add read the docs configuration file #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- 3.7
- 3.8
- 3.9
- "3.10"
Expand Down Expand Up @@ -139,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.7"
# Pin this to the same version used on in .readthedocs.yaml
python-version: "3.11"

- name: Install dependencies
run: python -m pip install tox
Expand Down
1 change: 1 addition & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pull_request_rules:
- "title~=^docs:"
- "files~=docs"
- "files~=.rst$"
- "files~=.readthedocs.yaml$"
actions:
label:
add:
Expand Down
12 changes: 12 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -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: .
12 changes: 2 additions & 10 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -28,7 +27,7 @@ dynamic = ["version"]
keywords = ["virtualenv"]
license = {text = "MIT"}
readme = "README.txt"
requires-python = ">=3.7"
requires-python = ">=3.8"

dependencies = [
"virtualenv",
Expand Down