-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
137 additions
and
136 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,27 @@ | ||
name: Tests | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8, 3.9, pypy-3.7] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
if [ '${{ matrix.python-version }}' = '3.9' ] ; then \ | ||
sudo apt-get install graphviz libgraphviz-dev ; \ | ||
fi | ||
- name: Test with Tox | ||
run: tox |
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -15,22 +15,22 @@ author = Matt Bogosian | |
author_email = [email protected] | ||
# From <https://pypi.python.org/pypi?%3Aaction=list_classifiers> | ||
classifiers = | ||
Topic :: Education | ||
Topic :: Games/Entertainment | ||
Topic :: Scientific/Engineering :: Mathematics | ||
Topic :: Software Development :: Libraries :: Python Modules | ||
Development Status :: 4 - Beta | ||
Intended Audience :: Developers | ||
Intended Audience :: Education | ||
Intended Audience :: Science/Research | ||
License :: OSI Approved :: MIT License | ||
Operating System :: OS Independent | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Programming Language :: Python :: Implementation :: CPython | ||
Programming Language :: Python :: Implementation :: PyPy | ||
Topic :: Education | ||
Topic :: Games/Entertainment | ||
Topic :: Scientific/Engineering :: Mathematics | ||
Topic :: Software Development :: Libraries :: Python Modules | ||
Development Status :: 4 - Beta | ||
Intended Audience :: Developers | ||
Intended Audience :: Education | ||
Intended Audience :: Science/Research | ||
License :: OSI Approved :: MIT License | ||
Operating System :: OS Independent | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Programming Language :: Python :: Implementation :: CPython | ||
Programming Language :: Python :: Implementation :: PyPy | ||
license = MIT License | ||
description = Simple Python tools for exploring dice outcomes and other finite discrete probabilities | ||
long_description = file: README | ||
|
@@ -39,7 +39,7 @@ long_description_content_type = text/markdown; charset=UTF-8 | |
[options] # --------------------------------------------------------------------------- | ||
|
||
install_requires = | ||
typing-extensions>=3.10;python_version<'3.9' | ||
typing-extensions>=3.10;python_version<'3.9' | ||
packages = dyce | ||
|
||
[options.package_data] # -------------------------------------------------------------- | ||
|
@@ -49,124 +49,125 @@ packages = dyce | |
[options.extras_require] # ------------------------------------------------------------ | ||
|
||
dev = | ||
beartype>=0.8 | ||
mike | ||
# See: | ||
# * <https://github.com/mkdocs/mkdocs/issues/2448> | ||
# * <https://github.com/mkdocstrings/mkdocstrings/issues/295> | ||
mkdocs!=1.2 | ||
mkdocs-exclude | ||
mkdocs-material | ||
mkdocstrings | ||
mypy | ||
numpy | ||
pre-commit | ||
pytest-gitignore | ||
sympy | ||
tox | ||
twine | ||
beartype>=0.8 | ||
mike | ||
# See: | ||
# * <https://github.com/mkdocs/mkdocs/issues/2448> | ||
# * <https://github.com/mkdocstrings/mkdocstrings/issues/295> | ||
mkdocs!=1.2 | ||
mkdocs-exclude | ||
mkdocs-material | ||
mkdocstrings | ||
mypy | ||
numpy | ||
pre-commit | ||
pytest-gitignore | ||
sympy | ||
tox | ||
twine | ||
|
||
[tox:tox] # --------------------------------------------------------------------------- | ||
|
||
envlist = check, py{39,38}-lint{,-beartype} py39 py39-beartype-matplotlib py{38,37,py39,py38,py37}-beartype | ||
envlist = check, py{37,38,py3}-beartype, py39-lint{,-beartype}, py39{,-beartype-matplotlib} | ||
skipsdist = true | ||
skip_missing_interpreters = true | ||
|
||
[gh-actions] # ------------------------------------------------------------------------ | ||
|
||
python = | ||
3.7: py37-beartype | ||
3.8: py38-beartype | ||
3.9: check, py39-lint{,-beartype}, py39{,-beartype-matplotlib} | ||
pypy-3.7: pypy3-beartype | ||
|
||
[testenv] # --------------------------------------------------------------------------- | ||
|
||
commands = | ||
pytest --cov=dyce {posargs} | ||
pytest --cov=dyce {posargs} | ||
deps = | ||
--editable . | ||
beartype: beartype>=0.8 | ||
matplotlib: matplotlib | ||
!pypy37-!pypy38-!pypy39: numpy | ||
pytest-cov | ||
# Because ${HOME} is not passed, ~/.gitconfig is not read. To overcome this, port | ||
# any desired user-specific exclusion configuration to .git/config. E.G.: | ||
# | ||
# [core] | ||
# excludesfile = /home/username/.gitignore | ||
# | ||
# Alternatively, add entries directly to .git/info/exclude. See also mkdocs-exclude | ||
# below. | ||
pytest-gitignore | ||
sympy | ||
--editable . | ||
beartype: beartype>=0.8 | ||
matplotlib: matplotlib | ||
!pypy3-!pypy37: numpy | ||
pytest-cov | ||
# Because ${HOME} is not passed, ~/.gitconfig is not read. To overcome this, port any | ||
# desired user-specific exclusion configuration to .git/config. E.G.: | ||
# | ||
# [core] | ||
# excludesfile = /home/username/.gitignore | ||
# | ||
# Alternatively, add entries directly to .git/info/exclude. See also mkdocs-exclude | ||
# below. | ||
pytest-gitignore | ||
sympy | ||
platform = | ||
darwin: darwin | ||
linux: linux | ||
other: .+ | ||
setenv = | ||
PYTHONWARNINGS = once | ||
|
||
[testenv:pypy{37,38,39}{,-beartype}] # ------------------------------------------------ | ||
PYTHONWARNINGS = {env:PYTHONWARNINGS:ignore} | ||
|
||
basepython = | ||
pypy37: pypy-3.7 | ||
pypy38: pypy-3.8 | ||
pypy39: pypy-3.9 | ||
[testenv:check] # --------------------------------------------------------------------- | ||
|
||
[testenv:check] # ---------------------------------------------------- | ||
|
||
basepython = {env:PYTHON:python} | ||
commands = | ||
rm -frv site | ||
make -C docs/img | ||
mkdocs build --strict | ||
python -c 'from setuptools import setup ; setup()' sdist | ||
twine check dist/* | ||
rm -frv site | ||
make -C docs/img | ||
mkdocs build --strict | ||
python -c 'from setuptools import setup ; setup()' sdist | ||
twine check dist/* | ||
deps = | ||
graphviz | ||
matplotlib | ||
mike | ||
# See <https://github.com/mkdocs/mkdocs/issues/2448> | ||
# See <https://github.com/mkdocstrings/mkdocstrings/issues/295> | ||
mkdocs!=1.2 | ||
# See pytest-gitignore note above | ||
mkdocs-exclude | ||
mkdocs-material | ||
mkdocstrings | ||
sympy | ||
twine | ||
# pylint contains pyreverse | ||
pygraphviz | ||
pylint | ||
setenv = | ||
PYTHONWARNINGS = ignore | ||
--editable . | ||
graphviz | ||
matplotlib | ||
mike | ||
# See <https://github.com/mkdocs/mkdocs/issues/2448> | ||
# See <https://github.com/mkdocstrings/mkdocstrings/issues/295> | ||
mkdocs!=1.2 | ||
# See pytest-gitignore note above | ||
mkdocs-exclude | ||
mkdocs-material | ||
mkdocstrings | ||
sympy | ||
twine | ||
pygraphviz | ||
# pylint contains pyreverse | ||
pylint | ||
whitelist_externals = | ||
git | ||
make | ||
rm | ||
git | ||
make | ||
rm | ||
|
||
[testenv:py{39,38}-lint{,-beartype}] # ------------------------------------------------ | ||
|
||
commands = | ||
pre-commit run --all-files --show-diff-on-failure | ||
beartype: mypy --config-file={toxinidir}/.mypy.ini --warn-unused-ignores . | ||
!beartype: mypy --config-file={toxinidir}/.mypy.ini . | ||
{toxinidir}/helpers/mypy-doctests.py -a=--config-file={toxinidir}/.mypy.ini . | ||
pre-commit run --all-files --show-diff-on-failure | ||
beartype: mypy --config-file={toxinidir}/.mypy.ini --warn-unused-ignores . | ||
!beartype: mypy --config-file={toxinidir}/.mypy.ini . | ||
{toxinidir}/helpers/mypy-doctests.py -a=--config-file={toxinidir}/.mypy.ini . | ||
deps = | ||
beartype: beartype>=0.8 | ||
matplotlib: matplotlib | ||
mypy | ||
pre-commit | ||
sympy | ||
setenv = | ||
PYTHONWARNINGS = ignore | ||
beartype: beartype>=0.8 | ||
matplotlib: matplotlib | ||
mypy | ||
pre-commit | ||
sympy | ||
|
||
[flake8] # ---------------------------------------------------------------------------- | ||
|
||
# See: | ||
# * <https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes> | ||
# * <https://flake8.readthedocs.io/en/latest/user/error-codes.html> | ||
ignore = | ||
E124, # closing bracket does not match visual indentation | ||
E128, # continuation line under-indented for visual indent | ||
E203, # whitespace before ':' | ||
E301, # expected 1 blank line, found ... | ||
E302, # expected 2 blank lines, found ... | ||
E305, # expected 2 blank lines after end of function or class | ||
E402, # module level import not at top of file | ||
E501, # line too long (... > ... characters) | ||
E701, # multiple statements on one line (colon) | ||
E704, # multiple statements on one line (def) | ||
W503 # line break occurred before a binary operator | ||
E124, # closing bracket does not match visual indentation | ||
E128, # continuation line under-indented for visual indent | ||
E203, # whitespace before ':' | ||
E301, # expected 1 blank line, found ... | ||
E302, # expected 2 blank lines, found ... | ||
E305, # expected 2 blank lines after end of function or class | ||
E402, # module level import not at top of file | ||
E501, # line too long (... > ... characters) | ||
E701, # multiple statements on one line (colon) | ||
E704, # multiple statements on one line (def) | ||
W503 # line break occurred before a binary operator | ||
|
||
[tool:pytest] # ----------------------------------------------------------------------- | ||
|
||
|