Skip to content

Commit bd6362c

Browse files
Merge pull request #539 from RocketPy-Team/mnt/update-makefile
MNT: update Makefile
2 parents e5d1122 + 5234f6d commit bd6362c

File tree

4 files changed

+35
-23
lines changed

4 files changed

+35
-23
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- [ ] Tests for the changes have been added (if needed)
1717
- [ ] Docs have been reviewed and added / updated
1818
- [ ] Lint (`black rocketpy/ tests/`) has passed locally
19-
- [ ] All tests (`pytest --runslow`) have passed locally
19+
- [ ] All tests (`python3 -m pytest tests -m slow --runslow`) have passed locally
2020
- [ ] `CHANGELOG.md` has been updated (if relevant)
2121

2222
## Current behavior

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ MANIFEST
3636
pip-log.txt
3737
pip-delete-this-directory.txt
3838

39-
# Unit test / coverage reports
39+
# Unit test / coverage reports / lints reports
4040
htmlcov/
4141
.tox/
4242
.nox/
@@ -50,6 +50,7 @@ coverage.xml
5050
.hypothesis/
5151
.pytest_cache/
5252
cover/
53+
.pylint-report.txt
5354

5455
# Translations
5556
*.mo

Makefile

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,37 @@
1-
test:
2-
python -m pytest tests -vv
1+
# Set PYTHON variable according to OS
2+
ifeq ($(OS),Windows_NT)
3+
PYTHON=python
4+
else
5+
PYTHON=python3
6+
endif
37

4-
testfile:
5-
python -m pytest tests/$(file) -vv
8+
pytest:
9+
$(PYTHON) -m pytest tests
610

7-
tests:
8-
test
11+
pytest-slow:
12+
$(PYTHON) -m pytest tests -vv -m slow --runslow
913

10-
coverage:
11-
python -m pytest --cov=rocketpy tests -vv
14+
coverage:
15+
$(PYTHON) -m pytest --cov=rocketpy tests
1216

1317
coverage-report:
14-
python -m pytest --cov=rocketpy tests -vv --cov-report html
18+
$(PYTHON) -m pytest --cov=rocketpy tests --cov-report html
1519

16-
install:
17-
python -m pip install --upgrade pip
20+
install:
21+
$(PYTHON) -m pip install --upgrade pip
1822
pip install -r requirements.txt
19-
python setup.py install
23+
pip install -r requirements-optional.txt
24+
pip install -e .
2025

21-
verify-lint:
22-
flake8 --select BLK rocketpy
23-
flake8 --select BLK test
26+
isort:
27+
isort --profile black rocketpy/ tests/ docs/
2428

25-
lint:
26-
black rocketpy
27-
black tests
29+
black:
30+
black rocketpy/ tests/ docs/
31+
32+
pylint:
33+
-pylint rocketpy tests --output=.pylint-report.txt
34+
35+
build-docs:
36+
cd docs && $(PYTHON) -m pip install -r requirements.txt && make html
37+
cd ..

requirements-tests.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
pytest==6.2.4
1+
pytest
22
pytest-coverage
3-
black
3+
black[jupyter]
44
flake8-black
55
pandas
66
numericalunits==1.25
7-
pylint
7+
pylint
8+
isort

0 commit comments

Comments
 (0)