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

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Oct 26, 2019
2 parents cd4ea07 + c169e5e commit d4a388e
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 20 deletions.
5 changes: 5 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[run]
omit = .tox/*

[report]
show_missing = True
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ jobs:
if: tag IS present
python: *latest_py3
before_script: skip
env:
- TWINE_USERNAME=jaraco
# TWINE_PASSWORD
- 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=
- TOX_TESTENV_PASSENV="TWINE_USERNAME TWINE_PASSWORD"
script: tox -e release

cache: pip
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cache:
- '%LOCALAPPDATA%\pip\Cache'

test_script:
- "python -m pip install tox tox-venv"
- "python -m pip install -U tox tox-venv virtualenv"
- "tox"

version: '{build}'
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[pytest]
norecursedirs=dist build .tox .eggs
addopts=--doctest-modules --flake8 --black
addopts=--doctest-modules --flake8 --black --cov
doctest_optionflags=ALLOW_UNICODE ELLIPSIS
filterwarnings=
ignore:Possible nested set::pycodestyle:113
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ testing =
pytest-checkdocs
pytest-flake8
pytest-black-multipy
pytest-cov

# local
pytest-virtualenv
Expand Down
22 changes: 15 additions & 7 deletions skeleton.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,7 @@ Relies a .flake8 file to correct some default behaviors:

## Continuous Integration

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:

```
echo "TWINE_PASSWORD={password}" | travis encrypt
```

Or disable it in the CI definition and configure it through the web UI.
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.

Features include:
- test against Python 2 and 3
Expand All @@ -118,6 +112,14 @@ Features include:

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

### Continuous Deployments

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):

```
TWINE_PASSWORD={token} travis env copy TWINE_PASSWORD
```

## Building Documentation

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`.
Expand All @@ -127,3 +129,9 @@ In addition to building the sphinx docs scaffolded in `docs/`, the docs build a
## Cutting releases

By default, tagged commits are released through the continuous integration deploy stage.

Releases may also be cut manually by invoking the tox environment `release` with the PyPI token set as the TWINE_PASSWORD:

```
TWINE_PASSWORD={token} tox -e release
```
17 changes: 11 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ envlist = python
minversion = 3.2
# https://github.com/jaraco/skeleton/issues/6
tox_pip_extensions_ext_venv_update = true
# Ensure that a late version of pip is used even on tox-venv.
requires =
tox-pip-version>=0.0.6
tox-venv


[testenv]
deps =
setuptools>=31.0.1
# workaround for https://github.com/manahl/pytest-plugins/issues/110
pytest < 4
# workaround for https://github.com/manahl/pytest-plugins/issues/122
virtualenv
pip_version = pip
commands =
pytest {posargs}
usedevelop = True
Expand All @@ -28,9 +30,12 @@ commands =
skip_install = True
deps =
pep517>=0.5
# workaround for https://github.com/pypa/twine/issues/423
git+https://github.com/pypa/twine
twine>=1.13
path.py
passenv =
TWINE_PASSWORD
setenv =
TWINE_USERNAME = {env:TWINE_USERNAME:__token__}
commands =
python -c "import path; path.Path('dist').rmtree_p()"
python -m pep517.build .
Expand Down

0 comments on commit d4a388e

Please sign in to comment.