Skip to content

Commit ecaaa60

Browse files
committed
Switch from setup.py to Poetry
1 parent 6e07717 commit ecaaa60

10 files changed

Lines changed: 1133 additions & 54 deletions

File tree

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
.coverage
2-
*.egg-info
32
.ipynb_checkpoints
43
.mypy_cache
5-
.vscode
64
__pycache__
5+
.vscode
6+
*.egg-info
7+
build
8+
chrome-mac
79
dist
810
test.png
911
venv
10-
chrome-mac
11-
build
12+
TODO.md

.readthedocs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
2+
version: 2
3+
4+
sphinx:
5+
configuration: docs/conf.py
6+
7+
python:
8+
version: 3.7
9+
install:
10+
- requirements: docs/requirements.txt

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ matrix:
88
include:
99
- python: 3.7
1010

11+
before_install:
12+
- pip install poetry
13+
1114
install:
12-
- pip install -e .
13-
- pip install -r requirements.txt
15+
- poetry install
1416

1517
script:
16-
- make
18+
- poetry run make

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# The targets in this makefile should be executed inside Poetry, i.e. `poetry run make
2+
# docs`.
3+
14
.PHONY: docs
25

36
default: mypy-generate test-generate generate test-import mypy-cdp test-cdp
@@ -14,11 +17,6 @@ mypy-cdp:
1417
mypy-generate:
1518
mypy generator/
1619

17-
publish: test-import mypy-cdp test-cdp
18-
rm -fr dist trio_chrome_devtools_protocol.egg-info
19-
python setup.py sdist
20-
twine upload dist/*
21-
2220
test-cdp:
2321
pytest tests/ --cov=trio_cdp --cov-report=term-missing
2422

docs/conf.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@
2828
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2929
# ones.
3030
extensions = [
31+
'sphinx.ext.autodoc',
32+
'sphinx_autodoc_typehints',
33+
'sphinx_rtd_theme',
3134
]
3235

36+
3337
# Add any paths that contain templates here, relative to this directory.
3438
templates_path = ['_templates']
3539

@@ -44,9 +48,9 @@
4448
# The theme to use for HTML and HTML Help pages. See the documentation for
4549
# a list of builtin themes.
4650
#
47-
html_theme = 'alabaster'
51+
html_theme = 'sphinx_rtd_theme'
4852

4953
# Add any paths that contain custom static files (such as style sheets) here,
5054
# relative to this directory. They are copied after the builtin static files,
5155
# so a file named "default.css" will overwrite the builtin "default.css".
52-
# html_static_path = ['_static']
56+
html_static_path = ['_static']

docs/requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# RTD does not support Poetry natively, so this is a temporary workaround. See:
2+
# https://github.com/readthedocs/readthedocs.org/issues/4912
3+
sphinx
4+
sphinx-autodoc-typehints
5+
sphinx-rtd-theme
6+
.

0 commit comments

Comments
 (0)