Skip to content

Commit

Permalink
Further tidying and actions that will pass
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmavirus24 committed Oct 14, 2021
1 parent 2fc236c commit a62e209
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 81 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,12 @@ jobs:
strategy:
matrix:
include:
# linux
- os: ubuntu-latest
python: 3.6
toxenv: py
- os: ubuntu-latest
python: 3.7
toxenv: py
- os: ubuntu-latest
python: 3.8
toxenv: py
- os: ubuntu-latest
python: 3.9
toxenv: py
- os: ubuntu-latest
python: '3.10.0'
toxenv: py
# windows
- os: windows-latest
python: 3.6
toxenv: py
# misc
toxenv: flake8
- os: ubuntu-latest
python: 3.9
toxenv: flake8
toxenv: pre-commit
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[metadata]
name = flake8_json
version = attr: flake8_json_reporter.__version__
description = JSON Formatting Reporter plugin for Flake8
long_description = file: README.rst
long_description_content_type = text/x-rst
Expand Down Expand Up @@ -29,6 +30,8 @@ classifiers =
packages = find:
python_requires = >=3.6
include_package_data = True
package_dir =
=src

[options.packages.find]
where = src/
Expand Down
14 changes: 3 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,8 @@
import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(__file__), "src")) # noqa

import flake8_json_reporter
import setuptools

setuptools.setup(
version=flake8_json_reporter.__version__,
# NOTE(sigmavirus24): Remove this and uncomment the lines in setup.cfg
# after https://github.com/pypa/setuptools/issues/1136 is fixed
package_dir={
"": "src/",
},
)
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "src"))

setuptools.setup()
52 changes: 2 additions & 50 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
[tox]
minversion=2.3.1
envlist = py36,py37,py38,py39,py310,linters
minversion = 2.3.1
envlist = flake8,pre-commit

[testenv]
deps =
mock>=2.0.0
pytest!=3.0.5
coverage
commands =
coverage run --parallel-mode -m pytest {posargs}
coverage combine
coverage report -m

[testenv:venv]
deps =
Expand All @@ -30,48 +24,6 @@ deps =
commands =
flake8 src/flake8_json_reporter/ setup.py

[testenv:pylint]
basepython = python3
skip_install = true
deps =
pyflakes
pylint
commands =
pylint src/flake8_json_reporter/

[testenv:doc8]
basepython = python3
skip_install = true
deps =
sphinx
doc8
commands =
doc8 docs/source/

[testenv:bandit]
basepython = python3
skip_install = true
deps =
bandit
commands =
bandit -r src/flake8_json_reporter/ -c .bandit.yml

[testenv:linters]
basepython = python3
skip_install = true
deps =
{[testenv:flake8]deps}
{[testenv:pylint]deps}
{[testenv:doc8]deps}
{[testenv:readme]deps}
{[testenv:bandit]deps}
commands =
{[testenv:flake8]commands}
{[testenv:pylint]commands}
{[testenv:doc8]commands}
{[testenv:readme]commands}
{[testenv:bandit]commands}

[testenv:readme]
basepython = python3
deps =
Expand Down

0 comments on commit a62e209

Please sign in to comment.