Skip to content

Commit 26617a4

Browse files
authored
Merge pull request #5 from guzman-raphael/pr_review_116
Readd `flake8` to style tests
2 parents 2ee7e0b + d2353eb commit 26617a4

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
44

5-
## [0.2.4] - 2022-1-21
5+
## [0.3.0] - 2022-01-21
66
### Changed
77
- Hot-reload mechanism to use `otumat watch` PR #116
88
- Renamed environment variable defining spec sheet to `PHARUS_SPEC_PATH` PR #116
@@ -102,7 +102,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
102102
- Support for DataJoint attribute types: `varchar`, `int`, `float`, `datetime`, `date`, `time`, `decimal`, `uuid`.
103103
- Check dependency utility to determine child table references.
104104

105-
[0.2.4]: https://github.com/datajoint/pharus/compare/0.2.3...0.2.4
105+
[0.3.0]: https://github.com/datajoint/pharus/compare/0.2.3...0.3.0
106106
[0.2.3]: https://github.com/datajoint/pharus/compare/0.2.2...0.2.3
107107
[0.2.2]: https://github.com/datajoint/pharus/compare/0.2.1...0.2.2
108108
[0.2.1]: https://github.com/datajoint/pharus/compare/0.2.0...0.2.1

docker-compose-test.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@ services:
3737
echo "------ SYNTAX TESTS ------"
3838
PKG_DIR=/opt/conda/lib/python3.8/site-packages/pharus
3939
flake8 $${PKG_DIR} --count --select=E9,F63,F7,F82 --show-source --statistics
40+
flake8 /main/tests --count --select=E9,F63,F7,F82 --show-source --statistics
4041
echo "------ UNIT TESTS ------"
4142
pytest -sv --cov-report term-missing --cov=pharus /main/tests
4243
echo "------ STYLE TESTS ------"
4344
black $${PKG_DIR} --check -v --extend-exclude "^.*dynamic_api.py$$"
45+
flake8 $${PKG_DIR} --count --max-complexity=20 --max-line-length=94 --statistics --exclude=*dynamic_api.py --ignore=W503
46+
black /main/tests --check -v
47+
flake8 /main/tests --count --max-complexity=20 --max-line-length=94 --statistics --ignore=F401,F811,W503
4448
else
4549
echo "=== Running ==="
4650
echo "Please see 'docker-compose-test.yaml' for detail on running tests."

docs/dev_notes.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ Run Tests for Development w/ Pytest, Flake8, Black
4545
4646
- For syntax tests, run ``flake8 ${PKG_DIR} --count --select=E9,F63,F7,F82 --show-source --statistics``
4747
- For pytest integration tests, run ``pytest -sv --cov-report term-missing --cov=${PKG_DIR} /main/tests``
48-
- For style tests, run ``black $${PKG_DIR} --check -v --extend-exclude "^.*dynamic_api.py$"``
48+
- For style tests, run:
49+
50+
.. code-block:: bash
51+
52+
black ${PKG_DIR} --check -v --extend-exclude "^.*dynamic_api.py$"
53+
flake8 ${PKG_DIR} --count --max-complexity=20 --max-line-length=94 --statistics --exclude=*dynamic_api.py --ignore=W503
4954
5055
Creating Sphinx Documentation from Scratch
5156
------------------------------------------

pharus/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""Package metadata."""
2-
__version__ = "0.2.4"
2+
__version__ = "0.3.0"

tests/test_schemas.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from . import (
2-
SCHEMA_PREFIX,
32
client,
43
token,
54
connection,

0 commit comments

Comments
 (0)