Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit d4a388e

Browse files
committed
2 parents cd4ea07 + c169e5e commit d4a388e

File tree

7 files changed

+34
-20
lines changed

7 files changed

+34
-20
lines changed

.coveragerc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[run]
2+
omit = .tox/*
3+
4+
[report]
5+
show_missing = True

.travis.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ jobs:
1313
if: tag IS present
1414
python: *latest_py3
1515
before_script: skip
16-
env:
17-
- TWINE_USERNAME=jaraco
18-
# TWINE_PASSWORD
19-
- secure: Ud9UIW92Gdg2eZpuA9UwC0YjanRaD9CTpKXoLT9Cjp5C2rufwiZd8K/LXK6P6x/nVyLJ8+7HR+TQTReoO2c6kt2vVkA9i3KE2N/bD9PXQo80NwMWepFkRBJh28M9x3fGeQTYRegx3cUWVh4gaa9ZFZBwSjnRZvTtvQh1WhEvHWFzBkb/8CkifmQPmdEYT4D0JBskBAtC295G6p3FukcSdzKlDljY1G4m2ZDqUepYC0R0mr5vDz9JxbJ4axxUvvy7hVd5vrI6xshUc1lRYGocfTcc0IBCq8kw2nzG+KK06axBGFMqCioT4ohUFWB1sLj8pbwpc0uCLtjIBE9OnFZFt52ZKuJcJFAZwiQ3Mxnpg+WC39mrD+jAyIOBDIp/5+2JDCPGyD2i8RuBJrt1CzMqno+Y0K5H2g3XD7E+pclFgyj21JhqUzRAvYE9gbA6561PyFoi+JEFbk5eiNYRdWjp/7XJJSNWB3tDC6hbEAIGQLY2ZcZjnURKN92AC7361negFgwEaaCRUeHx3g7k/wrR/16Po3kFFb/vzQ4ygMxH0lVzzQ0M81121zl4fJPzs/klnBVcf4YOph8Gm6md3ARJu7CKDV2bt2Qr/TObroYFe/flAWZ+KM5DTFqd1dediYrrdVMDuvwSUn1kDjpRnrcI/v0MeT1Vx5v2yekS8iucwCY=
20-
- TOX_TESTENV_PASSENV="TWINE_USERNAME TWINE_PASSWORD"
2116
script: tox -e release
2217

2318
cache: pip

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cache:
1818
- '%LOCALAPPDATA%\pip\Cache'
1919

2020
test_script:
21-
- "python -m pip install tox tox-venv"
21+
- "python -m pip install -U tox tox-venv virtualenv"
2222
- "tox"
2323

2424
version: '{build}'

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[pytest]
22
norecursedirs=dist build .tox .eggs
3-
addopts=--doctest-modules --flake8 --black
3+
addopts=--doctest-modules --flake8 --black --cov
44
doctest_optionflags=ALLOW_UNICODE ELLIPSIS
55
filterwarnings=
66
ignore:Possible nested set::pycodestyle:113

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ testing =
3131
pytest-checkdocs
3232
pytest-flake8
3333
pytest-black-multipy
34+
pytest-cov
3435

3536
# local
3637
pytest-virtualenv

skeleton.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,7 @@ Relies a .flake8 file to correct some default behaviors:
103103

104104
## Continuous Integration
105105

106-
The project is pre-configured to run tests in [Travis-CI](https://travis-ci.org) (.travis.yml). Any new project must be enabled either through their web site or with the `travis enable` command. In addition to running tests, an additional deploy stage is configured to automatically release tagged commits. The username and password for PyPI must be configured for each project using the `travis` command and only after the travis project is created. As releases are cut with [twine](https://pypi.org/project/twine), the two values are supplied through the `TWINE_USERNAME` and `TWINE_PASSWORD`. To configure the latter as a secret, run the following command:
107-
108-
```
109-
echo "TWINE_PASSWORD={password}" | travis encrypt
110-
```
111-
112-
Or disable it in the CI definition and configure it through the web UI.
106+
The project is pre-configured to run tests in [Travis-CI](https://travis-ci.org) (.travis.yml). Any new project must be enabled either through their web site or with the `travis enable` command.
113107

114108
Features include:
115109
- test against Python 2 and 3
@@ -118,6 +112,14 @@ Features include:
118112

119113
Also provided is a minimal template for running under Appveyor (Windows).
120114

115+
### Continuous Deployments
116+
117+
In addition to running tests, an additional deploy stage is configured to automatically release tagged commits to PyPI using [API tokens](https://pypi.org/help/#apitoken). The release process expects an authorized token to be configured with Travis as the TWINE_PASSWORD environment variable. After the Travis project is created, configure the token through the web UI or with a command like the following (bash syntax):
118+
119+
```
120+
TWINE_PASSWORD={token} travis env copy TWINE_PASSWORD
121+
```
122+
121123
## Building Documentation
122124

123125
Documentation is automatically built by [Read the Docs](https://readthedocs.org) when the project is registered with it, by way of the .readthedocs.yml file. To test the docs build manually, a tox env may be invoked as `tox -e build-docs`. Both techniques rely on the dependencies declared in `setup.cfg/options.extras_require.docs`.
@@ -127,3 +129,9 @@ In addition to building the sphinx docs scaffolded in `docs/`, the docs build a
127129
## Cutting releases
128130

129131
By default, tagged commits are released through the continuous integration deploy stage.
132+
133+
Releases may also be cut manually by invoking the tox environment `release` with the PyPI token set as the TWINE_PASSWORD:
134+
135+
```
136+
TWINE_PASSWORD={token} tox -e release
137+
```

tox.ini

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ envlist = python
33
minversion = 3.2
44
# https://github.com/jaraco/skeleton/issues/6
55
tox_pip_extensions_ext_venv_update = true
6+
# Ensure that a late version of pip is used even on tox-venv.
7+
requires =
8+
tox-pip-version>=0.0.6
9+
tox-venv
10+
611

712
[testenv]
813
deps =
914
setuptools>=31.0.1
10-
# workaround for https://github.com/manahl/pytest-plugins/issues/110
11-
pytest < 4
12-
# workaround for https://github.com/manahl/pytest-plugins/issues/122
13-
virtualenv
15+
pip_version = pip
1416
commands =
1517
pytest {posargs}
1618
usedevelop = True
@@ -28,9 +30,12 @@ commands =
2830
skip_install = True
2931
deps =
3032
pep517>=0.5
31-
# workaround for https://github.com/pypa/twine/issues/423
32-
git+https://github.com/pypa/twine
33+
twine>=1.13
3334
path.py
35+
passenv =
36+
TWINE_PASSWORD
37+
setenv =
38+
TWINE_USERNAME = {env:TWINE_USERNAME:__token__}
3439
commands =
3540
python -c "import path; path.Path('dist').rmtree_p()"
3641
python -m pep517.build .

0 commit comments

Comments
 (0)