Skip to content

Commit

Permalink
MNT: updates Makefile scripts, adds isort to requirements-tests.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
Gui-FernandesBR committed Feb 6, 2024
1 parent 435bd62 commit 31b7369
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- [ ] Tests for the changes have been added (if needed)
- [ ] Docs have been reviewed and added / updated
- [ ] Lint (`black rocketpy/ tests/`) has passed locally
- [ ] All tests (`pytest --runslow`) have passed locally
- [ ] All tests (`python3 -m pytest tests -m slow --runslow`) have passed locally
- [ ] `CHANGELOG.md` has been updated (if relevant)

## Current behavior
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ MANIFEST
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
# Unit test / coverage reports / lints reports
htmlcov/
.tox/
.nox/
Expand All @@ -50,6 +50,7 @@ coverage.xml
.hypothesis/
.pytest_cache/
cover/
.pylint-report.txt

# Translations
*.mo
Expand Down
43 changes: 24 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
test:
python -m pytest tests -vv
pytest:
python3 -m pytest tests

testfile:
python -m pytest tests/$(file) -vv
pytest-slow:
python3 -m pytest tests -vv -m slow --runslow

tests:
test

coverage:
python -m pytest --cov=rocketpy tests -vv
coverage:
python3 -m pytest --cov=rocketpy tests

coverage-report:
python -m pytest --cov=rocketpy tests -vv --cov-report html
python3 -m pytest --cov=rocketpy tests --cov-report html

install:
python -m pip install --upgrade pip
install:
python3 -m pip install --upgrade pip
pip install -r requirements.txt
python setup.py install
pip install -r requirements-optional.txt
pip install -e .

isort:
isort --profile black rocketpy/ tests/ docs/

verify-lint:
flake8 --select BLK rocketpy
flake8 --select BLK test
black:
black rocketpy/ tests/ docs/

pylint:
-pylint rocketpy tests --output=.pylint-report.txt

lint:
black rocketpy
black tests
biuld-docs:
cd docs
python3 -m pip install -r requirements.txt
make html
cd ..
5 changes: 3 additions & 2 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
pytest==6.2.4
pytest-coverage
black
black[jupyter]
flake8-black
pandas
numericalunits==1.25
pylint
pylint
isort

0 comments on commit 31b7369

Please sign in to comment.