-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Collapse skeleton history. Workaround for jaraco/skeleton#87.
- Loading branch information
0 parents
commit c29955f
Showing
19 changed files
with
435 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[run] | ||
omit = | ||
# leading `*/` for pytest-dev/pytest-cov#456 | ||
*/.tox/* | ||
disable_warnings = | ||
couldnt-parse | ||
|
||
[report] | ||
show_missing = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = tab | ||
indent_size = 4 | ||
insert_final_newline = true | ||
end_of_line = lf | ||
|
||
[*.py] | ||
indent_style = space | ||
max_line_length = 88 | ||
|
||
[*.{yml,yaml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.rst] | ||
indent_style = space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
allow: | ||
- dependency-type: "all" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
name: tests | ||
|
||
on: [push, pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
# Environment variables to support color support (jaraco/skeleton#66): | ||
# Request colored output from CLI tools supporting it. Different tools | ||
# interpret the value differently. For some, just being set is sufficient. | ||
# For others, it must be a non-zero integer. For yet others, being set | ||
# to a non-empty value is sufficient. For tox, it must be one of | ||
# <blank>, 0, 1, false, no, off, on, true, yes. The only enabling value | ||
# in common is "1". | ||
FORCE_COLOR: 1 | ||
# MyPy's color enforcement (must be a non-zero number) | ||
MYPY_FORCE_COLOR: -42 | ||
# Recognized by the `py` package, dependency of `pytest` (must be "1") | ||
PY_COLORS: 1 | ||
# Make tox-wrapped tools see color requests | ||
TOX_TESTENV_PASSENV: >- | ||
FORCE_COLOR | ||
MYPY_FORCE_COLOR | ||
NO_COLOR | ||
PY_COLORS | ||
PYTEST_THEME | ||
PYTEST_THEME_MODE | ||
# Suppress noisy pip warnings | ||
PIP_DISABLE_PIP_VERSION_CHECK: 'true' | ||
PIP_NO_PYTHON_VERSION_WARNING: 'true' | ||
PIP_NO_WARN_SCRIPT_LOCATION: 'true' | ||
|
||
# Disable the spinner, noise in GHA; TODO(webknjaz): Fix this upstream | ||
# Must be "1". | ||
TOX_PARALLEL_NO_SPINNER: 1 | ||
|
||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
python: | ||
- "3.8" | ||
- "3.11" | ||
- "3.12" | ||
platform: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
include: | ||
- python: "3.9" | ||
platform: ubuntu-latest | ||
- python: "3.10" | ||
platform: ubuntu-latest | ||
- python: pypy3.9 | ||
platform: ubuntu-latest | ||
runs-on: ${{ matrix.platform }} | ||
continue-on-error: ${{ matrix.python == '3.12' }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
allow-prereleases: true | ||
- name: Install tox | ||
run: | | ||
python -m pip install tox | ||
- name: Run tests | ||
run: tox | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
env: | ||
TOXENV: docs | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- name: Install tox | ||
run: | | ||
python -m pip install tox | ||
- name: Run tests | ||
run: tox | ||
|
||
check: # This job does nothing and is only used for the branch protection | ||
if: always() | ||
|
||
needs: | ||
- test | ||
- docs | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Decide whether the needed jobs succeeded or failed | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} | ||
|
||
release: | ||
permissions: | ||
contents: write | ||
needs: | ||
- check | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 22.6.0 | ||
hooks: | ||
- id: black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: 2 | ||
python: | ||
install: | ||
- path: . | ||
extra_requirements: | ||
- docs | ||
|
||
# required boilerplate readthedocs/readthedocs.org#10401 | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
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 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. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.. image:: https://img.shields.io/pypi/v/PROJECT.svg | ||
:target: https://pypi.org/project/PROJECT | ||
|
||
.. image:: https://img.shields.io/pypi/pyversions/PROJECT.svg | ||
|
||
.. image:: https://github.com/PROJECT_PATH/workflows/tests/badge.svg | ||
:target: https://github.com/PROJECT_PATH/actions?query=workflow%3A%22tests%22 | ||
:alt: tests | ||
|
||
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json | ||
:target: https://github.com/astral-sh/ruff | ||
:alt: Ruff | ||
|
||
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg | ||
:target: https://github.com/psf/black | ||
:alt: Code style: Black | ||
|
||
.. .. image:: https://readthedocs.org/projects/PROJECT_RTD/badge/?version=latest | ||
.. :target: https://PROJECT_RTD.readthedocs.io/en/latest/?badge=latest | ||
.. image:: https://img.shields.io/badge/skeleton-2023-informational | ||
:target: https://blog.jaraco.com/skeleton |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
extensions = [ | ||
'sphinx.ext.autodoc', | ||
'jaraco.packaging.sphinx', | ||
] | ||
|
||
master_doc = "index" | ||
html_theme = "furo" | ||
|
||
# Link dates and other references in the changelog | ||
extensions += ['rst.linker'] | ||
link_files = { | ||
'../NEWS.rst': dict( | ||
using=dict(GH='https://github.com'), | ||
replace=[ | ||
dict( | ||
pattern=r'(Issue #|\B#)(?P<issue>\d+)', | ||
url='{package_url}/issues/{issue}', | ||
), | ||
dict( | ||
pattern=r'(?m:^((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n)', | ||
with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n', | ||
), | ||
dict( | ||
pattern=r'PEP[- ](?P<pep_number>\d+)', | ||
url='https://peps.python.org/pep-{pep_number:0>4}/', | ||
), | ||
], | ||
) | ||
} | ||
|
||
# Be strict about any broken references | ||
nitpicky = True | ||
|
||
# Include Python intersphinx mapping to prevent failures | ||
# jaraco/skeleton#51 | ||
extensions += ['sphinx.ext.intersphinx'] | ||
intersphinx_mapping = { | ||
'python': ('https://docs.python.org/3', None), | ||
} | ||
|
||
# Preserve authored syntax for defaults | ||
autodoc_preserve_defaults = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
:tocdepth: 2 | ||
|
||
.. _changes: | ||
|
||
History | ||
******* | ||
|
||
.. include:: ../NEWS (links).rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Welcome to |project| documentation! | ||
=================================== | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
history | ||
|
||
|
||
.. automodule:: PROJECT | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[mypy] | ||
ignore_missing_imports = True | ||
# required to support namespace packages | ||
# https://github.com/python/mypy/issues/14057 | ||
explicit_package_bases = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Require Python 3.8 or later. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[build-system] | ||
requires = ["setuptools>=56", "setuptools_scm[toml]>=3.4.1"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.black] | ||
skip-string-normalization = true | ||
|
||
[tool.setuptools_scm] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[pytest] | ||
norecursedirs=dist build .tox .eggs | ||
addopts=--doctest-modules | ||
filterwarnings= | ||
## upstream | ||
|
||
# Ensure ResourceWarnings are emitted | ||
default::ResourceWarning | ||
|
||
# shopkeep/pytest-black#55 | ||
ignore:<class 'pytest_black.BlackItem'> is not using a cooperative constructor:pytest.PytestDeprecationWarning | ||
ignore:The \(fspath. py.path.local\) argument to BlackItem is deprecated.:pytest.PytestDeprecationWarning | ||
ignore:BlackItem is an Item subclass and should not be a collector:pytest.PytestWarning | ||
|
||
# shopkeep/pytest-black#67 | ||
ignore:'encoding' argument not specified::pytest_black | ||
|
||
# realpython/pytest-mypy#152 | ||
ignore:'encoding' argument not specified::pytest_mypy | ||
|
||
# python/cpython#100750 | ||
ignore:'encoding' argument not specified::platform | ||
|
||
# pypa/build#615 | ||
ignore:'encoding' argument not specified::build.env | ||
|
||
## end upstream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
[metadata] | ||
name = PROJECT | ||
author = Jason R. Coombs | ||
author_email = jaraco@jaraco.com | ||
description = PROJECT_DESCRIPTION | ||
long_description = file:README.rst | ||
url = https://github.com/PROJECT_PATH | ||
classifiers = | ||
Development Status :: 5 - Production/Stable | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: MIT License | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3 :: Only | ||
|
||
[options] | ||
packages = find_namespace: | ||
include_package_data = true | ||
python_requires = >=3.8 | ||
install_requires = | ||
|
||
[options.packages.find] | ||
exclude = | ||
build* | ||
dist* | ||
docs* | ||
tests* | ||
|
||
[options.extras_require] | ||
testing = | ||
# upstream | ||
pytest >= 6 | ||
pytest-checkdocs >= 2.4 | ||
pytest-black >= 0.3.7; \ | ||
# workaround for jaraco/skeleton#22 | ||
python_implementation != "PyPy" | ||
pytest-cov | ||
pytest-mypy >= 0.9.1; \ | ||
# workaround for jaraco/skeleton#22 | ||
python_implementation != "PyPy" | ||
pytest-enabler >= 2.2 | ||
pytest-ruff | ||
|
||
# local | ||
|
||
docs = | ||
# upstream | ||
sphinx >= 3.5 | ||
jaraco.packaging >= 9 | ||
rst.linker >= 1.9 | ||
furo | ||
sphinx-lint | ||
|
||
# local | ||
|
||
[options.entry_points] |
Oops, something went wrong.