diff --git a/.github/workflows/test-notebooks.yml b/.github/workflows/test-notebooks.yml new file mode 100644 index 0000000000..9de6a409e8 --- /dev/null +++ b/.github/workflows/test-notebooks.yml @@ -0,0 +1,42 @@ +name: "Test Jupyter Notebooks" + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test-notebooks: + strategy: + matrix: + python-version: ["3.10", "3.11"] + os: ["ubuntu-latest"] + fail-fast: false + + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + cache-dependency-path: | + **/pyproject.toml + **/constraints.txt + **/requirements-dev.txt + - name: Install python dependencies + run: | + python -m pip install -c ./constraints.txt pip setuptools wheel + python -m pip install -r ./requirements-dev.txt + - name: Run tox tests + env: + NUM_PROCESSES: auto + shell: bash + run: | + pyversion=${{ matrix.python-version }} + pyversion_no_dot=${pyversion//./} + tox run -e notebooks-py${pyversion_no_dot} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d9cfa0ff48..3259a74f38 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -62,7 +62,7 @@ repos: ## version = re.search('black==([0-9\.]*)', open("constraints.txt").read())[1] ## print(f"rev: '{version}' # version from constraints.txt") ##]]] - rev: '23.11.0' # version from constraints.txt + rev: '23.12.1' # version from constraints.txt ##[[[end]]] hooks: - id: black @@ -73,7 +73,7 @@ repos: ## version = re.search('isort==([0-9\.]*)', open("constraints.txt").read())[1] ## print(f"rev: '{version}' # version from constraints.txt") ##]]] - rev: '5.13.0' # version from constraints.txt + rev: '5.13.2' # version from constraints.txt ##[[[end]]] hooks: - id: isort @@ -84,7 +84,7 @@ repos: ## version = re.search('flake8==([0-9\.]*)', open("constraints.txt").read())[1] ## print(f"rev: '{version}' # version from constraints.txt") ##]]] - rev: '6.1.0' # version from constraints.txt + rev: '7.0.0' # version from constraints.txt ##[[[end]]] hooks: - id: flake8 @@ -97,7 +97,7 @@ repos: ## print(f"- {pkg}==" + str(re.search(f'\n{pkg}==([0-9\.]*)', constraints)[1])) ##]]] - darglint==1.8.1 - - flake8-bugbear==23.12.2 + - flake8-bugbear==24.1.17 - flake8-builtins==2.2.0 - flake8-debugger==4.1.2 - flake8-docstrings==1.7.0 @@ -146,9 +146,9 @@ repos: ## version = re.search('mypy==([0-9\.]*)', open("constraints.txt").read())[1] ## print(f"#========= FROM constraints.txt: v{version} =========") ##]]] - #========= FROM constraints.txt: v1.7.1 ========= + #========= FROM constraints.txt: v1.8.0 ========= ##[[[end]]] - rev: v1.7.1 # MUST match version ^^^^ in constraints.txt (if the mirror is up-to-date) + rev: v1.8.0 # MUST match version ^^^^ in constraints.txt (if the mirror is up-to-date) hooks: - id: mypy additional_dependencies: # versions from constraints.txt @@ -161,27 +161,27 @@ repos: ## print(f"- {pkg}==" + str(re.search(f'\n{pkg}==([0-9\.]*)', constraints)[1])) ##]]] - astunparse==1.6.3 - - attrs==23.1.0 - - black==23.11.0 + - attrs==23.2.0 + - black==23.12.1 - boltons==23.1.1 - cached-property==1.5.2 - click==8.1.7 - - cmake==3.27.9 - - cytoolz==0.12.2 + - cmake==3.28.1 + - cytoolz==0.12.3 - deepdiff==6.7.1 - devtools==0.12.2 - - frozendict==2.3.10 + - frozendict==2.4.0 - gridtools-cpp==2.3.1 - importlib-resources==6.1.1 - - jinja2==3.1.2 - - lark==1.1.8 - - mako==1.3.0 + - jinja2==3.1.3 + - lark==1.1.9 + - mako==1.3.1 - nanobind==1.8.0 - ninja==1.11.1.1 - numpy==1.24.4 - packaging==23.2 - pybind11==2.11.1 - - setuptools==69.0.2 + - setuptools==69.0.3 - tabulate==0.9.0 - typing-extensions==4.5.0 - xxhash==3.0.0 diff --git a/constraints.txt b/constraints.txt index 81abd64c6e..343615b421 100644 --- a/constraints.txt +++ b/constraints.txt @@ -6,17 +6,17 @@ # aenum==3.1.15 # via dace alabaster==0.7.13 # via sphinx -asttokens==2.4.1 # via devtools +asttokens==2.4.1 # via devtools, stack-data astunparse==1.6.3 ; python_version < "3.9" # via dace, gt4py (pyproject.toml) -attrs==23.1.0 # via flake8-bugbear, flake8-eradicate, gt4py (pyproject.toml), hypothesis, jsonschema, referencing -babel==2.13.1 # via sphinx -black==23.11.0 # via gt4py (pyproject.toml) +attrs==23.2.0 # via flake8-bugbear, flake8-eradicate, gt4py (pyproject.toml), hypothesis, jsonschema, referencing +babel==2.14.0 # via sphinx +backcall==0.2.0 # via ipython +black==23.12.1 # via gt4py (pyproject.toml) blinker==1.7.0 # via flask boltons==23.1.1 # via gt4py (pyproject.toml) build==1.0.3 # via pip-tools cached-property==1.5.2 # via gt4py (pyproject.toml) cachetools==5.3.2 # via tox -cerberus==1.3.5 # via plette certifi==2023.11.17 # via requests cffi==1.16.0 # via cryptography cfgv==3.4.0 # via pre-commit @@ -24,31 +24,34 @@ chardet==5.2.0 # via tox charset-normalizer==3.3.2 # via requests clang-format==17.0.6 # via -r requirements-dev.in, gt4py (pyproject.toml) click==8.1.7 # via black, flask, gt4py (pyproject.toml), pip-tools -cmake==3.27.9 # via dace, gt4py (pyproject.toml) +cmake==3.28.1 # via gt4py (pyproject.toml) cogapp==3.3.0 # via -r requirements-dev.in colorama==0.4.6 # via tox -coverage==7.3.2 # via -r requirements-dev.in, pytest-cov -cryptography==41.0.7 # via types-paramiko, types-pyopenssl, types-redis -cytoolz==0.12.2 # via gt4py (pyproject.toml) +comm==0.2.1 # via ipykernel +contourpy==1.1.1 # via matplotlib +coverage==7.4.0 # via -r requirements-dev.in, coverage, pytest-cov +cryptography==42.0.1 # via types-paramiko, types-pyopenssl, types-redis +cycler==0.12.1 # via matplotlib +cytoolz==0.12.3 # via gt4py (pyproject.toml) dace==0.15.1 # via gt4py (pyproject.toml) darglint==1.8.1 # via -r requirements-dev.in +debugpy==1.8.0 # via ipykernel +decorator==5.1.1 # via ipython deepdiff==6.7.1 # via gt4py (pyproject.toml) devtools==0.12.2 # via gt4py (pyproject.toml) dill==0.3.7 # via dace -distlib==0.3.7 # via requirementslib, virtualenv -distro==1.8.0 # via scikit-build -docopt==0.6.2 # via pipreqs +distlib==0.3.8 # via virtualenv docutils==0.20.1 # via restructuredtext-lint, sphinx, sphinx-rtd-theme eradicate==2.3.0 # via flake8-eradicate exceptiongroup==1.2.0 # via hypothesis, pytest execnet==2.0.2 # via pytest-cache, pytest-xdist -executing==2.0.1 # via devtools +executing==2.0.1 # via devtools, stack-data factory-boy==3.3.0 # via -r requirements-dev.in, pytest-factoryboy -faker==20.1.0 # via factory-boy -fastjsonschema==2.19.0 # via nbformat +faker==22.5.1 # via factory-boy +fastjsonschema==2.19.1 # via nbformat filelock==3.13.1 # via tox, virtualenv -flake8==6.1.0 # via -r requirements-dev.in, flake8-bugbear, flake8-builtins, flake8-debugger, flake8-docstrings, flake8-eradicate, flake8-mutable, flake8-pyproject, flake8-rst-docstrings -flake8-bugbear==23.12.2 # via -r requirements-dev.in +flake8==7.0.0 # via -r requirements-dev.in, flake8-bugbear, flake8-builtins, flake8-debugger, flake8-docstrings, flake8-eradicate, flake8-mutable, flake8-pyproject, flake8-rst-docstrings +flake8-bugbear==24.1.17 # via -r requirements-dev.in flake8-builtins==2.2.0 # via -r requirements-dev.in flake8-debugger==4.1.2 # via -r requirements-dev.in flake8-docstrings==1.7.0 # via -r requirements-dev.in @@ -56,80 +59,93 @@ flake8-eradicate==1.5.0 # via -r requirements-dev.in flake8-mutable==1.2.0 # via -r requirements-dev.in flake8-pyproject==1.2.3 # via -r requirements-dev.in flake8-rst-docstrings==0.3.0 # via -r requirements-dev.in -flask==3.0.0 # via dace +flask==3.0.1 # via dace +fonttools==4.47.2 # via matplotlib fparser==0.1.3 # via dace -frozendict==2.3.10 # via gt4py (pyproject.toml) +frozendict==2.4.0 # via gt4py (pyproject.toml) gridtools-cpp==2.3.1 # via gt4py (pyproject.toml) -hypothesis==6.92.0 # via -r requirements-dev.in, gt4py (pyproject.toml) +hypothesis==6.97.0 # via -r requirements-dev.in, gt4py (pyproject.toml) identify==2.5.33 # via pre-commit idna==3.6 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==7.0.0 # via build, flask, fparser, sphinx -importlib-resources==6.1.1 ; python_version < "3.9" # via gt4py (pyproject.toml), jsonschema, jsonschema-specifications +importlib-metadata==7.0.1 # via build, flask, fparser, jupyter-client, sphinx +importlib-resources==6.1.1 ; python_version < "3.9" # via gt4py (pyproject.toml), jsonschema, jsonschema-specifications, matplotlib inflection==0.5.1 # via pytest-factoryboy iniconfig==2.0.0 # via pytest -isort==5.13.0 # via -r requirements-dev.in +ipykernel==6.29.0 # via nbmake +ipython==8.12.3 # via ipykernel +isort==5.13.2 # via -r requirements-dev.in itsdangerous==2.1.2 # via flask -jinja2==3.1.2 # via flask, gt4py (pyproject.toml), sphinx -jsonschema==4.20.0 # via nbformat -jsonschema-specifications==2023.11.2 # via jsonschema -jupyter-core==5.5.0 # via nbformat -jupytext==1.16.0 # via -r requirements-dev.in -lark==1.1.8 # via gt4py (pyproject.toml) -mako==1.3.0 # via gt4py (pyproject.toml) +jedi==0.19.1 # via ipython +jinja2==3.1.3 # via flask, gt4py (pyproject.toml), sphinx +jsonschema==4.21.1 # via nbformat +jsonschema-specifications==2023.12.1 # via jsonschema +jupyter-client==8.6.0 # via ipykernel, nbclient +jupyter-core==5.7.1 # via ipykernel, jupyter-client, nbformat +jupytext==1.16.1 # via -r requirements-dev.in +kiwisolver==1.4.5 # via matplotlib +lark==1.1.9 # via gt4py (pyproject.toml) +mako==1.3.1 # via gt4py (pyproject.toml) markdown-it-py==3.0.0 # via jupytext, mdit-py-plugins -markupsafe==2.1.3 # via jinja2, mako, werkzeug +markupsafe==2.1.4 # via jinja2, mako, werkzeug +matplotlib==3.7.4 # via -r requirements-dev.in +matplotlib-inline==0.1.6 # via ipykernel, ipython mccabe==0.7.0 # via flake8 mdit-py-plugins==0.4.0 # via jupytext mdurl==0.1.2 # via markdown-it-py mpmath==1.3.0 # via sympy -mypy==1.7.1 # via -r requirements-dev.in +mypy==1.8.0 # via -r requirements-dev.in mypy-extensions==1.0.0 # via black, mypy nanobind==1.8.0 # via gt4py (pyproject.toml) -nbformat==5.9.2 # via jupytext +nbclient==0.6.8 # via nbmake +nbformat==5.9.2 # via jupytext, nbclient, nbmake +nbmake==1.4.6 # via -r requirements-dev.in +nest-asyncio==1.6.0 # via ipykernel, nbclient networkx==3.1 # via dace ninja==1.11.1.1 # via gt4py (pyproject.toml) nodeenv==1.8.0 # via pre-commit -numpy==1.24.4 # via dace, gt4py (pyproject.toml), types-jack-client +numpy==1.24.4 # via contourpy, dace, gt4py (pyproject.toml), matplotlib, types-jack-client ordered-set==4.1.0 # via deepdiff -packaging==23.2 # via black, build, gt4py (pyproject.toml), jupytext, pyproject-api, pytest, scikit-build, setuptools-scm, sphinx, tox +packaging==23.2 # via black, build, gt4py (pyproject.toml), ipykernel, jupytext, matplotlib, pyproject-api, pytest, setuptools-scm, sphinx, tox +parso==0.8.3 # via jedi pathspec==0.12.1 # via black -pep517==0.13.1 # via requirementslib -pip-api==0.0.30 # via isort +pexpect==4.9.0 # via ipython +pickleshare==0.7.5 # via ipython +pillow==10.2.0 # via matplotlib pip-tools==7.3.0 # via -r requirements-dev.in -pipdeptree==2.13.1 # via -r requirements-dev.in -pipreqs==0.4.13 # via isort +pipdeptree==2.13.2 # via -r requirements-dev.in pkgutil-resolve-name==1.3.10 # via jsonschema -platformdirs==4.1.0 # via black, jupyter-core, requirementslib, tox, virtualenv -plette==0.4.4 # via requirementslib -pluggy==1.3.0 # via pytest, tox +platformdirs==4.1.0 # via black, jupyter-core, tox, virtualenv +pluggy==1.4.0 # via pytest, tox ply==3.11 # via dace pre-commit==3.5.0 # via -r requirements-dev.in -psutil==5.9.6 # via -r requirements-dev.in, pytest-xdist +prompt-toolkit==3.0.43 # via ipython +psutil==5.9.8 # via -r requirements-dev.in, ipykernel, pytest-xdist +ptyprocess==0.7.0 # via pexpect +pure-eval==0.2.2 # via stack-data pybind11==2.11.1 # via gt4py (pyproject.toml) pycodestyle==2.11.1 # via flake8, flake8-debugger pycparser==2.21 # via cffi -pydantic==1.10.13 # via requirementslib pydocstyle==6.3.0 # via flake8-docstrings -pyflakes==3.1.0 # via flake8 -pygments==2.17.2 # via -r requirements-dev.in, devtools, flake8-rst-docstrings, sphinx +pyflakes==3.2.0 # via flake8 +pygments==2.17.2 # via -r requirements-dev.in, devtools, flake8-rst-docstrings, ipython, nbmake, sphinx +pyparsing==3.1.1 # via matplotlib pyproject-api==1.6.1 # via tox pyproject-hooks==1.0.0 # via build -pytest==7.4.3 # via -r requirements-dev.in, gt4py (pyproject.toml), pytest-cache, pytest-cov, pytest-factoryboy, pytest-xdist +pytest==7.4.4 # via -r requirements-dev.in, gt4py (pyproject.toml), nbmake, pytest-cache, pytest-cov, pytest-factoryboy, pytest-xdist pytest-cache==1.0 # via -r requirements-dev.in pytest-cov==4.1.0 # via -r requirements-dev.in pytest-factoryboy==2.6.0 # via -r requirements-dev.in -pytest-xdist==3.5.0 # via -r requirements-dev.in -python-dateutil==2.8.2 # via faker +pytest-xdist==3.5.0 # via -r requirements-dev.in, pytest-xdist +python-dateutil==2.8.2 # via faker, jupyter-client, matplotlib pytz==2023.3.post1 # via babel pyyaml==6.0.1 # via dace, jupytext, pre-commit -referencing==0.32.0 # via jsonschema, jsonschema-specifications -requests==2.31.0 # via dace, requirementslib, sphinx, yarg -requirementslib==3.0.0 # via isort +pyzmq==25.1.2 # via ipykernel, jupyter-client +referencing==0.32.1 # via jsonschema, jsonschema-specifications +requests==2.31.0 # via dace, sphinx restructuredtext-lint==1.4.0 # via flake8-rst-docstrings -rpds-py==0.13.2 # via jsonschema, referencing -ruff==0.1.7 # via -r requirements-dev.in -scikit-build==0.17.6 # via dace +rpds-py==0.17.1 # via jsonschema, referencing +ruff==0.1.14 # via -r requirements-dev.in setuptools-scm==8.0.4 # via fparser six==1.16.0 # via asttokens, astunparse, python-dateutil snowballstemmer==2.2.0 # via pydocstyle, sphinx @@ -143,15 +159,16 @@ sphinxcontrib-jquery==4.1 # via sphinx-rtd-theme sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx +stack-data==0.6.3 # via ipython sympy==1.9 # via dace, gt4py (pyproject.toml) tabulate==0.9.0 # via gt4py (pyproject.toml) toml==0.10.2 # via jupytext -tomli==2.0.1 # via -r requirements-dev.in, black, build, coverage, flake8-pyproject, mypy, pep517, pip-tools, pyproject-api, pyproject-hooks, pytest, scikit-build, setuptools-scm, tox -tomlkit==0.12.3 # via plette, requirementslib -toolz==0.12.0 # via cytoolz -tox==4.11.4 # via -r requirements-dev.in -traitlets==5.14.0 # via jupyter-core, nbformat -types-aiofiles==23.2.0.0 # via types-all +tomli==2.0.1 # via -r requirements-dev.in, black, build, coverage, flake8-pyproject, mypy, pip-tools, pyproject-api, pyproject-hooks, pytest, setuptools-scm, tox +toolz==0.12.1 # via cytoolz +tornado==6.4 # via ipykernel, jupyter-client +tox==4.12.1 # via -r requirements-dev.in +traitlets==5.14.1 # via comm, ipykernel, ipython, jupyter-client, jupyter-core, matplotlib-inline, nbclient, nbformat +types-aiofiles==23.2.0.20240106 # via types-all types-all==1.0.0 # via -r requirements-dev.in types-annoy==1.17.8.4 # via types-all types-atomicwrites==1.4.5.1 # via types-all @@ -161,22 +178,22 @@ types-bleach==6.1.0.1 # via types-all types-boto==2.49.18.9 # via types-all types-cachetools==5.3.0.7 # via types-all types-certifi==2021.10.8.3 # via types-all -types-cffi==1.16.0.0 # via types-jack-client +types-cffi==1.16.0.20240106 # via types-jack-client types-characteristic==14.3.7 # via types-all types-chardet==5.0.4.6 # via types-all types-click==7.1.8 # via types-all, types-flask -types-click-spinner==0.1.13.6 # via types-all -types-colorama==0.4.15.12 # via types-all +types-click-spinner==0.1.13.20240106 # via types-all +types-colorama==0.4.15.20240106 # via types-all types-contextvars==2.4.7.3 # via types-all -types-croniter==2.0.0.0 # via types-all +types-croniter==2.0.0.20240106 # via types-all types-cryptography==3.3.23.2 # via types-all, types-openssl-python, types-pyjwt types-dataclasses==0.6.6 # via types-all -types-dateparser==1.1.4.10 # via types-all +types-dateparser==1.1.4.20240106 # via types-all types-datetimerange==2.0.0.6 # via types-all -types-decorator==5.1.8.4 # via types-all -types-deprecated==1.2.9.3 # via types-all +types-decorator==5.1.8.20240106 # via types-all +types-deprecated==1.2.9.20240106 # via types-all types-docopt==0.6.11.4 # via types-all -types-docutils==0.20.0.3 # via types-all +types-docutils==0.20.0.20240125 # via types-all types-emoji==2.1.0.3 # via types-all types-enum34==1.1.8 # via types-all types-fb303==1.0.0 # via types-all, types-scribe @@ -189,67 +206,67 @@ types-futures==3.3.8 # via types-all types-geoip2==3.0.0 # via types-all types-ipaddress==1.0.8 # via types-all, types-maxminddb types-itsdangerous==1.1.6 # via types-all -types-jack-client==0.5.10.10 # via types-all +types-jack-client==0.5.10.20240106 # via types-all types-jinja2==2.11.9 # via types-all, types-flask types-kazoo==0.1.3 # via types-all -types-markdown==3.5.0.3 # via types-all +types-markdown==3.5.0.20240106 # via types-all types-markupsafe==1.1.10 # via types-all, types-jinja2 types-maxminddb==1.5.0 # via types-all, types-geoip2 -types-mock==5.1.0.3 # via types-all +types-mock==5.1.0.20240106 # via types-all types-mypy-extensions==1.0.0.5 # via types-all types-nmap==0.1.6 # via types-all types-openssl-python==0.1.3 # via types-all types-orjson==3.6.2 # via types-all -types-paramiko==3.3.0.2 # via types-all, types-pysftp +types-paramiko==3.4.0.20240120 # via types-all, types-pysftp types-pathlib2==2.3.0 # via types-all -types-pillow==10.1.0.2 # via types-all +types-pillow==10.2.0.20240125 # via types-all types-pkg-resources==0.1.3 # via types-all -types-polib==1.2.0.1 # via types-all -types-protobuf==4.24.0.4 # via types-all -types-pyaudio==0.2.16.7 # via types-all -types-pycurl==7.45.2.5 # via types-all +types-polib==1.2.0.20240115 # via types-all +types-protobuf==4.24.0.20240106 # via types-all +types-pyaudio==0.2.16.20240106 # via types-all +types-pycurl==7.45.2.20240106 # via types-all types-pyfarmhash==0.3.1.2 # via types-all types-pyjwt==1.7.1 # via types-all types-pymssql==2.1.0 # via types-all types-pymysql==1.1.0.1 # via types-all -types-pyopenssl==23.3.0.0 # via types-redis +types-pyopenssl==23.3.0.20240106 # via types-redis types-pyrfc3339==1.1.1.5 # via types-all -types-pysftp==0.2.17.6 # via types-all -types-python-dateutil==2.8.19.14 # via types-all, types-datetimerange +types-pysftp==0.2.17.20240106 # via types-all +types-python-dateutil==2.8.19.20240106 # via types-all, types-datetimerange types-python-gflags==3.1.7.3 # via types-all types-python-slugify==8.0.0.3 # via types-all types-pytz==2023.3.1.1 # via types-all, types-tzlocal types-pyvmomi==8.0.0.6 # via types-all types-pyyaml==6.0.12.12 # via types-all -types-redis==4.6.0.11 # via types-all -types-requests==2.31.0.10 # via types-all +types-redis==4.6.0.20240106 # via types-all +types-requests==2.31.0.20240125 # via types-all types-retry==0.9.9.4 # via types-all types-routes==2.5.0 # via types-all types-scribe==2.0.0 # via types-all -types-setuptools==69.0.0.0 # via types-cffi +types-setuptools==69.0.0.20240125 # via types-cffi types-simplejson==3.19.0.2 # via types-all types-singledispatch==4.1.0.0 # via types-all -types-six==1.16.21.9 # via types-all -types-tabulate==0.9.0.3 # via types-all +types-six==1.16.21.20240106 # via types-all +types-tabulate==0.9.0.20240106 # via types-all types-termcolor==1.1.6.2 # via types-all types-toml==0.10.8.7 # via types-all types-tornado==5.1.1 # via types-all types-typed-ast==1.5.8.7 # via types-all types-tzlocal==5.1.0.1 # via types-all -types-ujson==5.8.0.1 # via types-all -types-waitress==2.1.4.9 # via types-all +types-ujson==5.9.0.0 # via types-all +types-waitress==2.1.4.20240106 # via types-all types-werkzeug==1.0.9 # via types-all, types-flask types-xxhash==3.0.5.2 # via types-all -typing-extensions==4.5.0 # via black, faker, gt4py (pyproject.toml), mypy, pydantic, pytest-factoryboy, setuptools-scm +typing-extensions==4.5.0 # via black, faker, gt4py (pyproject.toml), ipython, mypy, pytest-factoryboy, setuptools-scm urllib3==2.1.0 # via requests, types-requests virtualenv==20.25.0 # via pre-commit, tox +wcwidth==0.2.13 # via prompt-toolkit websockets==12.0 # via dace werkzeug==3.0.1 # via flask -wheel==0.42.0 # via astunparse, pip-tools, scikit-build +wheel==0.42.0 # via astunparse, pip-tools xxhash==3.0.0 # via gt4py (pyproject.toml) -yarg==0.1.9 # via pipreqs zipp==3.17.0 # via importlib-metadata, importlib-resources # The following packages are considered to be unsafe in a requirements file: -pip==23.3.1 # via pip-api, pip-tools, requirementslib -setuptools==69.0.2 # via gt4py (pyproject.toml), nodeenv, pip-tools, requirementslib, scikit-build, setuptools-scm +pip==23.3.2 # via pip-tools +setuptools==69.0.3 # via gt4py (pyproject.toml), nodeenv, pip-tools, setuptools-scm diff --git a/examples/lap_cartesian_vs_next.ipynb b/examples/lap_cartesian_vs_next.ipynb index cb80122570..8187a571dd 100644 --- a/examples/lap_cartesian_vs_next.ipynb +++ b/examples/lap_cartesian_vs_next.ipynb @@ -81,7 +81,7 @@ "source": [ "import gt4py.next as gtx\n", "\n", - "allocator = gtx.itir_embedded # should match the executor\n", + "allocator = gtx.itir_python # should match the executor\n", "# allocator = gtx.gtfn_cpu\n", "# allocator = gtx.gtfn_gpu\n", "\n", @@ -137,7 +137,7 @@ "source": [ "from gt4py.next import Field\n", "\n", - "next_backend = gtx.itir_embedded\n", + "next_backend = gtx.itir_python\n", "# next_backend = gtx.gtfn_cpu\n", "# next_backend = gtx.gtfn_gpu\n", "\n", diff --git a/min-extra-requirements-test.txt b/min-extra-requirements-test.txt index fd7724bac9..3c6cd3d9ff 100644 --- a/min-extra-requirements-test.txt +++ b/min-extra-requirements-test.txt @@ -49,8 +49,10 @@ jinja2==3.0.0 jupytext==1.14 lark==1.1.2 mako==1.1 +matplotlib==3.3 mypy==1.0 nanobind==1.4.0 +nbmake==1.4.6 ninja==1.10 numpy==1.21.2 packaging==20.0 diff --git a/min-requirements-test.txt b/min-requirements-test.txt index a6e5d19d1d..d2ebaba331 100644 --- a/min-requirements-test.txt +++ b/min-requirements-test.txt @@ -46,8 +46,10 @@ jinja2==3.0.0 jupytext==1.14 lark==1.1.2 mako==1.1 +matplotlib==3.3 mypy==1.0 nanobind==1.4.0 +nbmake==1.4.6 ninja==1.10 numpy==1.21.2 packaging==20.0 diff --git a/requirements-dev.in b/requirements-dev.in index 46bf3d9a8c..59ddb733d0 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -26,6 +26,8 @@ flake8-rst-docstrings>=0.0.14 isort>=5.10 jupytext>=1.14 mypy>=1.0 +matplotlib>=3.3 +nbmake>=1.4.6 pipdeptree>=2.3 pip-tools>=6.10 pre-commit>=2.17 diff --git a/requirements-dev.txt b/requirements-dev.txt index 0fa523866f..abfa99a2ae 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,17 +6,17 @@ # aenum==3.1.15 # via dace alabaster==0.7.13 # via sphinx -asttokens==2.4.1 # via devtools +asttokens==2.4.1 # via devtools, stack-data astunparse==1.6.3 ; python_version < "3.9" # via dace, gt4py (pyproject.toml) -attrs==23.1.0 # via flake8-bugbear, flake8-eradicate, gt4py (pyproject.toml), hypothesis, jsonschema, referencing -babel==2.13.1 # via sphinx -black==23.11.0 # via gt4py (pyproject.toml) +attrs==23.2.0 # via flake8-bugbear, flake8-eradicate, gt4py (pyproject.toml), hypothesis, jsonschema, referencing +babel==2.14.0 # via sphinx +backcall==0.2.0 # via ipython +black==23.12.1 # via gt4py (pyproject.toml) blinker==1.7.0 # via flask boltons==23.1.1 # via gt4py (pyproject.toml) build==1.0.3 # via pip-tools cached-property==1.5.2 # via gt4py (pyproject.toml) cachetools==5.3.2 # via tox -cerberus==1.3.5 # via plette certifi==2023.11.17 # via requests cffi==1.16.0 # via cryptography cfgv==3.4.0 # via pre-commit @@ -24,31 +24,34 @@ chardet==5.2.0 # via tox charset-normalizer==3.3.2 # via requests clang-format==17.0.6 # via -r requirements-dev.in, gt4py (pyproject.toml) click==8.1.7 # via black, flask, gt4py (pyproject.toml), pip-tools -cmake==3.27.9 # via dace, gt4py (pyproject.toml) +cmake==3.28.1 # via gt4py (pyproject.toml) cogapp==3.3.0 # via -r requirements-dev.in colorama==0.4.6 # via tox -coverage[toml]==7.3.2 # via -r requirements-dev.in, pytest-cov -cryptography==41.0.7 # via types-paramiko, types-pyopenssl, types-redis -cytoolz==0.12.2 # via gt4py (pyproject.toml) +comm==0.2.1 # via ipykernel +contourpy==1.1.1 # via matplotlib +coverage[toml]==7.4.0 # via -r requirements-dev.in, coverage, pytest-cov +cryptography==42.0.1 # via types-paramiko, types-pyopenssl, types-redis +cycler==0.12.1 # via matplotlib +cytoolz==0.12.3 # via gt4py (pyproject.toml) dace==0.15.1 # via gt4py (pyproject.toml) darglint==1.8.1 # via -r requirements-dev.in +debugpy==1.8.0 # via ipykernel +decorator==5.1.1 # via ipython deepdiff==6.7.1 # via gt4py (pyproject.toml) devtools==0.12.2 # via gt4py (pyproject.toml) dill==0.3.7 # via dace -distlib==0.3.7 # via requirementslib, virtualenv -distro==1.8.0 # via scikit-build -docopt==0.6.2 # via pipreqs +distlib==0.3.8 # via virtualenv docutils==0.20.1 # via restructuredtext-lint, sphinx, sphinx-rtd-theme eradicate==2.3.0 # via flake8-eradicate exceptiongroup==1.2.0 # via hypothesis, pytest execnet==2.0.2 # via pytest-cache, pytest-xdist -executing==2.0.1 # via devtools +executing==2.0.1 # via devtools, stack-data factory-boy==3.3.0 # via -r requirements-dev.in, pytest-factoryboy -faker==20.1.0 # via factory-boy -fastjsonschema==2.19.0 # via nbformat +faker==22.5.1 # via factory-boy +fastjsonschema==2.19.1 # via nbformat filelock==3.13.1 # via tox, virtualenv -flake8==6.1.0 # via -r requirements-dev.in, flake8-bugbear, flake8-builtins, flake8-debugger, flake8-docstrings, flake8-eradicate, flake8-mutable, flake8-pyproject, flake8-rst-docstrings -flake8-bugbear==23.12.2 # via -r requirements-dev.in +flake8==7.0.0 # via -r requirements-dev.in, flake8-bugbear, flake8-builtins, flake8-debugger, flake8-docstrings, flake8-eradicate, flake8-mutable, flake8-pyproject, flake8-rst-docstrings +flake8-bugbear==24.1.17 # via -r requirements-dev.in flake8-builtins==2.2.0 # via -r requirements-dev.in flake8-debugger==4.1.2 # via -r requirements-dev.in flake8-docstrings==1.7.0 # via -r requirements-dev.in @@ -56,80 +59,93 @@ flake8-eradicate==1.5.0 # via -r requirements-dev.in flake8-mutable==1.2.0 # via -r requirements-dev.in flake8-pyproject==1.2.3 # via -r requirements-dev.in flake8-rst-docstrings==0.3.0 # via -r requirements-dev.in -flask==3.0.0 # via dace +flask==3.0.1 # via dace +fonttools==4.47.2 # via matplotlib fparser==0.1.3 # via dace -frozendict==2.3.10 # via gt4py (pyproject.toml) +frozendict==2.4.0 # via gt4py (pyproject.toml) gridtools-cpp==2.3.1 # via gt4py (pyproject.toml) -hypothesis==6.92.0 # via -r requirements-dev.in, gt4py (pyproject.toml) +hypothesis==6.97.0 # via -r requirements-dev.in, gt4py (pyproject.toml) identify==2.5.33 # via pre-commit idna==3.6 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==7.0.0 # via build, flask, fparser, sphinx -importlib-resources==6.1.1 ; python_version < "3.9" # via gt4py (pyproject.toml), jsonschema, jsonschema-specifications +importlib-metadata==7.0.1 # via build, flask, fparser, jupyter-client, sphinx +importlib-resources==6.1.1 ; python_version < "3.9" # via gt4py (pyproject.toml), jsonschema, jsonschema-specifications, matplotlib inflection==0.5.1 # via pytest-factoryboy iniconfig==2.0.0 # via pytest -isort==5.13.0 # via -r requirements-dev.in +ipykernel==6.29.0 # via nbmake +ipython==8.12.3 # via ipykernel +isort==5.13.2 # via -r requirements-dev.in itsdangerous==2.1.2 # via flask -jinja2==3.1.2 # via flask, gt4py (pyproject.toml), sphinx -jsonschema==4.20.0 # via nbformat -jsonschema-specifications==2023.11.2 # via jsonschema -jupyter-core==5.5.0 # via nbformat -jupytext==1.16.0 # via -r requirements-dev.in -lark==1.1.8 # via gt4py (pyproject.toml) -mako==1.3.0 # via gt4py (pyproject.toml) +jedi==0.19.1 # via ipython +jinja2==3.1.3 # via flask, gt4py (pyproject.toml), sphinx +jsonschema==4.21.1 # via nbformat +jsonschema-specifications==2023.12.1 # via jsonschema +jupyter-client==8.6.0 # via ipykernel, nbclient +jupyter-core==5.7.1 # via ipykernel, jupyter-client, nbformat +jupytext==1.16.1 # via -r requirements-dev.in +kiwisolver==1.4.5 # via matplotlib +lark==1.1.9 # via gt4py (pyproject.toml) +mako==1.3.1 # via gt4py (pyproject.toml) markdown-it-py==3.0.0 # via jupytext, mdit-py-plugins -markupsafe==2.1.3 # via jinja2, mako, werkzeug +markupsafe==2.1.4 # via jinja2, mako, werkzeug +matplotlib==3.7.4 # via -r requirements-dev.in +matplotlib-inline==0.1.6 # via ipykernel, ipython mccabe==0.7.0 # via flake8 mdit-py-plugins==0.4.0 # via jupytext mdurl==0.1.2 # via markdown-it-py mpmath==1.3.0 # via sympy -mypy==1.7.1 # via -r requirements-dev.in +mypy==1.8.0 # via -r requirements-dev.in mypy-extensions==1.0.0 # via black, mypy nanobind==1.8.0 # via gt4py (pyproject.toml) -nbformat==5.9.2 # via jupytext +nbclient==0.6.8 # via nbmake +nbformat==5.9.2 # via jupytext, nbclient, nbmake +nbmake==1.4.6 # via -r requirements-dev.in +nest-asyncio==1.6.0 # via ipykernel, nbclient networkx==3.1 # via dace ninja==1.11.1.1 # via gt4py (pyproject.toml) nodeenv==1.8.0 # via pre-commit -numpy==1.24.4 # via dace, gt4py (pyproject.toml), types-jack-client +numpy==1.24.4 # via contourpy, dace, gt4py (pyproject.toml), matplotlib, types-jack-client ordered-set==4.1.0 # via deepdiff -packaging==23.2 # via black, build, gt4py (pyproject.toml), jupytext, pyproject-api, pytest, scikit-build, setuptools-scm, sphinx, tox +packaging==23.2 # via black, build, gt4py (pyproject.toml), ipykernel, jupytext, matplotlib, pyproject-api, pytest, setuptools-scm, sphinx, tox +parso==0.8.3 # via jedi pathspec==0.12.1 # via black -pep517==0.13.1 # via requirementslib -pip-api==0.0.30 # via isort +pexpect==4.9.0 # via ipython +pickleshare==0.7.5 # via ipython +pillow==10.2.0 # via matplotlib pip-tools==7.3.0 # via -r requirements-dev.in -pipdeptree==2.13.1 # via -r requirements-dev.in -pipreqs==0.4.13 # via isort +pipdeptree==2.13.2 # via -r requirements-dev.in pkgutil-resolve-name==1.3.10 # via jsonschema -platformdirs==4.1.0 # via black, jupyter-core, requirementslib, tox, virtualenv -plette[validation]==0.4.4 # via requirementslib -pluggy==1.3.0 # via pytest, tox +platformdirs==4.1.0 # via black, jupyter-core, tox, virtualenv +pluggy==1.4.0 # via pytest, tox ply==3.11 # via dace pre-commit==3.5.0 # via -r requirements-dev.in -psutil==5.9.6 # via -r requirements-dev.in, pytest-xdist +prompt-toolkit==3.0.43 # via ipython +psutil==5.9.8 # via -r requirements-dev.in, ipykernel, pytest-xdist +ptyprocess==0.7.0 # via pexpect +pure-eval==0.2.2 # via stack-data pybind11==2.11.1 # via gt4py (pyproject.toml) pycodestyle==2.11.1 # via flake8, flake8-debugger pycparser==2.21 # via cffi -pydantic==1.10.13 # via requirementslib pydocstyle==6.3.0 # via flake8-docstrings -pyflakes==3.1.0 # via flake8 -pygments==2.17.2 # via -r requirements-dev.in, devtools, flake8-rst-docstrings, sphinx +pyflakes==3.2.0 # via flake8 +pygments==2.17.2 # via -r requirements-dev.in, devtools, flake8-rst-docstrings, ipython, nbmake, sphinx +pyparsing==3.1.1 # via matplotlib pyproject-api==1.6.1 # via tox pyproject-hooks==1.0.0 # via build -pytest==7.4.3 # via -r requirements-dev.in, gt4py (pyproject.toml), pytest-cache, pytest-cov, pytest-factoryboy, pytest-xdist +pytest==7.4.4 # via -r requirements-dev.in, gt4py (pyproject.toml), nbmake, pytest-cache, pytest-cov, pytest-factoryboy, pytest-xdist pytest-cache==1.0 # via -r requirements-dev.in pytest-cov==4.1.0 # via -r requirements-dev.in pytest-factoryboy==2.6.0 # via -r requirements-dev.in -pytest-xdist[psutil]==3.5.0 # via -r requirements-dev.in -python-dateutil==2.8.2 # via faker +pytest-xdist[psutil]==3.5.0 # via -r requirements-dev.in, pytest-xdist +python-dateutil==2.8.2 # via faker, jupyter-client, matplotlib pytz==2023.3.post1 # via babel pyyaml==6.0.1 # via dace, jupytext, pre-commit -referencing==0.32.0 # via jsonschema, jsonschema-specifications -requests==2.31.0 # via dace, requirementslib, sphinx, yarg -requirementslib==3.0.0 # via isort +pyzmq==25.1.2 # via ipykernel, jupyter-client +referencing==0.32.1 # via jsonschema, jsonschema-specifications +requests==2.31.0 # via dace, sphinx restructuredtext-lint==1.4.0 # via flake8-rst-docstrings -rpds-py==0.13.2 # via jsonschema, referencing -ruff==0.1.7 # via -r requirements-dev.in -scikit-build==0.17.6 # via dace +rpds-py==0.17.1 # via jsonschema, referencing +ruff==0.1.14 # via -r requirements-dev.in setuptools-scm==8.0.4 # via fparser six==1.16.0 # via asttokens, astunparse, python-dateutil snowballstemmer==2.2.0 # via pydocstyle, sphinx @@ -143,15 +159,16 @@ sphinxcontrib-jquery==4.1 # via sphinx-rtd-theme sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx +stack-data==0.6.3 # via ipython sympy==1.9 # via dace, gt4py (pyproject.toml) tabulate==0.9.0 # via gt4py (pyproject.toml) toml==0.10.2 # via jupytext -tomli==2.0.1 # via -r requirements-dev.in, black, build, coverage, flake8-pyproject, mypy, pep517, pip-tools, pyproject-api, pyproject-hooks, pytest, scikit-build, setuptools-scm, tox -tomlkit==0.12.3 # via plette, requirementslib -toolz==0.12.0 # via cytoolz -tox==4.11.4 # via -r requirements-dev.in -traitlets==5.14.0 # via jupyter-core, nbformat -types-aiofiles==23.2.0.0 # via types-all +tomli==2.0.1 # via -r requirements-dev.in, black, build, coverage, flake8-pyproject, mypy, pip-tools, pyproject-api, pyproject-hooks, pytest, setuptools-scm, tox +toolz==0.12.1 # via cytoolz +tornado==6.4 # via ipykernel, jupyter-client +tox==4.12.1 # via -r requirements-dev.in +traitlets==5.14.1 # via comm, ipykernel, ipython, jupyter-client, jupyter-core, matplotlib-inline, nbclient, nbformat +types-aiofiles==23.2.0.20240106 # via types-all types-all==1.0.0 # via -r requirements-dev.in types-annoy==1.17.8.4 # via types-all types-atomicwrites==1.4.5.1 # via types-all @@ -161,22 +178,22 @@ types-bleach==6.1.0.1 # via types-all types-boto==2.49.18.9 # via types-all types-cachetools==5.3.0.7 # via types-all types-certifi==2021.10.8.3 # via types-all -types-cffi==1.16.0.0 # via types-jack-client +types-cffi==1.16.0.20240106 # via types-jack-client types-characteristic==14.3.7 # via types-all types-chardet==5.0.4.6 # via types-all types-click==7.1.8 # via types-all, types-flask -types-click-spinner==0.1.13.6 # via types-all -types-colorama==0.4.15.12 # via types-all +types-click-spinner==0.1.13.20240106 # via types-all +types-colorama==0.4.15.20240106 # via types-all types-contextvars==2.4.7.3 # via types-all -types-croniter==2.0.0.0 # via types-all +types-croniter==2.0.0.20240106 # via types-all types-cryptography==3.3.23.2 # via types-all, types-openssl-python, types-pyjwt types-dataclasses==0.6.6 # via types-all -types-dateparser==1.1.4.10 # via types-all +types-dateparser==1.1.4.20240106 # via types-all types-datetimerange==2.0.0.6 # via types-all -types-decorator==5.1.8.4 # via types-all -types-deprecated==1.2.9.3 # via types-all +types-decorator==5.1.8.20240106 # via types-all +types-deprecated==1.2.9.20240106 # via types-all types-docopt==0.6.11.4 # via types-all -types-docutils==0.20.0.3 # via types-all +types-docutils==0.20.0.20240125 # via types-all types-emoji==2.1.0.3 # via types-all types-enum34==1.1.8 # via types-all types-fb303==1.0.0 # via types-all, types-scribe @@ -189,67 +206,67 @@ types-futures==3.3.8 # via types-all types-geoip2==3.0.0 # via types-all types-ipaddress==1.0.8 # via types-all, types-maxminddb types-itsdangerous==1.1.6 # via types-all -types-jack-client==0.5.10.10 # via types-all +types-jack-client==0.5.10.20240106 # via types-all types-jinja2==2.11.9 # via types-all, types-flask types-kazoo==0.1.3 # via types-all -types-markdown==3.5.0.3 # via types-all +types-markdown==3.5.0.20240106 # via types-all types-markupsafe==1.1.10 # via types-all, types-jinja2 types-maxminddb==1.5.0 # via types-all, types-geoip2 -types-mock==5.1.0.3 # via types-all +types-mock==5.1.0.20240106 # via types-all types-mypy-extensions==1.0.0.5 # via types-all types-nmap==0.1.6 # via types-all types-openssl-python==0.1.3 # via types-all types-orjson==3.6.2 # via types-all -types-paramiko==3.3.0.2 # via types-all, types-pysftp +types-paramiko==3.4.0.20240120 # via types-all, types-pysftp types-pathlib2==2.3.0 # via types-all -types-pillow==10.1.0.2 # via types-all +types-pillow==10.2.0.20240125 # via types-all types-pkg-resources==0.1.3 # via types-all -types-polib==1.2.0.1 # via types-all -types-protobuf==4.24.0.4 # via types-all -types-pyaudio==0.2.16.7 # via types-all -types-pycurl==7.45.2.5 # via types-all +types-polib==1.2.0.20240115 # via types-all +types-protobuf==4.24.0.20240106 # via types-all +types-pyaudio==0.2.16.20240106 # via types-all +types-pycurl==7.45.2.20240106 # via types-all types-pyfarmhash==0.3.1.2 # via types-all types-pyjwt==1.7.1 # via types-all types-pymssql==2.1.0 # via types-all types-pymysql==1.1.0.1 # via types-all -types-pyopenssl==23.3.0.0 # via types-redis +types-pyopenssl==23.3.0.20240106 # via types-redis types-pyrfc3339==1.1.1.5 # via types-all -types-pysftp==0.2.17.6 # via types-all -types-python-dateutil==2.8.19.14 # via types-all, types-datetimerange +types-pysftp==0.2.17.20240106 # via types-all +types-python-dateutil==2.8.19.20240106 # via types-all, types-datetimerange types-python-gflags==3.1.7.3 # via types-all types-python-slugify==8.0.0.3 # via types-all types-pytz==2023.3.1.1 # via types-all, types-tzlocal types-pyvmomi==8.0.0.6 # via types-all types-pyyaml==6.0.12.12 # via types-all -types-redis==4.6.0.11 # via types-all -types-requests==2.31.0.10 # via types-all +types-redis==4.6.0.20240106 # via types-all +types-requests==2.31.0.20240125 # via types-all types-retry==0.9.9.4 # via types-all types-routes==2.5.0 # via types-all types-scribe==2.0.0 # via types-all -types-setuptools==69.0.0.0 # via types-cffi +types-setuptools==69.0.0.20240125 # via types-cffi types-simplejson==3.19.0.2 # via types-all types-singledispatch==4.1.0.0 # via types-all -types-six==1.16.21.9 # via types-all -types-tabulate==0.9.0.3 # via types-all +types-six==1.16.21.20240106 # via types-all +types-tabulate==0.9.0.20240106 # via types-all types-termcolor==1.1.6.2 # via types-all types-toml==0.10.8.7 # via types-all types-tornado==5.1.1 # via types-all types-typed-ast==1.5.8.7 # via types-all types-tzlocal==5.1.0.1 # via types-all -types-ujson==5.8.0.1 # via types-all -types-waitress==2.1.4.9 # via types-all +types-ujson==5.9.0.0 # via types-all +types-waitress==2.1.4.20240106 # via types-all types-werkzeug==1.0.9 # via types-all, types-flask types-xxhash==3.0.5.2 # via types-all -typing-extensions==4.5.0 # via black, faker, gt4py (pyproject.toml), mypy, pydantic, pytest-factoryboy, setuptools-scm +typing-extensions==4.5.0 # via black, faker, gt4py (pyproject.toml), ipython, mypy, pytest-factoryboy, setuptools-scm urllib3==2.1.0 # via requests, types-requests virtualenv==20.25.0 # via pre-commit, tox +wcwidth==0.2.13 # via prompt-toolkit websockets==12.0 # via dace werkzeug==3.0.1 # via flask -wheel==0.42.0 # via astunparse, pip-tools, scikit-build +wheel==0.42.0 # via astunparse, pip-tools xxhash==3.0.0 # via gt4py (pyproject.toml) -yarg==0.1.9 # via pipreqs zipp==3.17.0 # via importlib-metadata, importlib-resources # The following packages are considered to be unsafe in a requirements file: -pip==23.3.1 # via pip-api, pip-tools, requirementslib -setuptools==69.0.2 # via gt4py (pyproject.toml), nodeenv, pip-tools, requirementslib, scikit-build, setuptools-scm +pip==23.3.2 # via pip-tools +setuptools==69.0.3 # via gt4py (pyproject.toml), nodeenv, pip-tools, setuptools-scm diff --git a/src/gt4py/cartesian/frontend/gtscript_frontend.py b/src/gt4py/cartesian/frontend/gtscript_frontend.py index 1c96773ff2..f665410b30 100644 --- a/src/gt4py/cartesian/frontend/gtscript_frontend.py +++ b/src/gt4py/cartesian/frontend/gtscript_frontend.py @@ -1889,7 +1889,9 @@ def resolve_external_symbols( "{}.{}".format(value._gtscript_["qualified_name"], item_name): item_value for item_name, item_value in value._gtscript_["nonlocals"].items() } - resolved_values_list.extend(nested_inlined_values.items()) + resolved_values_list.extend( # noqa[B038] #editing a loop's mutable iterable (probably intended here) + nested_inlined_values.items() + ) for imported_name, imported_name_accesses in value._gtscript_[ "imported" diff --git a/src/gt4py/next/ffront/ast_passes/remove_docstrings.py b/src/gt4py/next/ffront/ast_passes/remove_docstrings.py index 2ae12c01f2..653456f6c5 100644 --- a/src/gt4py/next/ffront/ast_passes/remove_docstrings.py +++ b/src/gt4py/next/ffront/ast_passes/remove_docstrings.py @@ -53,12 +53,13 @@ def apply(cls, node: ast.AST) -> ast.AST: return cls().visit(node) def visit_FunctionDef(self, node: ast.FunctionDef) -> ast.AST: - for obj in node.body: - if ( - isinstance(obj, ast.Expr) - and isinstance(obj.value, ast.Constant) - and isinstance(obj.value.value, str) - ): - node.body.remove(obj) - + node.body = [obj for obj in node.body if not _is_const_str_expr(obj)] return self.generic_visit(node) + + +def _is_const_str_expr(obj: ast.stmt) -> bool: + return ( + isinstance(obj, ast.Expr) + and isinstance(obj.value, ast.Constant) + and isinstance(obj.value.value, str) + ) diff --git a/tox.ini b/tox.ini index 817f721f71..6a21a298ba 100644 --- a/tox.ini +++ b/tox.ini @@ -97,6 +97,10 @@ commands = {cuda,cuda11x,cuda12x}: python -m pytest --cache-clear -v -n {env:NUM_PROCESSES:1} -m "requires_gpu" {posargs} tests{/}storage_tests #pytest doctest-modules {posargs} src{/}gt4py{/}storage +[testenv:notebooks-py{310,311}] +description = Run notebooks +commands = python -m pytest --nbmake examples -v -n {env:NUM_PROCESSES:1} + [testenv:linters-py{38,39,310,311}] description = Run linters commands = @@ -131,7 +135,7 @@ commands = # git add _static # commands_post = -[testenv:requirements-{common,py38,py39,py310}] +[testenv:requirements-{common,py38,py39,py310,py311}] description = common: Update pinned development requirements py38: Update requirements for testing a specific python version