Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- run: |
check/pytest -m 'not notebook and not slow'

pytest-dev-tools:
dev-tools:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
Expand All @@ -59,6 +59,7 @@ jobs:
pip install --no-deps -e .
- run: |
check/pytest-dev-tools
check/mypy-dev-tools

notebooks:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -132,7 +133,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev_tools/requirements/envs/dev.env.txt
pip install -r dev_tools/requirements/envs/mypy.env.txt
pip install --no-deps -e .
- name: Set up problem matcher for Mypy output
run: echo '::add-matcher::.github/problem-matchers/mypy.json'
Expand Down
2 changes: 1 addition & 1 deletion check/mypy
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cd "${topdir}" || exit $?
CONFIG_FILE='mypy.ini'

echo -e -n "\033[31m"
mypy --config-file=dev_tools/conf/$CONFIG_FILE "$@" qualtran/ dev_tools/
mypy --config-file=dev_tools/conf/$CONFIG_FILE "$@" qualtran/
result=$?
echo -e -n "\033[0m"

Expand Down
22 changes: 22 additions & 0 deletions check/mypy-dev-tools
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

################################################################################
# Runs mypy on the dev_tools/ folder using a preconfigured mypy.ini file.
#
# Usage:
# check/mypy-dev-tool [--flags]
################################################################################

# Get the working directory to the repo root.
thisdir="$(dirname "${BASH_SOURCE[0]}")" || exit $?
topdir="$(git -C "${thisdir}" rev-parse --show-toplevel)" || exit $?
cd "${topdir}" || exit $?

CONFIG_FILE='mypy.ini'

echo -e -n "\033[31m"
mypy --config-file=dev_tools/conf/$CONFIG_FILE "$@" dev_tools/
result=$?
echo -e -n "\033[0m"

exit ${result}
85 changes: 52 additions & 33 deletions dev_tools/requirements/envs/dev.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ anyio==4.9.0
# via
# httpx
# jupyter-server
# starlette
# watchfiles
anywidget==0.9.18
# via qsharp-widgets
appdirs==1.4.4
Expand Down Expand Up @@ -47,7 +49,7 @@ attrs==25.3.0
# jsonschema
# jupyter-cache
# referencing
autograd==1.7.0
autograd==1.8.0
# via pennylane
autoray==0.7.1
# via
Expand Down Expand Up @@ -79,7 +81,7 @@ cachetools==5.5.2
# via
# -r deps/runtime.txt
# pennylane
certifi==2025.1.31
certifi==2025.4.26
# via
# httpcore
# httpx
Expand All @@ -88,7 +90,7 @@ cffi==1.17.1
# via
# argon2-cffi-bindings
# cryptography
charset-normalizer==3.4.1
charset-normalizer==3.4.2
# via requests
cirq-core==1.4.0
# via
Expand All @@ -100,6 +102,9 @@ click==8.1.8
# flask
# jupyter-cache
# pip-tools
# uvicorn
colorama==0.4.6
# via sphinx-autobuild
comm==0.2.2
# via
# ipykernel
Expand All @@ -110,13 +115,13 @@ cotengra==0.7.2
# via quimb
coverage[toml]==7.8.0
# via pytest-cov
cryptography==44.0.2
cryptography==44.0.3
# via secretstorage
cycler==0.12.1
# via matplotlib
cytoolz==1.0.1
# via quimb
dash==3.0.3
dash==3.0.4
# via -r deps/runtime.txt
debugpy==1.8.14
# via ipykernel
Expand Down Expand Up @@ -166,7 +171,7 @@ fqdn==1.5.1
# via jsonschema
fxpmath==0.4.9
# via -r deps/runtime.txt
galois==0.4.5
galois==0.4.6
# via -r deps/runtime.txt
gast==0.6.0
# via diastatic-malt
Expand All @@ -178,13 +183,15 @@ grpcio==1.71.0
# via grpcio-tools
grpcio-tools==1.71.0
# via -r deps/packaging.txt
h11==0.14.0
# via httpcore
h11==0.16.0
# via
# httpcore
# uvicorn
h5py==3.13.0
# via
# openfermion
# pyscf
httpcore==1.0.8
httpcore==1.0.9
# via httpx
httpx==0.28.1
# via jupyterlab
Expand All @@ -198,7 +205,7 @@ idna==3.10
# requests
imagesize==1.4.1
# via sphinx
importlib-metadata==8.6.1
importlib-metadata==8.7.0
# via
# dash
# jupyter-cache
Expand All @@ -211,13 +218,13 @@ ipykernel==6.29.5
# -r deps/pytest.txt
# jupyterlab
# myst-nb
ipython==8.35.0
ipython==8.36.0
# via
# -r deps/runtime.txt
# ipykernel
# ipywidgets
# myst-nb
ipywidgets==8.1.6
ipywidgets==8.1.7
# via
# -r deps/docs.txt
# -r deps/runtime.txt
Expand Down Expand Up @@ -268,7 +275,7 @@ jsonschema[format-nongpl]==4.23.0
# jupyter-events
# jupyterlab-server
# nbformat
jsonschema-specifications==2024.10.1
jsonschema-specifications==2025.4.1
# via jsonschema
jupyter-cache==1.0.1
# via myst-nb
Expand Down Expand Up @@ -299,15 +306,15 @@ jupyter-server==2.15.0
# notebook-shim
jupyter-server-terminals==0.5.3
# via jupyter-server
jupyterlab==4.4.0
jupyterlab==4.4.2
# via notebook
jupyterlab-pygments==0.3.0
# via nbconvert
jupyterlab-server==2.27.3
# via
# jupyterlab
# notebook
jupyterlab-widgets==3.0.14
jupyterlab-widgets==3.0.15
# via ipywidgets
keyring==25.6.0
# via twine
Expand All @@ -327,7 +334,7 @@ markupsafe==3.0.2
# jinja2
# nbconvert
# werkzeug
matplotlib==3.10.1
matplotlib==3.10.3
# via
# -r deps/runtime.txt
# ase
Expand Down Expand Up @@ -366,7 +373,7 @@ myst-nb==1.2.0
# via -r deps/docs.txt
myst-parser==4.0.1
# via myst-nb
narwhals==1.35.0
narwhals==1.38.2
# via plotly
nbclient==0.10.2
# via
Expand Down Expand Up @@ -400,7 +407,7 @@ networkx==3.4.2
# pennylane
nh3==0.2.21
# via readme-renderer
notebook==7.4.0
notebook==7.4.2
# via
# -r deps/dev-tools.txt
# -r deps/runtime.txt
Expand Down Expand Up @@ -468,19 +475,19 @@ parso==0.8.4
# via jedi
pathspec==0.12.1
# via black
pennylane==0.41.0
pennylane==0.41.1
# via
# -r deps/runtime.txt
# pennylane-lightning
pennylane-lightning==0.41.0
pennylane-lightning==0.41.1
# via pennylane
pexpect==4.9.0
# via ipython
pillow==11.2.1
# via matplotlib
pip-tools==7.4.1
# via -r deps/pip-tools.txt
platformdirs==4.3.7
platformdirs==4.3.8
# via
# black
# jupyter-core
Expand All @@ -506,7 +513,7 @@ psutil==7.0.0
# via
# ipykernel
# quimb
psygnal==0.12.0
psygnal==0.13.0
# via anywidget
ptyprocess==0.7.0
# via
Expand All @@ -518,15 +525,15 @@ pure-eval==0.2.3
# via stack-data
pycparser==2.22
# via cffi
pydantic==2.11.3
pydantic==2.11.4
# via
# bartiq
# qref
pydantic-core==2.33.1
pydantic-core==2.33.2
# via pydantic
pydata-sphinx-theme==0.16.1
# via -r deps/docs.txt
pydot==3.0.4
pydot==4.0.0
# via -r deps/runtime.txt
pygments==2.19.1
# via
Expand All @@ -537,7 +544,7 @@ pygments==2.19.1
# readme-renderer
# rich
# sphinx
pylint==3.3.6
pylint==3.3.7
# via -r deps/pylint.txt
pyparsing==3.1.4
# via
Expand Down Expand Up @@ -593,9 +600,9 @@ qref==0.9.0
# via
# -r deps/runtime.txt
# bartiq
qsharp==1.15.0
qsharp==1.16.0
# via -r deps/runtime.txt
qsharp-widgets==1.15.0
qsharp-widgets==1.16.0
# via -r deps/runtime.txt
quimb==1.10.0
# via -r deps/runtime.txt
Expand Down Expand Up @@ -638,7 +645,7 @@ rpds-py==0.24.0
# referencing
rustworkx==0.16.0
# via pennylane
scipy==1.15.2
scipy==1.15.3
# via
# ase
# cirq-core
Expand All @@ -662,7 +669,7 @@ six==1.17.0
# rfc3339-validator
sniffio==1.3.1
# via anyio
snowballstemmer==2.2.0
snowballstemmer==3.0.0.1
# via sphinx
sortedcontainers==2.4.0
# via cirq-core
Expand All @@ -675,6 +682,9 @@ sphinx==8.1.3
# myst-nb
# myst-parser
# pydata-sphinx-theme
# sphinx-autobuild
sphinx-autobuild==2024.10.3
# via -r deps/docs.txt
sphinxcontrib-applehelp==2.0.0
# via sphinx
sphinxcontrib-devhelp==2.0.0
Expand All @@ -691,6 +701,8 @@ sqlalchemy==2.0.40
# via jupyter-cache
stack-data==0.6.3
# via ipython
starlette==0.46.2
# via sphinx-autobuild
sympy==1.12.1
# via
# -r deps/mypy.txt
Expand All @@ -704,7 +716,7 @@ tensorflow-docs==2023.5.24.56664
# via
# -r deps/docs.txt
# -r deps/pylint.txt
termcolor==3.0.1
termcolor==3.1.0
# via diastatic-malt
terminado==0.18.1
# via
Expand Down Expand Up @@ -760,7 +772,7 @@ traitlets==5.14.3
# nbformat
twine==6.1.0
# via -r deps/packaging.txt
types-protobuf==5.29.1.20250403
types-protobuf==6.30.2.20250506
# via mypy-protobuf
types-python-dateutil==2.9.0.20241206
# via arrow
Expand Down Expand Up @@ -789,6 +801,7 @@ typing-extensions==4.13.2
# rich
# sqlalchemy
# typing-inspection
# uvicorn
typing-inspection==0.4.0
# via pydantic
tzdata==2025.2
Expand All @@ -799,8 +812,12 @@ urllib3==2.4.0
# via
# requests
# twine
virtualenv==20.30.0
uvicorn==0.34.2
# via sphinx-autobuild
virtualenv==20.31.2
# via -r deps/packaging.txt
watchfiles==1.0.5
# via sphinx-autobuild
wcwidth==0.2.13
# via prompt-toolkit
webcolors==24.11.1
Expand All @@ -811,6 +828,8 @@ webencodings==0.5.1
# tinycss2
websocket-client==1.8.0
# via jupyter-server
websockets==15.0.1
# via sphinx-autobuild
werkzeug==3.0.6
# via
# dash
Expand Down
Loading