Skip to content

Commit

Permalink
Merge pull request #6 from neuralmagic/parfeniukink/configurations-im…
Browse files Browse the repository at this point in the history
…provements

Dev tools configurations
  • Loading branch information
markurtz authored Jul 5, 2024
2 parents ff3f695 + f0b4a40 commit 4af96de
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 16 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,7 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/


# MacOS files
.DS_Store
52 changes: 36 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,34 +1,54 @@
.PHONY: install
install:
pip install -r requirements.txt
python -m pip install -r requirements.txt

install-dev:
pip install -e .[dev]
.PHONY: install.dev
install.dev:
python -m pip install -e .[dev]

.PHONY: build
build:
python setup.py sdist bdist_wheel


.PHONY: quality
quality:
ruff check src tests
isort --check-only src tests
flake8 src tests --max-line-length 88
mypy src
python -m ruff check src tests
python -m isort --check src tests
python -m flake8 src tests --max-line-length 88
python -m mypy src


.PHONY: style
style:
ruff format src tests
isort src tests
flake8 src tests --max-line-length 88
python -m ruff format src tests
python -m isort src tests
python -m flake8 src tests --max-line-length 88


.PHONY: test
test:
python -m pytest -s -vvv --cache-clear tests/
python -m pytest -s -vvv --cache-clear tests

build:
python setup.py sdist bdist_wheel
.PHONY: test.unit
test.unit:
python -m pytest tests/unit

.PHONY: test.integration
test.integration:
python -m pytest tests/integration

.PHONY: test.e2e
test.e2e:
python -m pytest tests/e2e


.PHONY: clean
clean:
rm -rf __pycache__
rm -rf build
rm -rf dist
rm -rf *.egg-info
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -exec rm -r {} +
rm -rf .mypy_cache
rm -rf .pytest_cache

.PHONY: install install-dev quality style test test-unit test-integration test-e2e test-smoke test-sanity test-regression build clean
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ lint.select = ["E", "F", "W"]
max-line-length = 88

[tool.pytest.ini_options]
addopts = '-s -vvv --cache-clear'
asyncio_mode = 'auto'
markers = [
"smoke: quick tests to check basic functionality",
"sanity: detailed tests to ensure major functions work correctly",
Expand Down

0 comments on commit 4af96de

Please sign in to comment.