Skip to content

Commit

Permalink
Merge pull request #12 from openweathermap/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
SerGeRybakov authored Aug 18, 2023
2 parents fe29bdc + 79a3f09 commit a475fe8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 71 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
checks:
uses: openweathermap/deker-actions/.github/workflows/checks.yml@master
with:
package-name: deker_shell
package-name: ${{ vars.PACKAGE_NAME }}
python-version: '3.9'
min-coverage: 63
min-coverage: 60
9 changes: 3 additions & 6 deletions .github/workflows/on_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ on:
tags:
- 'v[1-9]+.[0-9]+.[0-9]+'

env:
PACKAGE_NAME: deker_shell

jobs:
tox_tests:
uses: openweathermap/deker-actions/.github/workflows/tox.yml@master
with:
package-name: $PACKAGE_NAME
min-coverage: 63
package-name: ${{ vars.PACKAGE_NAME }}
min-coverage: 60

build_sdist:
needs: tox_tests
Expand All @@ -28,7 +25,7 @@ jobs:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/$PACKAGE_NAME
url: https://pypi.org/p/${{ vars.PACKAGE_NAME }}

steps:
- uses: actions/download-artifact@v3
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/on_test_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
tags-ignore:
- 'v[1-9]+.[0-9]+.[0-9]+'

env:
PACKAGE_NAME: deker_shell

jobs:
build_sdist:
name: Build test source distribution
Expand All @@ -21,7 +18,7 @@ jobs:
id-token: write
environment:
name: testpypi
url: https://test.pypi.org/p/$PACKAGE_NAME
url: https://test.pypi.org/p/${{ vars.PACKAGE_NAME }}

steps:
- uses: actions/download-artifact@v3
Expand Down
64 changes: 5 additions & 59 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ vcs = "git"
style = "semver"
metadata = false

[[tool.poetry.source]]
name = "PyPI"
priority = "primary"

[[tool.poetry.source]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
Expand Down Expand Up @@ -371,7 +375,7 @@ omit = [
directory = "tests/code_coverage"

[tool.coverage.report]
fail_under=63
fail_under=60
exclude_lines = [
"no cov",
"pragma: no cover",
Expand All @@ -384,61 +388,3 @@ exclude_lines = [
"except ModuleNotFoundError",
"except Exception"
]

[tool.tox] # tox
legacy_tox_ini = """
[tox]
requires =
tox>=4
env_list = {py39,py310,py311}-lint, py{39,310,311}-test
[testenv:{py39,py310,py311}-test]
description = run unit tests
deps =
deepdiff==6.3.0
coverage==7.1.0
pytest==7.2.1
pytest-sugar==0.9.6
pytest-mock==3.10.0
pytest-random-order==1.1.0
deker>=1.0.0
commands =
coverage run -m pytest {posargs:tests} --random-order
coverage report --fail-under=63
set_env =
PIP_EXTRA_INDEX_URL = {env:PIP_EXTRA_INDEX_URL}
[testenv:{py39,py310,py311}-lint]
ignore_base_python_conflict = true
description = run linters
deps = black==23.1.0
Flake8-pyproject==1.2.3
darglint==1.8.1
doc8==0.11.2
flake8==5.0.4
flake8-bugbear==23.1.20
flake8-docstrings==1.7.0
flake8-import-order==0.18.2
flake8-pytest-style==1.7.0
isort==5.12.0
mypy==1.0.0
mypy-extensions==1.0.0
pep8-naming==0.13.3
bandit==1.7.5
ssort==0.11.6
deepdiff==6.3.0
deker>=1.0.0
commands = ssort {posargs:deker_shell}
isort {posargs:deker_shell}
black {posargs:deker_shell}
flake8 {posargs:deker_shell}
bandit -r {posargs:deker_shell} -c pyproject.toml
mypy {posargs:deker_shell} --install-types --non-interactive --config-file pyproject.toml
doc8 {posargs:docs} --config=pyproject.toml
set_env =
PIP_EXTRA_INDEX_URL = {env:PIP_EXTRA_INDEX_URL}
"""

0 comments on commit a475fe8

Please sign in to comment.