Skip to content

Commit

Permalink
Remove tox (#238)
Browse files Browse the repository at this point in the history
* Remove tox

* comments

* Add aiohttp dep
  • Loading branch information
ludeeus authored Mar 15, 2024
1 parent ccee51e commit 0c183fc
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "NabuCasa SniTun Dev",
"image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.8",
"postCreateCommand": "python3 -m pip install -e .[test]",
"postCreateCommand": "python3 -m pip install -e .[test,lint]",
"postStartCommand": "python3 -m pip install -e .",
"containerUser": "vscode",
"containerEnv": {
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
- name: Install dependencies
shell: bash
run: |
pip install tox
- name: Run Tox
python3 -m pip install -e .[lint]
- name: Lint
shell: bash
run: |
tox -e lint,black
scripts/lint
build:
runs-on: ubuntu-latest
Expand All @@ -46,8 +46,8 @@ jobs:
- name: Install dependencies
shell: bash
run: |
pip install tox
- name: Run Tox
python3 -m pip install -e .[test]
- name: Test
shell: bash
run: |
tox -e tests
scripts/test
36 changes: 7 additions & 29 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ requires-python = ">=3.8"
version = "0.36.2"

[project.optional-dependencies]
test = [
"flake8==6.1.0",
lint = [
"aiohttp==3.9.3",
"black==23.11.0",
"pylint==3.0.2",
"pytest==7.4.3",
"pytest-timeout==2.2.0",
]
test = [
"pytest-aiohttp==1.0.5",
"black==23.11.0",
"pytest-timeout==2.2.0",
"pytest==7.4.3",
]

[project.urls]
Expand All @@ -67,30 +69,6 @@ sections = [
]
use_parentheses = true

[tool.tox]
legacy_tox_ini = """
[tox]
envlist = lint, tests, black
[testenv]
basepython = python3
deps =
-e '.[test]'
[testenv:lint]
ignore_errors = True
commands =
pylint snitun
[testenv:tests]
commands =
pytest tests
[testenv:black]
commands =
black --target-version py38 --check snitun tests
"""

[tool.pylint.BASIC]
disable = [
"abstract-method",
Expand Down
6 changes: 6 additions & 0 deletions scripts/lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

cd "$(dirname "$0")/.."

python3 -m black --target-version py38 --check snitun tests
python3 -m pylint snitun
5 changes: 5 additions & 0 deletions scripts/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

cd "$(dirname "$0")/.."

python3 -m pytest

0 comments on commit 0c183fc

Please sign in to comment.