kopia lustrzana https://github.com/jedie/PyInventory
commit
9ba7613967
|
@ -23,6 +23,11 @@ jobs:
|
||||||
os: [ubuntu-latest] # TODO: macOS-latest, windows-latest
|
os: [ubuntu-latest] # TODO: macOS-latest, windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: 'fetch main'
|
||||||
|
run: |
|
||||||
|
git fetch origin main
|
||||||
- name: 'Set up Python ${{ matrix.python-version }}'
|
- name: 'Set up Python ${{ matrix.python-version }}'
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
|
|
Plik diff jest za duży
Load Diff
|
@ -69,7 +69,7 @@ postgres-binary = ["psycopg2-binary"]
|
||||||
psycopg2-source = ["psycopg2"]
|
psycopg2-source = ["psycopg2"]
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
dev_shell = ">=0.2.2" # https://github.com/jedie/dev-shell
|
dev_shell = "*" # https://github.com/jedie/dev-shell
|
||||||
poetry-publish = "*" # https://github.com/jedie/poetry-publish
|
poetry-publish = "*" # https://github.com/jedie/poetry-publish
|
||||||
python-creole = "*" # https://github.com/jedie/python-creole
|
python-creole = "*" # https://github.com/jedie/python-creole
|
||||||
cmd2_ext_test = "*"
|
cmd2_ext_test = "*"
|
||||||
|
@ -79,18 +79,24 @@ pytest-randomly = "*"
|
||||||
pytest-cov = "*"
|
pytest-cov = "*"
|
||||||
pytest-django = "*"
|
pytest-django = "*"
|
||||||
pytest-parallel = "*"
|
pytest-parallel = "*"
|
||||||
|
pytest-darker = "*" # https://github.com/akaihola/pytest-darker
|
||||||
|
pytest-flake8 = "*"
|
||||||
|
pytest-isort = "*"
|
||||||
|
# TODO: pytest-mypy = "*"
|
||||||
selenium = "*"
|
selenium = "*"
|
||||||
coveralls = "*"
|
coveralls = "*"
|
||||||
isort = "*"
|
isort = "*"
|
||||||
flake8 = "*"
|
flake8 = "*"
|
||||||
flynt = "*"
|
flynt = "*"
|
||||||
autopep8 = "*"
|
darker = "*" # https://github.com/akaihola/darker
|
||||||
|
black = "==21.12b0" # https://github.com/akaihola/darker/issues/264
|
||||||
pyupgrade = "*"
|
pyupgrade = "*"
|
||||||
model_bakery = "*" # https://github.com/model-bakers/model_bakery
|
model_bakery = "*" # https://github.com/model-bakers/model_bakery
|
||||||
beautifulsoup4 = "*"
|
beautifulsoup4 = "*"
|
||||||
lxml = "*"
|
lxml = "*"
|
||||||
requests-mock = "*"
|
requests-mock = "*"
|
||||||
|
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
devshell = 'inventory_project.dev_shell:devshell_cmdloop'
|
devshell = 'inventory_project.dev_shell:devshell_cmdloop'
|
||||||
run_testserver = 'inventory_project.manage:start_test_server'
|
run_testserver = 'inventory_project.manage:start_test_server'
|
||||||
|
@ -101,24 +107,33 @@ requires = ["poetry>=0.12"]
|
||||||
build-backend = "poetry.masonry.api"
|
build-backend = "poetry.masonry.api"
|
||||||
|
|
||||||
|
|
||||||
[tool.autopep8]
|
[tool.darker]
|
||||||
# https://github.com/hhatto/autopep8#pyprojecttoml
|
src = ['.']
|
||||||
max_line_length = 120
|
revision = "origin/main..."
|
||||||
exclude=".*,*/htmlcov/*,*/migrations/*,*/volumes/*"
|
line_length = 120
|
||||||
|
verbose = true
|
||||||
|
skip_string_normalization = true
|
||||||
|
diff = false
|
||||||
|
check = false
|
||||||
|
stdout = false
|
||||||
|
isort = true
|
||||||
|
lint = [
|
||||||
|
"flake8",
|
||||||
|
]
|
||||||
|
log_level = "INFO"
|
||||||
|
|
||||||
|
|
||||||
|
[tool.flynt]
|
||||||
|
line_length = 120
|
||||||
|
|
||||||
|
|
||||||
[tool.isort]
|
[tool.isort]
|
||||||
# https://pycqa.github.io/isort/docs/configuration/config_files/#pyprojecttoml-preferred-format
|
# https://pycqa.github.io/isort/docs/configuration/config_files/#pyprojecttoml-preferred-format
|
||||||
atomic=true
|
atomic=true
|
||||||
|
profile='black'
|
||||||
line_length=120
|
line_length=120
|
||||||
case_sensitive=false
|
|
||||||
skip_glob=[".*", "*/htmlcov/*","*/migrations/*","*/volumes/*"]
|
skip_glob=[".*", "*/htmlcov/*","*/migrations/*","*/volumes/*"]
|
||||||
multi_line_output=3
|
|
||||||
include_trailing_comma=true
|
|
||||||
known_first_party=["inventory","inventory_project","inventory_tests"]
|
known_first_party=["inventory","inventory_project","inventory_tests"]
|
||||||
no_lines_before="LOCALFOLDER"
|
|
||||||
default_section="THIRDPARTY"
|
|
||||||
sections=["FUTURE","STDLIB","THIRDPARTY","FIRSTPARTY","LOCALFOLDER"]
|
|
||||||
lines_after_imports=2
|
lines_after_imports=2
|
||||||
|
|
||||||
|
|
||||||
|
@ -153,12 +168,16 @@ addopts = """
|
||||||
--cov-report xml
|
--cov-report xml
|
||||||
--no-cov-on-fail
|
--no-cov-on-fail
|
||||||
--showlocals
|
--showlocals
|
||||||
|
--darker
|
||||||
|
--flake8
|
||||||
|
--isort
|
||||||
--doctest-modules
|
--doctest-modules
|
||||||
--failed-first
|
--failed-first
|
||||||
--last-failed-no-failures all
|
--last-failed-no-failures all
|
||||||
--new-first
|
--new-first
|
||||||
-p no:randomly
|
-p no:randomly
|
||||||
"""
|
"""
|
||||||
|
# TODO: --mypy
|
||||||
|
|
||||||
|
|
||||||
[tool.tox]
|
[tool.tox]
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
from dev_shell.utils.assertion import assert_is_file
|
|
||||||
|
|
||||||
import inventory
|
|
||||||
|
|
||||||
|
|
||||||
BASE_PATH = Path(inventory.__file__).parent.parent.parent
|
|
||||||
|
|
||||||
|
|
||||||
def test_lint():
|
|
||||||
dev_shell_py = BASE_PATH / 'devshell.py'
|
|
||||||
assert_is_file(dev_shell_py)
|
|
||||||
subprocess.check_call([sys.executable, str(dev_shell_py), 'linting'])
|
|
Ładowanie…
Reference in New Issue