From b4e9c2ca3c9be77f30dcdd7c3e21ece73622ee5f Mon Sep 17 00:00:00 2001 From: Siddhant Goel Date: Sun, 18 Feb 2024 14:31:25 +0100 Subject: [PATCH] chore: replace Makefile with Poetry tasks --- .github/workflows/main.yml | 6 +++--- Makefile | 20 -------------------- pyproject.toml | 10 ++++++++++ 3 files changed, 13 insertions(+), 23 deletions(-) delete mode 100644 Makefile diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e1a1499..2aa85b9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,10 +25,10 @@ jobs: run: poetry install - name: Lint with flake8 - run: make lint-flake8 + run: poetry run task lint-flake8 - name: Lint with black - run: make lint-black + run: poetry run task lint-black - name: Test with pytest - run: make test + run: poetry run task test diff --git a/Makefile b/Makefile deleted file mode 100644 index e8f45c6..0000000 --- a/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -fmt-black: - poetry run black flask_filealchemy/ tests/ example/ - -lint-black: - poetry run black --check flask_filealchemy/ tests/ example/ - -lint-flake8: - poetry run flake8 flask_filealchemy/ tests/ example/ - -lint-mypy: - poetry run mypy flask_filealchemy/ - -lint: lint-black lint-flake8 lint-mypy - -test-pytest: - poetry run pytest tests/ - -test: test-pytest - -.PHONY: fmt-black lint-black lint-flake8 lint test-pytest test diff --git a/pyproject.toml b/pyproject.toml index f42cbf5..7821814 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,6 +45,16 @@ taskipy = "^1.12.2" line-length = 79 skip-string-normalization = true +[tool.taskipy.tasks] +fmt = "black flask_filealchemy/ tests/ example/" + +lint-black = "black --check flask_filealchemy/ tests/ example/" +lint-flake8 = "flake8 flask_filealchemy/ tests/ example/" +lint = "task lint-black && task lint-flake8" + +test-pytest = "pytest tests/" +test = "task test-pytest" + [build-system] requires = ["poetry>=0.12"] build-backend = "poetry.masonry.api"