Skip to content

Commit 8239647

Browse files
committed
Update make.bat/Makefile
- Updated lint command to include setup.py - Added build, clean, clean-pyc and clean-build functions
1 parent d458a10 commit 8239647

File tree

2 files changed

+55
-3
lines changed

2 files changed

+55
-3
lines changed

Makefile

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
.PHONY: help install-dependencies test clean-tests
1+
.PHONY: help install-dependencies test lint coverage build clean clean-pyc clean-tests clean-coverage clean-build
22

33
help:
4+
@echo ""
45
@echo "install-dependencies installs dependencies (includes development dependencies)"
56
@echo "test runs tests"
67
@echo "lint runs linter"
78
@echo "coverage runs test coverage"
9+
@echo "build builds python package (sdist)"
10+
@echo ""
11+
@echo "clean runs all cleaning functions"
12+
@echo "clean-pyc removes python file artifacts"
813
@echo "clean-tests removes temp test files and folders"
914
@echo "clean-coverage removes coverage files"
15+
@echo "clean-build removes packaging artifacts"
1016

1117
install-dependencies:
1218
python -m pip install -r requirements-dev.txt
@@ -15,14 +21,30 @@ test:
1521
python -m pytest tests/ -vv
1622

1723
lint:
18-
python -m pylint fastaparser
24+
python -m pylint fastaparser setup.py
1925

2026
coverage:
2127
python -m coverage run --source fastaparser -m pytest tests/ -q
2228
python -m coverage report -m
2329

30+
build: clean-pyc clean-build
31+
python setup.py sdist bdist_wheel
32+
33+
clean: clean-pyc clean-tests clean-coverage clean-build
34+
35+
clean-pyc:
36+
find . -name '__pycache__' -exec rm -rf {} +
37+
find . -name '*.pyc' -exec rm -f {} +
38+
find . -name '*.pyo' -exec rm -f {} +
39+
find . -name '*~' -exec rm -f {} +
40+
2441
clean-tests:
2542
rm -rf .pytest_cache/
2643

2744
clean-coverage:
2845
python -m coverage erase
46+
47+
clean-build:
48+
rm -rf build/
49+
rm -rf dist/
50+
rm -rf fastaparser.egg-info/

make.bat

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ echo install-dependencies installs dependencies (includes development dependen
99
echo test runs tests
1010
echo lint runs linter
1111
echo coverage runs test coverage
12+
echo build builds python package (sdist)
13+
echo.
14+
echo clean runs all cleaning functions
15+
echo clean-pyc removes python file artifacts
1216
echo clean-tests removes temp test files and folders
1317
echo clean-coverage removes coverage files
18+
echo clean-build removes packaging artifacts
1419
goto:eof
1520

1621
:install-dependencies
@@ -22,18 +27,43 @@ python -m pytest tests/ -vv
2227
goto:eof
2328

2429
:lint
25-
python -m pylint fastaparser
30+
python -m pylint fastaparser setup.py
2631
goto:eof
2732

2833
:coverage
2934
python -m coverage run --source fastaparser -m pytest tests/ -q
3035
python -m coverage report -m
3136
goto:eof
3237

38+
:build
39+
call:clean-pyc
40+
call:clean-build
41+
python setup.py sdist bdist_wheel
42+
goto:eof
43+
44+
:clean
45+
call:clean-pyc
46+
call:clean-tests
47+
call:clean-coverage
48+
call:clean-build
49+
goto:eof
50+
51+
:clean-pyc
52+
rmdir /s /q fastaparser\__pycache__
53+
rmdir /s /q tests\__pycache__
54+
del /s *.pyc *.pyo *~
55+
goto:eof
56+
3357
:clean-tests
3458
rmdir /s /q .pytest_cache
3559
goto:eof
3660

3761
:clean-coverage
3862
python -m coverage erase
3963
goto:eof
64+
65+
:clean-build
66+
rmdir /s /q build
67+
rmdir /s /q dist
68+
rmdir /s /q fastaparser.egg-info
69+
goto:eof

0 commit comments

Comments
 (0)