Skip to content

Commit

Permalink
Merge branch 'main' into fidelityHeuristic3
Browse files Browse the repository at this point in the history
  • Loading branch information
burgholzer authored Oct 24, 2023
2 parents 7ced472 + 0708e68 commit 522a8fc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ repos:

# Clean jupyter notebooks
- repo: https://github.com/srstevenson/nb-clean
rev: 3.0.1
rev: 3.1.0
hooks:
- id: nb-clean

# Handling unwanted unicode characters
- repo: https://github.com/sirosen/texthooks
rev: 0.5.0
rev: 0.6.2
hooks:
- id: fix-ligatures
- id: fix-smartquotes
Expand All @@ -51,14 +51,14 @@ repos:

# Run ruff (subsumes pyupgrade, isort, flake8+plugins, and more)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
rev: v0.1.1
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]

# Run code formatting with Black
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.9.1 # Keep in sync with blacken-docs
rev: 23.10.0 # Keep in sync with blacken-docs
hooks:
- id: black-jupyter

Expand All @@ -68,11 +68,11 @@ repos:
hooks:
- id: blacken-docs
additional_dependencies:
- black==23.9.1 # keep in sync with black hook
- black==23.10.0 # keep in sync with black hook

# Check static types with mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.0
rev: v1.6.1
hooks:
- id: mypy
files: ^(src/mqt|test/python)
Expand All @@ -92,7 +92,7 @@ repos:

# Clang-format the C++ part of the code base automatically
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.2
rev: v17.0.3
hooks:
- id: clang-format
types_or: [c++, c, cuda]
Expand Down Expand Up @@ -129,6 +129,6 @@ repos:
- id: check-sdist
args: [--inject-junk]
additional_dependencies:
- scikit-build-core[pyproject]>=0.5.0
- scikit-build-core[pyproject]>=0.5.0,<0.6 # TODO: remove upper cap once scikit-build-core is updated
- setuptools-scm>=7
- pybind11>=2.11
14 changes: 11 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ def pylint(session: nox.Session) -> None:
Simply execute `nox -rs pylint` to run PyLint.
"""
session.install("scikit-build-core[pyproject]", "setuptools_scm", "pybind11")
session.install(
"scikit-build-core[pyproject]<0.6", "setuptools_scm", "pybind11"
) # TODO: remove upper cap once scikit-build-core is updated
session.install("--no-build-isolation", "-ve.", "pylint")
session.run("pylint", "mqt.qmap", *session.posargs)

Expand All @@ -56,7 +58,9 @@ def _run_tests(
_extras.append("coverage")
posargs.append("--cov-config=pyproject.toml")

session.install("scikit-build-core[pyproject]", "setuptools_scm", "pybind11", *install_args, env=env)
session.install(
"scikit-build-core[pyproject]<0.6", "setuptools_scm", "pybind11", *install_args, env=env
) # TODO: remove upper cap once scikit-build-core is updated
install_arg = f"-ve.[{','.join(_extras)}]"
session.install("--no-build-isolation", install_arg, *install_args, env=env)
session.run("pytest", *run_args, *posargs, env=env)
Expand Down Expand Up @@ -90,7 +94,11 @@ def docs(session: nox.Session) -> None:
if args.builder != "html" and args.serve:
session.error("Must not specify non-HTML builder with --serve")

build_requirements = ["scikit-build-core[pyproject]", "setuptools_scm", "pybind11"]
build_requirements = [
"scikit-build-core[pyproject]<0.6",
"setuptools_scm",
"pybind11",
] # TODO: remove upper cap once scikit-build-core is updated
extra_installs = ["sphinx-autobuild"] if args.serve else []
session.install(*build_requirements, *extra_installs)
session.install("--no-build-isolation", "-ve.[docs]")
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[build-system]
requires = ["scikit-build-core>=0.5.0", "setuptools-scm>=7", "pybind11>=2.11"]
# TODO: remove upper cap once scikit-build-core is updated
requires = ["scikit-build-core>=0.5.0,<0.6.0", "setuptools-scm>=7", "pybind11>=2.11"]
build-backend = "scikit_build_core.build"

[project]
Expand Down

0 comments on commit 522a8fc

Please sign in to comment.