Skip to content

Commit 635bc49

Browse files
committed
Organize makefile
1 parent 1229034 commit 635bc49

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

Makefile

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
PACKAGE_NAME=femethods
22

33
.PHONY: install docs lint-html tests
4-
.PHONY: build
54

5+
6+
install:
7+
pip install -e .[dev, docs]
8+
9+
# ============= BUILD AND UPLOAD COMMANDS =============
10+
.PHONY: build
611
build:
7-
python setup.py sdist
8-
python setup.py bdist_wheel
12+
python -m build
13+
14+
upload:
15+
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
916

17+
18+
# ============= DOCS =============
1019
docs:
1120
cd docs && make html
1221

22+
# ============= FORMATTING AND LINTING =============
1323
format:
1424
isort $(PACKAGE_NAME)
1525
black $(PACKAGE_NAME)
@@ -24,13 +34,11 @@ format-all:
2434
isort tests
2535
black tests
2636

37+
# ============= FORMATTING AND LINTING =============
2738
pyproject:
2839
validate-pyproject pyproject.toml
2940
pyproject-fmt pyproject.toml
3041

31-
install:
32-
python setup.py install
33-
3442
lint:
3543
pylint $(PACKAGE_NAME) --disable=fixme
3644

@@ -48,6 +56,8 @@ lint-ci:
4856
flake8 tests --count --select=E9,F63,F7,F82 --show-source --statistics
4957
flake8 tests --count --max-complexity=10 --max-line-length=127 --statistics
5058

59+
60+
# ============= RUNNING TESTS =============
5161
tests:
5262
pytest tests
5363

@@ -75,6 +85,3 @@ tests-core-cov:
7585
tests-ci-cov:
7686
coverage run -m --source=actions pytest tests
7787
coverage report --fail-under=100
78-
79-
upload:
80-
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*

0 commit comments

Comments
 (0)