Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Linting related changes: *`.flake8`: * Based on my experience in `graviton` and a couple of extra ignores for formatting that was conflicting with `black` * replace `from pyteal import *` with `import pyteal as pt` in our tests, and for other files ignore the * import error on a per file basis (_this is the reason line changes number in the thousands which amounts to almost 25% of the entire codebase_) * Incorporate #277 * Additional changes: * Removing `requirements.txt` (but keeping `docs/requirements.txt`) * `setup.py`: `extras_require={"development" ... ` replaces the former `requirements.txt` * `.github/workflows/build.yml` + `Makefile`: unify as much of the logic as possible. Needed regular `python` instead of `python-slim` in order to have `make`. `black` is applied to all python files, as before, and `flake8` is as well. `mypy` is applied to `scripts` in addition to `pyteal` (in upcoming #260 this will be expanded to `tests` as well). * `README.md` - applying [mardkownlint](https://github.com/DavidAnson/markdownlint) (without automation)
- Loading branch information
Showing
83 changed files
with
6,121 additions
and
5,828 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,26 @@ | ||
[flake8] | ||
ignore = | ||
E203, | ||
E241, | ||
W291, | ||
E302, | ||
E501, | ||
W503, | ||
E741, | ||
|
||
per-file-ignores = | ||
pyteal/compiler/optimizer/__init__.py: F401 | ||
examples/application/asset.py: F403, F405 | ||
examples/application/security_token.py: F403, F405 | ||
examples/application/vote.py: F403, F405 | ||
examples/signature/atomic_swap.py: F403, F405 | ||
examples/signature/basic.py: F403, F405 | ||
examples/signature/dutch_auction.py: F403, F405 | ||
examples/signature/periodic_payment_deploy.py: F403, F405 | ||
examples/signature/recurring_swap.py: F403, F405 | ||
examples/signature/split.py: F403, F405 | ||
examples/signature/periodic_payment.py: F403, F405 | ||
examples/signature/recurring_swap_deploy.py: F403, F405 | ||
pyteal/__init__.py: F401, F403 | ||
pyteal/ir/ops.py: E221 | ||
tests/module_test.py: F401, F403 |
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
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
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 @@ | ||
setup-development: | ||
pip install -e.[development] | ||
|
||
setup-docs: setup-development | ||
pip install -r docs/requirements.txt | ||
pip install doc2dash | ||
|
||
setup-wheel: | ||
pip install wheel | ||
|
||
bdist-wheel: | ||
python setup.py sdist bdist_wheel | ||
|
||
bundle-docs-clean: | ||
rm -rf docs/pyteal.docset | ||
|
||
bundle-docs: bundle-docs-clean | ||
cd docs && \ | ||
make html && \ | ||
doc2dash --name pyteal --index-page index.html --online-redirect-url https://pyteal.readthedocs.io/en/ _build/html && \ | ||
tar -czvf pyteal.docset.tar.gz pyteal.docset | ||
|
||
generate-init: | ||
python -m scripts.generate_init | ||
|
||
check-generate-init: | ||
python -m scripts.generate_init --check | ||
|
||
ALLPY = docs examples pyteal scripts tests *.py | ||
black: | ||
black --check $(ALLPY) | ||
|
||
flake8: | ||
flake8 $(ALLPY) | ||
|
||
MYPY = pyteal scripts | ||
mypy: | ||
mypy $(MYPY) | ||
|
||
lint: black flake8 mypy | ||
|
||
test-unit: | ||
pytest | ||
|
||
build-and-test: check-generate-init lint test-unit | ||
|
||
# Extras: | ||
coverage: | ||
pytest --cov-report html --cov=pyteal |
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
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
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
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
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.