Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This file is managed by 'repo_helper'. Don't edit it directly.
---
name: Flake8

on:
push:
pull_request:
branches: ["master"]

jobs:
Run:
name: "Flake8"
runs-on: "ubuntu-18.04"

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"

- name: Setup Python 🐍
uses: "actions/setup-python@v2"
with:
python-version: "3.8"

- name: Install dependencies 🔧
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox

- name: "Run Flake8"
run: "python -m tox -e lint -- --format github"
36 changes: 36 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This file is managed by 'repo_helper'. Don't edit it directly.
---
name: mypy

on:
push:
pull_request:
branches: ["master"]

jobs:
Run:
name: "mypy"
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"

- name: Setup Python 🐍
uses: "actions/setup-python@v2"
with:
python-version: "3.8"

- name: Install dependencies 🔧
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox

- name: "Run mypy"
run: "python -m tox -e mypy"
1 change: 1 addition & 0 deletions .github/workflows/octocheese.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ jobs:
pypi_name: "consolekit"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
if: startsWith(github.ref, 'refs/tags/') != true
19 changes: 12 additions & 7 deletions .github/workflows/python_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,35 @@ on:

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
name: "Python ${{ matrix.config.python-version }}"
runs-on: "windows-2019"
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9'

strategy:
fail-fast: False
matrix:
python-version: ["3.6","3.7","3.8","3.9"]
config:
- {python-version: "3.6", testenvs: "py36,build"}
- {python-version: "3.7", testenvs: "py37,build"}
- {python-version: "3.8", testenvs: "py38,build"}
- {python-version: "3.9", testenvs: "py39,build"}

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"

- name: Setup Python 🐍
uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
python-version: "${{ matrix.config.python-version }}"

- name: Install dependencies 🔧
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox tox-gh-actions virtualenv

python -m pip install --upgrade tox virtualenv

- name: "Run Tests for Python ${{ matrix.python-version }}"
run: "python -m tox"
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
run: "python -m tox -e ${{ matrix.config.testenvs }}"
21 changes: 14 additions & 7 deletions .github/workflows/python_ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,46 @@ on:

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
name: "Python ${{ matrix.config.python-version }}"
runs-on: "ubuntu-18.04"
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9,pypy3'

strategy:
fail-fast: False
matrix:
python-version: ["3.6","3.7","3.8","3.9","pypy3"]
config:
- {python-version: "3.6", testenvs: "py36,build"}
- {python-version: "3.7", testenvs: "py37,build"}
- {python-version: "3.8", testenvs: "py38,build"}
- {python-version: "3.9", testenvs: "py39,build"}
- {python-version: "pypy3", testenvs: "pypy3,build"}

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"

- name: Setup Python 🐍
uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
python-version: "${{ matrix.config.python-version }}"

- name: Install dependencies 🔧
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox tox-gh-actions virtualenv
python -m pip install --upgrade tox virtualenv
python -m pip install --upgrade coverage_pyver_pragma

- name: "Run Tests for Python ${{ matrix.python-version }}"
run: "python -m tox"
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
run: "python -m tox -e ${{ matrix.config.testenvs }}"


- name: "Upload Coverage"
uses: actions/upload-artifact@v2
with:
name: "coverage-${{ matrix.python-version }}"
name: "coverage-${{ matrix.config.python-version }}"
path: .coverage


Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/python_ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,36 @@ on:

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
name: "Python ${{ matrix.config.python-version }}"
runs-on: "macos-latest"
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9,pypy3'

strategy:
fail-fast: False
matrix:
python-version: ["3.6","3.7","3.8","3.9","pypy3"]
config:
- {python-version: "3.6", testenvs: "py36,build"}
- {python-version: "3.7", testenvs: "py37,build"}
- {python-version: "3.8", testenvs: "py38,build"}
- {python-version: "3.9", testenvs: "py39,build"}
- {python-version: "pypy3", testenvs: "pypy3,build"}

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"

- name: Setup Python 🐍
uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
python-version: "${{ matrix.config.python-version }}"

- name: Install dependencies 🔧
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox tox-gh-actions virtualenv

python -m pip install --upgrade tox virtualenv

- name: "Run Tests for Python ${{ matrix.python-version }}"
run: "python -m tox"
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
run: "python -m tox -e ${{ matrix.config.testenvs }}"
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ repos:
rev: v1.7.0
hooks:
- id: python-no-eval
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal

- repo: https://github.com/asottile/pyupgrade
rev: v2.7.4
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Spun out from `repo_helper <https://github.com/domdfcoding/repo_helper>`_. Needs
- |license| |language| |requires| |pre_commit|

.. |docs| image:: https://img.shields.io/readthedocs/consolekit/latest?logo=read-the-docs
:target: https://consolekit.readthedocs.io/en/latest/?badge=latest
:target: https://consolekit.readthedocs.io/en/latest
:alt: Documentation Build Status

.. |docs_check| image:: https://github.com/domdfcoding/consolekit/workflows/Docs%20Check/badge.svg
Expand Down
2 changes: 0 additions & 2 deletions doc-source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@
templates_path = ["_templates"]
html_static_path = ["_static"]
source_suffix = ".rst"
exclude_patterns = []

master_doc = "index"
suppress_warnings = ["image.nonlocal_uri"]
pygments_style = "default"
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ long_description_content_type = text/x-rst
platforms = Windows, macOS, Linux
url = https://github.com/domdfcoding/consolekit
project_urls =
Documentation = https://consolekit.readthedocs.io
Documentation = https://consolekit.readthedocs.io/en/latest
Issue_Tracker = https://github.com/domdfcoding/consolekit/issues
Source_Code = https://github.com/domdfcoding/consolekit
classifiers =
Expand Down
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
coverage>=5.1
coverage-pyver-pragma>=0.0.6
domdf-python-tools[testing]>=1.5.0
domdf-python-tools[testing]>=1.6.0
iniconfig!=1.1.0,>=1.0.1
pytest>=6.0.0
pytest-cov>=2.8.1
Expand Down
11 changes: 6 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cov = py36, coverage

[gh-actions]
python =
3.6: py36, build, mypy
3.6: py36, build
3.7: py37, build
3.8: py38, build
3.9: py39, build
Expand Down Expand Up @@ -77,6 +77,7 @@ deps =
flake8-builtins>=1.5.3
flake8-docstrings>=1.5.0
flake8-dunder-all>=0.1.1
flake8-github-actions>=0.1.0
flake8-pyi>=20.10.0
flake8-pytest-style>=1.3.0
flake8-sphinx-links>=0.0.4
Expand All @@ -85,9 +86,9 @@ deps =
git+https://github.com/PyCQA/pydocstyle@5118faa7173b0e5bbc230c4adf628758e13605bf
git+https://github.com/domdfcoding/flake8-quotes.git
git+https://github.com/domdfcoding/flake8-rst-docstrings.git
git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git
git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git@v2
pygments>=2.7.1
commands = python3 -m flake8_rst_docstrings_sphinx consolekit tests --allow-toolbox
commands = python3 -m flake8_rst_docstrings_sphinx consolekit tests --allow-toolbox {posargs}

[testenv:mypy]
basepython = python3.6
Expand Down Expand Up @@ -124,8 +125,8 @@ commands =

[flake8]
max-line-length = 120
select = E301 E303 E304 E305 E306 E502 W291 W293 W391 E226 E225 E241 E231 W292 E265 E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E227 E228 E242 E251 E261 E262 E271 E272 E402 E703 E711 E712 E713 E714 E721 W504 E302 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000
exclude = .git,__pycache__,doc-source,old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py,.tox,venv
select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E301 E302 E303 E304 E305 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000
exclude = doc-source,.git,__pycache__,old,build,dist,__pkginfo__.py,setup.py,.tox,venv
rst-directives =
TODO
envvar
Expand Down