docs: cleanup (#567)

* fix: support docs/tests extras, simpler RtD install

Use oldest-supported-numpy from SciPy in example

* chore: bump to ubuntu-20.04 images

* fix: move extras to setup so we can do combinations
This commit is contained in:
Henry Schreiner
2021-02-04 22:02:53 -05:00
committed by GitHub
parent e12ce2d647
commit 99acc0abac
10 changed files with 53 additions and 36 deletions
+7
View File
@@ -106,4 +106,11 @@ env3?/
# MyPy cache # MyPy cache
.mypy_cache/ .mypy_cache/
# Output cache for setup.py checker
all_known_setup.yaml all_known_setup.yaml
# mkdocs
site/
# Virtual environments
venv*
+1 -1
View File
@@ -20,7 +20,7 @@ repos:
rev: 20.8b1 rev: 20.8b1
hooks: hooks:
- id: black - id: black
files: ^bin/update_pythons.py$ files: ^bin/update_pythons.py|setup.py$
- repo: https://github.com/pre-commit/mirrors-mypy - repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.800 rev: v0.800
+2 -2
View File
@@ -6,9 +6,9 @@ mkdocs:
configuration: mkdocs.yml configuration: mkdocs.yml
python: python:
version: 3.7 version: 3.8
install: install:
- method: pip - method: pip
path: . path: .
extra_requirements: extra_requirements:
- dev - docs
+10 -11
View File
@@ -356,27 +356,26 @@ CIBW_BEFORE_BUILD: "{package}/script/prepare_for_build.sh"
``` ```
!!! note !!! note
If you need dependencies installed for the build, we recommend using pyproject.toml. This is an example pyproject.toml file: If you need dependencies installed for the build, we recommend using
`pyproject.toml`. This is an example `pyproject.toml` file:
[build-system] [build-system]
requires = [ requires = [
"setuptools>=42", "setuptools>=42",
"wheel", "wheel",
"Cython", "Cython",
"numpy==1.11.3; python_version<='3.6'", "numpy==1.13.3; python_version<'3.5'",
"numpy==1.14.5; python_version=='3.7'", "oldest-supported-numpy; python_version>='3.5'",
"numpy==1.17.3; python_version=='3.8'",
"numpy==1.19.4; python_version>='3.9'",
] ]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
This [PEP 517][]/[PEP 518][] style build allows you to completely control the This [PEP 517][]/[PEP 518][] style build allows you to completely control
build environment in cibuildwheel, [PyPA-build][], and pip, doesn't force the build environment in cibuildwheel, [PyPA-build][], and pip, doesn't
downstream users to install anything they don't need, and lets you do more force downstream users to install anything they don't need, and lets you do
complex pinning (Cython, for example, requires a wheel to be built with an more complex pinning (Cython, for example, requires a wheel to be built
equal or earlier version of NumPy; pinning in this way is the only way to with an equal or earlier version of NumPy; pinning in this way is the only
ensure your module works on all available NumPy versions). way to ensure your module works on all available NumPy versions).
[PyPA-build]: https://pypa-build.readthedocs.io/en/latest/ [PyPA-build]: https://pypa-build.readthedocs.io/en/latest/
[PEP 517]: https://www.python.org/dev/peps/pep-0517/ [PEP 517]: https://www.python.org/dev/peps/pep-0517/
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-18.04, windows-2019, macos-10.15] os: [ubuntu-20.04, windows-2019, macos-10.15]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
+1 -1
View File
@@ -8,7 +8,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-18.04, windows-2019, macos-10.15] os: [ubuntu-20.04, windows-2019, macos-10.15]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
+1 -1
View File
@@ -8,7 +8,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-18.04, windows-2019, macos-10.15] os: [ubuntu-20.04, windows-2019, macos-10.15]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
+1 -1
View File
@@ -1 +1 @@
-e .[dev] -e .[dev,docs]
-17
View File
@@ -38,23 +38,6 @@ install_requires =
[options.package_data] [options.package_data]
cibuildwheel = resources/* cibuildwheel = resources/*
[options.extras_require]
dev =
click
mkdocs-include-markdown-plugin==2.1.1
mkdocs==1.0.4
pip-tools
pygithub
ghapi
pymdown-extensions
pytest>=4
pytest-timeout
pyyaml
requests
typing-extensions
rich>=9.6
mypy>=0.800
[options.packages.find] [options.packages.find]
include = include =
cibuildwheel cibuildwheel
+29 -1
View File
@@ -1,3 +1,31 @@
from setuptools import setup from setuptools import setup
setup() extras = {
"docs": [
"mkdocs-include-markdown-plugin==2.1.1",
"mkdocs==1.0.4",
"pymdown-extensions",
],
"test": [
"jinja2",
"pytest>=4",
"pytest-timeout",
],
"dev": [
"click",
"ghapi",
"mypy>=0.800",
"packaging>=20.8",
"pip-tools",
"pygithub",
"pyyaml",
"requests",
"rich>=9.6",
"typing-extensions",
],
}
extras["all"] = sum(extras.values(), [])
extras["dev"] += extras["test"]
setup(extras_require=extras)