pyproject: split lint and doc dependencies

This allows a subset of dependencies to be installed if needed and
allows sharing requirements with readthedocs.
This commit is contained in:
David Lechner
2023-05-10 14:35:08 -05:00
parent 8e5891d9e8
commit b4ff3af36d
5 changed files with 570 additions and 555 deletions
+1 -9
View File
@@ -20,19 +20,11 @@ on:
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.8, 3.9]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install poetry
+26
View File
@@ -0,0 +1,26 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
build:
os: "ubuntu-22.04"
tools:
python: "3.10"
jobs:
post_create_environment:
- pip install poetry
- poetry config virtualenvs.create false
post_install:
- poetry install --only=doc
# Build documentation in the doc/main/ directory with Sphinx
sphinx:
configuration: doc/main/conf.py
fail_on_warning: true
# Optionally build your docs in additional formats such as PDF
formats:
- pdf
Generated
+540 -540
View File
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -29,10 +29,12 @@ packages = [
[tool.poetry.dependencies]
python = "^3.8"
[tool.poetry.dev-dependencies]
[tool.poetry.group.lint.dependencies]
black = "^22.3.0"
doc8 = "^0.8.1"
flake8 = "^4.0"
[tool.poetry.group.doc.dependencies]
Sphinx = { git = "https://github.com/pybricks/sphinx.git", rev = "b00124cb" }
sphinx-rtd-theme = "^1.0.0"
toml = "^0.10.0"
-5
View File
@@ -1,5 +0,0 @@
# This file is strictly for building docs on readthedocs.org
# See pyproject.toml for local development
git+https://github.com/pybricks/sphinx@b00124c#egg=Sphinx
sphinx-rtd-theme==1.0.0
toml