Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Nov 20, 2020
2 parents e2bb8bd + 95ce6f3 commit 996da67
Show file tree
Hide file tree
Showing 16 changed files with 130 additions and 187 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Automated Tests

on: [push, pull_request]

jobs:
test:
strategy:
matrix:
python: [3.6, 3.8, 3.9]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install tox
run: |
python -m pip install tox
- name: Run tests
run: tox

release:
needs: test
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install tox
run: |
python -m pip install tox
- name: Release
run: tox -e release
env:
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
repos:
- repo: https://github.com/psf/black
rev: 19.10b0
rev: stable
hooks:
- id: black

- repo: https://github.com/asottile/blacken-docs
rev: v1.4.0
rev: v1.8.0
hooks:
- id: blacken-docs
9 changes: 5 additions & 4 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
version: 2
python:
version: 3
extra_requirements:
- docs
pip_install: true
install:
- path: .
extra_requirements:
- docs
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

18 changes: 15 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
Copyright Jason R. Coombs

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
14 changes: 6 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
.. image:: https://img.shields.io/pypi/v/jaraco.context.svg
:target: https://pypi.org/project/jaraco.context
:target: `PyPI link`_

.. image:: https://img.shields.io/pypi/pyversions/jaraco.context.svg
:target: `PyPI link`_

.. image:: https://dev.azure.com/jaraco/jaraco.context/_apis/build/status/jaraco.jaraco.context?branchName=master
:target: https://dev.azure.com/jaraco/jaraco.context/_build/latest?definitionId=1&branchName=master
.. _PyPI link: https://pypi.org/project/jaraco.context

.. image:: https://img.shields.io/travis/jaraco/jaraco.context/master.svg
:target: https://travis-ci.org/jaraco/jaraco.context
.. image:: https://github.com/jaraco/jaraco.context/workflows/Automated%20Tests/badge.svg
:target: https://github.com/jaraco/jaraco.context/actions?query=workflow%3A%22Automated+Tests%22
:alt: Automated Tests

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code style: Black

.. .. image:: https://img.shields.io/appveyor/ci/jaraco/jaraco-context/master.svg
.. :target: https://ci.appveyor.com/project/jaraco/jaraco-context/branch/master
.. image:: https://readthedocs.org/projects/jaracocontext/badge/?version=latest
:target: https://jaracocontext.readthedocs.io/en/latest/?badge=latest
24 changes: 0 additions & 24 deletions appveyor.yml

This file was deleted.

71 changes: 0 additions & 71 deletions azure-pipelines.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
url='{package_url}/issues/{issue}',
),
dict(
pattern=r'^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n',
pattern=r'(?m:^((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n)',
with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n',
),
dict(
Expand Down
2 changes: 2 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[mypy]
ignore_missing_imports = True
18 changes: 17 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
[build-system]
requires = ["setuptools>=34.4", "wheel", "setuptools_scm>=1.15"]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4.1"]
build-backend = "setuptools.build_meta"

[tool.black]
skip-string-normalization = true

[tool.setuptools_scm]

# jaraco/skeleton#22
[tool.jaraco.pytest.plugins.black]
addopts = "--black"

# jaraco/skeleton#22
[tool.jaraco.pytest.plugins.mypy]
addopts = "--mypy"

[tool.jaraco.pytest.plugins.flake8]
addopts = "--flake8"

[tool.jaraco.pytest.plugins.cov]
addopts = "--cov"
6 changes: 5 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[pytest]
norecursedirs=dist build .tox .eggs
addopts=--doctest-modules --flake8 --black --cov
addopts=--doctest-modules
doctest_optionflags=ALLOW_UNICODE ELLIPSIS
# workaround for warning pytest-dev/pytest#6178
junit_family=xunit2
filterwarnings=
# https://github.com/pytest-dev/pytest/issues/6928
ignore:direct construction of .*Item has been deprecated:DeprecationWarning
11 changes: 6 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[bdist_wheel]
universal = 1

[metadata]
license_file = LICENSE
name = jaraco.context
Expand All @@ -14,6 +11,7 @@ classifiers =
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only

[options]
packages = find:
Expand All @@ -23,16 +21,19 @@ install_requires =
jaraco.apt
yg.lockfile
contextlib2; python_version=="2.7"
setup_requires = setuptools_scm >= 1.15.0
setup_requires = setuptools_scm[toml] >= 3.4.1

[options.extras_require]
testing =
# upstream
pytest >= 3.5, !=3.7.3
pytest-checkdocs >= 1.2.3
pytest-flake8
pytest-black-multipy
pytest-black >= 0.3.7; python_implementation != "PyPy"
pytest-cov
pytest-mypy; python_implementation != "PyPy"
# jaraco/skeleton#22
jaraco.test >= 3.2.0

# local

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
import setuptools

if __name__ == "__main__":
setuptools.setup(use_scm_version=True)
setuptools.setup()

0 comments on commit 996da67

Please sign in to comment.