Skip to content

Commit

Permalink
Merge pull request #735 from evhub/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
evhub committed May 2, 2023
2 parents 8e65270 + dcf89c0 commit 119c4b9
Show file tree
Hide file tree
Showing 37 changed files with 3,105 additions and 1,325 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:
args:
- --ignore=W503,E501,E265,E402,F405,E305,E126
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.1
rev: v2.0.2
hooks:
- id: autopep8
args:
Expand Down
410 changes: 322 additions & 88 deletions DOCS.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,6 @@ Another useful Coconut feature is implicit partials. Coconut supports a number o
```coconut
.attr
.method(args)
obj.
func$
seq[]
iter$[]
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ global-include *.md
global-include *.json
global-include *.toml
global-include *.coco
global-include *.ini
global-include py.typed
prune coconut/tests/dest
prune docs
Expand Down
37 changes: 25 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dev-py3: clean setup-py3
.PHONY: setup
setup:
python -m ensurepip
python -m pip install --upgrade "setuptools<58" wheel pip pytest_remotedata
python -m pip install --upgrade setuptools wheel pip pytest_remotedata

.PHONY: setup-py2
setup-py2:
Expand All @@ -32,7 +32,7 @@ setup-py2:
.PHONY: setup-py3
setup-py3:
python3 -m ensurepip
python3 -m pip install --upgrade "setuptools<58" wheel pip pytest_remotedata
python3 -m pip install --upgrade setuptools wheel pip pytest_remotedata

.PHONY: setup-pypy
setup-pypy:
Expand All @@ -42,7 +42,7 @@ setup-pypy:
.PHONY: setup-pypy3
setup-pypy3:
pypy3 -m ensurepip
pypy3 -m pip install --upgrade "setuptools<58" wheel pip pytest_remotedata
pypy3 -m pip install --upgrade setuptools wheel pip pytest_remotedata

.PHONY: install
install: setup
Expand All @@ -57,11 +57,11 @@ install-py3: setup-py3
python3 -m pip install -e .[tests]

.PHONY: install-pypy
install-pypy:
install-pypy: setup-pypy
pypy -m pip install -e .[tests]

.PHONY: install-pypy3
install-pypy3:
install-pypy3: setup-pypy3
pypy3 -m pip install -e .[tests]

.PHONY: format
Expand Down Expand Up @@ -155,11 +155,19 @@ test-verbose: clean
python ./coconut/tests/dest/runner.py
python ./coconut/tests/dest/extras.py

# same as test-mypy but uses --verbose and --check-untyped-defs
# same as test-mypy but uses --verbose
.PHONY: test-mypy-verbose
test-mypy-verbose: export COCONUT_USE_COLOR=TRUE
test-mypy-verbose: clean
python ./coconut/tests --strict --force --target sys --verbose --jobs 0 --keep-lines --mypy --follow-imports silent --ignore-missing-imports --allow-redefinition
python ./coconut/tests/dest/runner.py
python ./coconut/tests/dest/extras.py

# same as test-mypy but uses --check-untyped-defs
.PHONY: test-mypy-all
test-mypy-all: export COCONUT_USE_COLOR=TRUE
test-mypy-all: clean
python ./coconut/tests --strict --force --target sys --verbose --keep-lines --mypy --follow-imports silent --ignore-missing-imports --allow-redefinition --check-untyped-defs
python ./coconut/tests --strict --force --target sys --keep-lines --mypy --follow-imports silent --ignore-missing-imports --allow-redefinition --check-untyped-defs
python ./coconut/tests/dest/runner.py
python ./coconut/tests/dest/extras.py

Expand Down Expand Up @@ -198,6 +206,12 @@ test-watch: clean
test-mini:
coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force --jobs 0

.PHONY: debug-comp-crash
debug-comp-crash: export COCONUT_USE_COLOR=TRUE
debug-comp-crash: export COCONUT_PURE_PYTHON=TRUE
debug-comp-crash:
python -X dev -m coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --strict --line-numbers --keep-lines --force --jobs 0

.PHONY: debug-test-crash
debug-test-crash:
python -X dev ./coconut/tests/dest/runner.py
Expand All @@ -221,7 +235,7 @@ clean:

.PHONY: wipe
wipe: clean
rm -rf vprof.json profile.log *.egg-info
rm -rf vprof.json profile.log *.egg-info
-find . -name "__pycache__" -delete
-C:/GnuWin32/bin/find.exe . -name "__pycache__" -delete
-find . -name "*.pyc" -delete
Expand Down Expand Up @@ -253,19 +267,18 @@ check-reqs:
python ./coconut/requirements.py

.PHONY: profile-parser
profile-parser: export COCONUT_USE_COLOR=TRUE
profile-parser: export COCONUT_PURE_PYTHON=TRUE
profile-parser:
coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force --profile --verbose --recursion-limit 4096 2>&1 | tee ./profile.log

.PHONY: profile-time
profile-time: export COCONUT_PURE_PYTHON=TRUE
profile-time:
vprof -c h "coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force" --output-file ./vprof.json
vprof -c h "./coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force" --output-file ./vprof.json

.PHONY: profile-memory
profile-memory: export COCONUT_PURE_PYTHON=TRUE
profile-memory:
vprof -c m "coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force" --output-file ./vprof.json
vprof -c m "./coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force" --output-file ./vprof.json

.PHONY: view-profile
view-profile:
Expand Down

0 comments on commit 119c4b9

Please sign in to comment.