Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v3.0.4 #806

Merged
merged 122 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
ee3e4fe
Reenable develop
evhub Jul 29, 2023
200dede
Remove --history-file
evhub Jul 29, 2023
24bcd15
Add --incremental
evhub Jul 31, 2023
27a15c7
Fix --incremental
evhub Aug 1, 2023
f7e4fbc
Fix incremental test
evhub Aug 1, 2023
1c4a14f
Slightly improve incremental mode
evhub Aug 2, 2023
aa88407
Further fix --incremental
evhub Aug 3, 2023
779f9dc
Attempt to fix tests
evhub Aug 3, 2023
22bcb28
Fix tests, incremental log message
evhub Aug 3, 2023
7d95dc1
Fix unused import errors
evhub Aug 6, 2023
6473ac8
Add missing import test
evhub Aug 6, 2023
e402c58
Make where use temp vars
evhub Sep 2, 2023
479c6aa
Fix where statements
evhub Sep 2, 2023
00ef984
Add numpy install extra
evhub Sep 2, 2023
f4e3ebd
Add attritemgetter partials
evhub Sep 23, 2023
af257bc
Fix docs, tests
evhub Sep 23, 2023
f55e552
Fix jupyter console
evhub Sep 23, 2023
0c1cada
Bump IPython
evhub Sep 27, 2023
440334b
Backport ExceptionGroup
evhub Oct 10, 2023
b1a5f43
Improve reqs, tests
evhub Oct 10, 2023
87a5325
Improve reqs, tests
evhub Oct 10, 2023
021ad34
Fix reqs
evhub Oct 11, 2023
e819bed
Bump reqs
evhub Oct 11, 2023
595487a
Fix py37
evhub Oct 11, 2023
1967d14
Fix py<=38
evhub Oct 12, 2023
40ee558
Fix py37, docs
evhub Oct 13, 2023
f0b4a60
Fix mypy errors
evhub Oct 13, 2023
ef54243
Fix lots of tests
evhub Oct 15, 2023
5b51c4c
Update pre-commit
evhub Oct 15, 2023
c2165d0
Fix more tests
evhub Oct 15, 2023
b8665d6
Increase stack
evhub Oct 17, 2023
29a8345
3.12 prep
evhub Oct 22, 2023
f34759c
Fix typo in pure-Python example for scan()
Starwort Oct 22, 2023
26dbdec
Fix typo in pure-Python example for scan() (#790)
evhub Oct 22, 2023
66e5254
Rename process/thread maps
evhub Oct 28, 2023
586dd5e
Add mapreduce, improve collectby, process/thread maps
evhub Oct 28, 2023
2e03ba0
recursive_iterator to recursive_generator
evhub Oct 28, 2023
d034af3
Fix readthedocs
evhub Oct 28, 2023
746bf58
Improve header
evhub Oct 29, 2023
06e1586
Add process/thread versions of collectby/mapreduce
evhub Oct 30, 2023
4e11b6d
Remove docstring
evhub Oct 30, 2023
57c0386
Improve docs
evhub Oct 30, 2023
f24588e
Minor doc cleanup
evhub Oct 31, 2023
5baa6fc
Improve mapreduce
evhub Oct 31, 2023
959ce34
Improve mapreduce/collectby
evhub Oct 31, 2023
0c7a5af
Add Expected.handle
evhub Oct 31, 2023
c13fa4c
Add Expected.expect_error
evhub Nov 2, 2023
6c9c113
Fix typing
evhub Nov 3, 2023
061e67f
Fix no wrap test
evhub Nov 3, 2023
77daeb9
Add pyspy
evhub Nov 3, 2023
fb04ee6
Improve exception formatting
evhub Nov 4, 2023
61bd787
Improve profiling
evhub Nov 4, 2023
f1759b1
Add async_map
evhub Nov 4, 2023
a99a76d
Fix tests
evhub Nov 4, 2023
c3b0273
Improve partials
evhub Nov 4, 2023
fd5a17f
Reduce jobs
evhub Nov 4, 2023
e093c9b
Improve tests perf
evhub Nov 4, 2023
f5eb7fd
Disable jobs on pypy
evhub Nov 5, 2023
827c06c
Improve header
evhub Nov 5, 2023
d1b1cde
Add find_packages, improve override
evhub Nov 5, 2023
484965f
Fix syntax
evhub Nov 5, 2023
cedb148
Prevent unwanted multiprocessing
evhub Nov 5, 2023
c83609f
Clean up docs
evhub Nov 5, 2023
352b942
Fix test errors
evhub Nov 5, 2023
27b8c7a
Fix more tests
evhub Nov 6, 2023
143fa61
Improve pyparsing usage
evhub Nov 6, 2023
0e6f193
Add more profiling
evhub Nov 6, 2023
b001630
Clean up profiling
evhub Nov 6, 2023
78542b8
Improve --profile
evhub Nov 7, 2023
f496a4d
Further fix profiling
evhub Nov 7, 2023
42281fe
More profiling improvements
evhub Nov 8, 2023
e5bfd25
Add adaptive parsing support
evhub Nov 8, 2023
dd0ba2a
More adaptive improvements
evhub Nov 9, 2023
1cfbe06
Use fast grammar methods
evhub Nov 10, 2023
607c3b7
Fix fast parse methods
evhub Nov 10, 2023
9d2acaa
Actually enable fast parse methods
evhub Nov 10, 2023
b8d1581
Improve exceptions
evhub Nov 11, 2023
ec1c1dd
Lots of optimizations
evhub Nov 12, 2023
bb83c9c
Improve --incremental
evhub Nov 12, 2023
8ce71c8
Further improve --incremental
evhub Nov 12, 2023
0b2db7e
Always use cache
evhub Nov 12, 2023
5753c2b
More performance tuning
evhub Nov 13, 2023
8679c8c
Robustify os operations
evhub Nov 13, 2023
807eb9f
Improve any_of
evhub Nov 13, 2023
4961812
Improve incremental
evhub Nov 14, 2023
f9e3b4a
Use newest cpyparsing
evhub Nov 14, 2023
e1b9f80
Improve grammar
evhub Nov 14, 2023
a079bf0
Improve incremental
evhub Nov 15, 2023
11320e8
Update docs
evhub Nov 15, 2023
592bc78
Fix incremental parsing
evhub Nov 17, 2023
cd7d9d8
Improve incremental parsing
evhub Nov 17, 2023
71c2659
Fix dependencies
evhub Nov 17, 2023
a14a829
Fix tests
evhub Nov 17, 2023
459bf34
More robustification
evhub Nov 17, 2023
0ab1785
Fix tests
evhub Nov 20, 2023
3c28785
Fix py2 tests
evhub Nov 20, 2023
0110d61
Improve command running
evhub Nov 20, 2023
ea531c2
Improve call_output
evhub Nov 22, 2023
164fb56
Enable adaptive
evhub Nov 23, 2023
57eddf7
Fix errors
evhub Nov 23, 2023
a3d33ec
Fix more issues
evhub Nov 24, 2023
f797edf
Prepare for release
evhub Nov 24, 2023
417ce32
Fix syntax for py2
evhub Nov 24, 2023
ac16733
Update to require new cPyparsing
evhub Nov 24, 2023
68cdcff
Clean up docs
evhub Nov 24, 2023
58e2aba
Fix stdin reading
evhub Nov 24, 2023
1983871
More fixes
evhub Nov 25, 2023
6f17751
Add test
evhub Nov 25, 2023
db22bcd
Fix py2
evhub Nov 25, 2023
895a0f1
Fix fancy call_output
evhub Nov 25, 2023
3651477
Further fix py2
evhub Nov 25, 2023
7a1169f
Disable fancy call_output
evhub Nov 25, 2023
4c50275
Fix py2 pickling
evhub Nov 26, 2023
84cc54f
Fix extras test
evhub Nov 26, 2023
aa6c431
Fix parsing numbers
evhub Nov 26, 2023
1721293
Further fix number parsing
evhub Nov 26, 2023
055b1e5
Fix failing tests
evhub Nov 26, 2023
9b0ee55
Fix extras tests
evhub Nov 27, 2023
c14014a
Prepare for v3.0.4
evhub Nov 27, 2023
019348d
Fix test cache management
evhub Nov 27, 2023
dfd40bd
Fix typos
evhub Nov 27, 2023
d2191ee
Fix test
evhub Nov 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,26 @@ jobs:
matrix:
python-version:
- '2.7'
- '3.4'
- '3.5'
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- 'pypy-2.7'
- 'pypy-3.6'
- 'pypy-3.7'
- 'pypy-3.8'
- 'pypy-3.9'
- 'pypy-3.10'
fail-fast: false
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: MatteoH2O1999/setup-python@v1.3.1
uses: MatteoH2O1999/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ pyprover/
bbopt/
coconut-prelude/
index.rst
vprof.json
/coconut/icoconut/coconut/
__coconut_cache__/

# Profiling
vprof.json
profile.svg
profile.speedscope
runtime_profile.svg
runtime_profile.speedscope
24 changes: 12 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
repos:
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.4
hooks:
- id: autopep8
args:
- --in-place
- --aggressive
- --aggressive
- --experimental
- --ignore=W503,E501,E722,E402,E721
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: fix-byte-order-marker
Expand All @@ -24,18 +34,8 @@ repos:
args:
- --autofix
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
args:
- --ignore=W503,E501,E265,E402,F405,E305,E126
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.2
hooks:
- id: autopep8
args:
- --in-place
- --aggressive
- --aggressive
- --experimental
- --ignore=W503,E501,E722,E402
1 change: 0 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ python:
path: .
extra_requirements:
- docs
system_packages: true
623 changes: 419 additions & 204 deletions DOCS.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ Information on every Coconut release is chronicled on the [GitHub releases page]

Yes! Coconut compiles the [newest](https://www.python.org/dev/peps/pep-0526/), [fanciest](https://www.python.org/dev/peps/pep-0484/) type annotation syntax into version-independent type comments which can then by checked using Coconut's built-in [MyPy Integration](./DOCS.md#mypy-integration).

### Help! I tried to write a recursive iterator and my Python segfaulted!
### Help! I tried to write a recursive generator and my Python segfaulted!

No problem—just use Coconut's [`recursive_iterator`](./DOCS.md#recursive-iterator) decorator and you should be fine. This is a [known Python issue](http://bugs.python.org/issue14010) but `recursive_iterator` will fix it for you.
No problem—just use Coconut's [`recursive_generator`](./DOCS.md#recursive_generator) decorator and you should be fine. This is a [known Python issue](http://bugs.python.org/issue14010) but `recursive_generator` will fix it for you.

### How do I split an expression across multiple lines in Coconut?

Expand Down
163 changes: 121 additions & 42 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,37 @@ dev-py3: clean setup-py3

.PHONY: setup
setup:
python -m ensurepip
-python -m ensurepip
python -m pip install --upgrade setuptools wheel pip pytest_remotedata cython

.PHONY: setup-py2
setup-py2:
python2 -m ensurepip
-python2 -m ensurepip
python2 -m pip install --upgrade "setuptools<58" wheel pip pytest_remotedata cython

.PHONY: setup-py3
setup-py3:
python3 -m ensurepip
-python3 -m ensurepip
python3 -m pip install --upgrade setuptools wheel pip pytest_remotedata cython

.PHONY: setup-pypy
setup-pypy:
pypy -m ensurepip
-pypy -m ensurepip
pypy -m pip install --upgrade "setuptools<58" wheel pip pytest_remotedata

.PHONY: setup-pypy3
setup-pypy3:
pypy3 -m ensurepip
-pypy3 -m ensurepip
pypy3 -m pip install --upgrade setuptools wheel pip pytest_remotedata

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

.PHONY: install-purepy
install-purepy: setup
python -m pip install --no-deps --upgrade -e . "pyparsing<3"

.PHONY: install-py2
install-py2: setup-py2
python2 -m pip install -e .[tests]
Expand Down Expand Up @@ -127,39 +131,54 @@ test-pypy3: clean
pypy3 ./coconut/tests/dest/runner.py
pypy3 ./coconut/tests/dest/extras.py

# same as test-univ but reverses any ofs
.PHONY: test-any-of
test-any-of: export COCONUT_ADAPTIVE_ANY_OF=TRUE
test-any-of: export COCONUT_REVERSE_ANY_OF=TRUE
test-any-of: test-univ

# same as test-univ but also runs mypy
.PHONY: test-mypy-univ
test-mypy-univ: export COCONUT_USE_COLOR=TRUE
test-mypy-univ: clean
python ./coconut/tests --strict --force --keep-lines --mypy --follow-imports silent --ignore-missing-imports --allow-redefinition
python ./coconut/tests --strict --keep-lines --force --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-univ but uses --target sys
.PHONY: test-mypy
test-mypy: export COCONUT_USE_COLOR=TRUE
test-mypy: clean
python ./coconut/tests --strict --force --target sys --keep-lines --mypy --follow-imports silent --ignore-missing-imports --allow-redefinition
python ./coconut/tests --strict --keep-lines --force --target sys --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 doesn't use --force
.PHONY: test-mypy-tests
test-mypy-tests: export COCONUT_USE_COLOR=TRUE
test-mypy-tests: clean-no-tests
python ./coconut/tests --strict --target sys --keep-lines --mypy --follow-imports silent --ignore-missing-imports --allow-redefinition
python ./coconut/tests --strict --keep-lines --target sys --mypy --follow-imports silent --ignore-missing-imports --allow-redefinition
python ./coconut/tests/dest/runner.py
python ./coconut/tests/dest/extras.py

# same as test-univ but includes verbose output for better debugging
# regex for getting non-timing lines: ^(?!\s*(Time|Packrat|Loaded|Saving|Adaptive|Errorless|Grammar|Failed|Incremental|Pruned)\s)[^\n]*\n*
.PHONY: test-verbose
test-verbose: export COCONUT_USE_COLOR=TRUE
test-verbose: clean
python ./coconut/tests --strict --keep-lines --force --verbose
python ./coconut/tests/dest/runner.py
python ./coconut/tests/dest/extras.py

# same as test-univ but includes verbose output for better debugging and is fully synchronous
# same as test-verbose but doesn't use the incremental cache
.PHONY: test-verbose-no-cache
test-verbose-no-cache: export COCONUT_USE_COLOR=TRUE
test-verbose-no-cache: clean
python ./coconut/tests --strict --keep-lines --force --verbose --no-cache
python ./coconut/tests/dest/runner.py
python ./coconut/tests/dest/extras.py

# same as test-verbose but is fully synchronous
.PHONY: test-verbose-sync
test-verbose-sync: export COCONUT_USE_COLOR=TRUE
test-verbose-sync: clean
Expand All @@ -171,15 +190,15 @@ test-verbose-sync: clean
.PHONY: test-mypy-verbose
test-mypy-verbose: export COCONUT_USE_COLOR=TRUE
test-mypy-verbose: clean
python ./coconut/tests --strict --force --target sys --verbose --keep-lines --mypy --follow-imports silent --ignore-missing-imports --allow-redefinition
python ./coconut/tests --strict --keep-lines --force --target sys --verbose --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 --keep-lines --mypy --follow-imports silent --ignore-missing-imports --allow-redefinition --check-untyped-defs
python ./coconut/tests --strict --keep-lines --force --target sys --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 All @@ -192,9 +211,14 @@ test-easter-eggs: clean
python ./coconut/tests/dest/extras.py

# same as test-univ but uses python pyparsing
.PHONY: test-pyparsing
test-pyparsing: export COCONUT_PURE_PYTHON=TRUE
test-pyparsing: test-univ
.PHONY: test-purepy
test-purepy: export COCONUT_PURE_PYTHON=TRUE
test-purepy: test-univ

# same as test-univ but disables the computation graph
.PHONY: test-no-computation-graph
test-no-computation-graph: export COCONUT_USE_COMPUTATION_GRAPH=FALSE
test-no-computation-graph: test-univ

# same as test-univ but uses --minify
.PHONY: test-minify
Expand All @@ -217,30 +241,60 @@ test-no-wrap: clean
test-watch: export COCONUT_USE_COLOR=TRUE
test-watch: clean
python ./coconut/tests --strict --keep-lines --force
coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --watch --strict --keep-lines --stack-size 4096 --recursion-limit 4096
make just-watch
python ./coconut/tests/dest/runner.py
python ./coconut/tests/dest/extras.py

# mini test that just compiles agnostic tests with fully synchronous output
# just watches tests
.PHONY: just-watch
just-watch: export COCONUT_USE_COLOR=TRUE
just-watch:
coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --watch --strict --keep-lines --stack-size 4096 --recursion-limit 4096

# same as just-watch but uses verbose output and is fully sychronous and doesn't use the cache
.PHONY: just-watch-verbose
just-watch-verbose: export COCONUT_USE_COLOR=TRUE
just-watch-verbose:
coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --watch --strict --keep-lines --stack-size 4096 --recursion-limit 4096 --verbose --jobs 0 --no-cache

# mini test that just compiles agnostic tests
.PHONY: test-mini
test-mini: export COCONUT_USE_COLOR=TRUE
test-mini:
coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force --jobs 0 --stack-size 4096 --recursion-limit 4096
coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force --stack-size 4096 --recursion-limit 4096

# same as test-mini but with verbose output
.PHONY: test-mini-verbose
test-mini-verbose: export COCONUT_USE_COLOR=TRUE
test-mini-verbose:
coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force --verbose --stack-size 4096 --recursion-limit 4096

# same as test-mini-verbose but doesn't overwrite the cache
.PHONY: test-mini-cache
test-mini-cache: export COCONUT_ALLOW_SAVE_TO_CACHE=FALSE
test-mini-cache: test-mini-verbose

# same as test-mini-verbose but with fully synchronous output and fast failing
.PHONY: test-mini-sync
test-mini-sync: export COCONUT_USE_COLOR=TRUE
test-mini-sync:
coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force --verbose --jobs 0 --fail-fast --stack-size 4096 --recursion-limit 4096

# same as test-univ but debugs crashes
.PHONY: test-univ-debug
test-univ-debug: export COCONUT_TEST_DEBUG_PYTHON=TRUE
test-univ-debug: test-univ

# same as test-mini but debugs crashes
# same as test-mini but debugs crashes, is fully synchronous, and doesn't use verbose output
.PHONY: test-mini-debug
test-mini-debug: export COCONUT_USE_COLOR=TRUE
test-mini-debug:
python -X dev -m coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --strict --keep-lines --force --jobs 0 --stack-size 4096 --recursion-limit 4096

# same as test-mini-debug but uses vanilla pyparsing
.PHONY: test-mini-debug-pyparsing
test-mini-debug-pyparsing: export COCONUT_PURE_PYTHON=TRUE
test-mini-debug-pyparsing: test-mini-debug
.PHONY: test-mini-debug-purepy
test-mini-debug-purepy: export COCONUT_PURE_PYTHON=TRUE
test-mini-debug-purepy: test-mini-debug

.PHONY: debug-test-crash
debug-test-crash:
Expand All @@ -266,16 +320,16 @@ clean-no-tests:
.PHONY: clean
clean: clean-no-tests
rm -rf ./coconut/tests/dest
-find . -name "__coconut_cache__" -type d -prune -exec rm -rf '{}' +
-powershell -Command "get-childitem -Include __coconut_cache__ -Recurse -force | Remove-Item -Force -Recurse"

.PHONY: wipe
wipe: clean
rm -rf ./coconut/tests/dest vprof.json profile.log *.egg-info
-find . -name "__pycache__" -delete
-C:/GnuWin32/bin/find.exe . -name "__pycache__" -delete
-find . -name "__coconut_cache__" -delete
-C:/GnuWin32/bin/find.exe . -name "__coconut_cache__" -delete
-find . -name "__pycache__" -type d -prune -exec rm -rf '{}' +
-powershell -Command "get-childitem -Include __pycache__ -Recurse -force | Remove-Item -Force -Recurse"
-find . -name "*.pyc" -delete
-C:/GnuWin32/bin/find.exe . -name "*.pyc" -delete
-powershell -Command "get-childitem -Include *.pyc -Recurse -force | Remove-Item -Force -Recurse"
-python -m coconut --site-uninstall
-python3 -m coconut --site-uninstall
-python2 -m coconut --site-uninstall
Expand All @@ -302,20 +356,45 @@ upload: wipe dev just-upload
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 --stack-size 4096 --recursion-limit 4096 2>&1 | tee ./profile.log

.PHONY: profile-time
profile-time:
vprof -c h "./coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force --stack-size 4096 --recursion-limit 4096" --output-file ./vprof.json

.PHONY: profile-memory
profile-memory:
vprof -c m "./coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force --stack-size 4096 --recursion-limit 4096" --output-file ./vprof.json

.PHONY: view-profile
view-profile:
.PHONY: profile
profile: export COCONUT_USE_COLOR=TRUE
profile:
coconut ./coconut/tests/src/cocotest/agnostic/util.coco ./coconut/tests/dest/cocotest --force --jobs 0 --profile --verbose --stack-size 4096 --recursion-limit 4096 2>&1 | tee ./profile.log

.PHONY: open-speedscope
open-speedscope:
npm install -g speedscope
speedscope ./profile.speedscope

.PHONY: pyspy
pyspy:
py-spy record -o profile.speedscope --format speedscope --subprocesses --rate 75 -- python -m coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force
make open-speedscope

.PHONY: pyspy-purepy
pyspy-purepy: export COCONUT_PURE_PYTHON=TRUE
pyspy-purepy: pyspy

.PHONY: pyspy-native
pyspy-native:
py-spy record -o profile.speedscope --format speedscope --native --rate 75 -- python -m coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force --jobs 0
make open-speedscope

.PHONY: pyspy-runtime
pyspy-runtime:
py-spy record -o runtime_profile.speedscope --format speedscope -- python ./coconut/tests/dest/runner.py
speedscope ./runtime_profile.speedscope

.PHONY: vprof-time
vprof-time:
vprof -c h "./coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force --jobs 0 --stack-size 4096 --recursion-limit 4096" --output-file ./vprof.json
make view-vprof

.PHONY: vprof-memory
vprof-memory:
vprof -c m "./coconut ./coconut/tests/src/cocotest/agnostic ./coconut/tests/dest/cocotest --force --jobs 0 --stack-size 4096 --recursion-limit 4096" --output-file ./vprof.json
make view-vprof

.PHONY: view-vprof
view-vprof:
vprof --input-file ./vprof.json
Loading
Loading