-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure: Add linting and testing
Added black, isort, and lint to developer workflow. This in turn forced touches in almost all the code Added testing to immediately verify at least some parts of the code were not broken, but much work is still needed on this front.
- Loading branch information
1 parent
591cb3c
commit 8c12af0
Showing
39 changed files
with
1,340 additions
and
1,943 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# File: .pylintrc | ||
[MASTER] | ||
# Python files to analyze | ||
ignore=CVS | ||
persistent=yes | ||
|
||
# Use multiple processes to speed up Pylint (use "0" for auto) | ||
jobs=0 | ||
|
||
[MESSAGES CONTROL] | ||
# Disable specific warnings | ||
disable= | ||
C0111, # missing-docstring | ||
C0103, # invalid-name | ||
C0303, # trailing-whitespace | ||
W0621, # redefined-outer-name | ||
W0703, # broad-except | ||
R0903, # too-few-public-methods | ||
R0913, # too-many-arguments | ||
R0914, # too-many-locals | ||
W0511 # fixme | ||
|
||
[FORMAT] | ||
# Maximum number of characters on a single line | ||
max-line-length=100 | ||
|
||
# Expected format of line ending | ||
expected-line-ending-format=LF | ||
|
||
[BASIC] | ||
# Good variable names | ||
good-names=i,j,k,ex,Run,_,fd,fp | ||
|
||
[MISCELLANEOUS] | ||
# List of note tags to take into consideration | ||
notes=FIXME,TODO,XXX,HACK | ||
|
||
[SIMILARITIES] | ||
# Minimum lines number of a similarity | ||
min-similarity-lines=20 | ||
|
||
# Ignore comments when computing similarities | ||
ignore-comments=yes | ||
|
||
# Ignore docstrings when computing similarities | ||
ignore-docstrings=yes | ||
|
||
# Ignore imports when computing similarities | ||
ignore-imports=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
*/__pycache__ | ||
**/*.pyc | ||
**/.pytest_cache | ||
**/.ipynb_checkpoints | ||
tests/ | ||
esgtools/db/notebooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
install: | ||
pip install --upgrade pip &&\ | ||
python -m pip install --upgrade pip &&\ | ||
pip install -r esgtools/requirements.txt &&\ | ||
pip install -r tests/test_requirements.txt | ||
pip install -r tests/test_requirements.txt &&\ | ||
pip install -r requirements-dev.txt | ||
|
||
test: | ||
python -m pytest -v | ||
|
||
format: | ||
black *.py | ||
black esgtools tests | ||
isort esgtools tests | ||
|
||
lint: | ||
pylint --disable=R,C hello.py | ||
pylint esgtools tests --rcfile=.pylintrc | ||
black --check esgtools tests | ||
isort --check-only esgtools tests | ||
|
||
all: install lint test | ||
deploy: | ||
sam build &&\ | ||
sam deploy --config-file samconfig.toml | ||
|
||
all: install format lint test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
|
||
__version__ = "0.0.1" | ||
__version__ = "0.0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.