move justfile and small changes

This commit is contained in:
Ivan Schaller 2022-06-26 15:10:36 +02:00
parent b925e4cc04
commit 6b3eceae93
3 changed files with 45 additions and 2 deletions

View file

@ -11,6 +11,6 @@ python3 -m pip install -r contrib/requirements_dev.txt
> you may need to install just first: [link](https://github.com/casey/just)
```sh
just contrib/ prepare_workspace
just prepare_workspace
```

View file

@ -8,7 +8,10 @@ set dotenv-load := true
# aliases
alias s := show_receipts
alias i := show_system_info
alias p := prepare_workspace
alias t := tests
alias f := tests_full
# variables
export asdf_version := "v0.10.2"
@ -18,9 +21,12 @@ show_receipts:
@just --list
show_system_info:
@echo "=================================="
@echo "os : {{os()}}"
@echo "arch: {{arch()}}"
@echo "home: ${HOME}"
@echo "project dir: {{justfile_directory()}}"
@echo "=================================="
check_asdf:
@if ! asdf --version; then \
@ -60,6 +66,27 @@ create_venv:
@python3 -m pip install --upgrade pip setuptools wheel
@python3 -m venv venv
test_shfmt:
@find . -type f \( -name "**.sh" -and -not -path "./venv/*" -and -not -path "./.tox/*" \) -exec shfmt -d -i 4 -bn -ci -sr "{}" \+;
test_black:
@python3 -m black --check --diff .
test_isort:
@python3 -m isort --check-only --diff .
test_mypy:
@python3 -m mypy --install-types --non-interactive mangadlp/
test_pytest:
@python3 -m pytest -x
test_tox:
@python3 -m tox
test_tox_coverage:
@python3 -m tox -e coverage
# install dependecies and set everything up
prepare_workspace:
just show_system_info
@ -67,3 +94,19 @@ prepare_workspace:
just setup_asdf
just create_venv
tests:
just show_system_info
just test_shfmt
just test_black
just test_isort
just test_mypy
just test_pytest
tets_full:
just show_system_info
just test_shfmt
just test_black
just test_isort
just test_mypy
just test_tox
just test_tox_coverage

View file

@ -7,7 +7,7 @@ deps =
-rcontrib/requirements_dev.txt
commands =
pytest -x --basetemp="{envtmpdir}" {posargs}
pytest --verbose --exitfirst --basetemp="{envtmpdir}" {posargs}
[testenv:coverage]
deps =