Skip to content

Commit

Permalink
Setup tach. Enfore isolation of api_client
Browse files Browse the repository at this point in the history
  • Loading branch information
airwoodix committed Nov 20, 2024
1 parent 6ba4c9e commit 7b118c6
Show file tree
Hide file tree
Showing 6 changed files with 250 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ repos:
- id: interrogate
args: [-v, qiskit_aqt_provider, test]
pass_filenames: false # needed if excluding files with pyproject.toml or setup.cfg
- repo: https://github.com/airwoodix/tach-pre-commit
rev: "v0.14.3-external"
hooks:
- id: tach
- id: tach-external
args: ["-e", "test/"]
- repo: local
hooks:
- id: check-api-models
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Fix source installation problem caused by removed debugpy 1.8.3 package (#188)
* User guide: add section on direct-access resources (#191)
* Split Qiskit-agnostic client resources to separate sub-package (#198)

## qiskit-aqt-provider v1.8.1

Expand Down
178 changes: 176 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ pytest_qiskit_aqt = "qiskit_aqt_provider.test.fixtures"
[tool.poetry.dependencies]
python = ">=3.9,<3.13"

annotated-types = ">=0.7.0"
httpx = ">=0.24.0"
platformdirs = ">=3"
pydantic = ">=2.5.0"
Expand Down Expand Up @@ -100,6 +101,7 @@ rich = "^13.5.3"
ruff = "^0.7.0"
sphinx = ">=7,<7.3"
sphinx-toolbox = "^3.5.0"
tach = "^0.14.3"
tomlkit = "^0.13.2"
typer = "^0.13.0"
types-requests = "^2.28.11"
Expand Down Expand Up @@ -313,13 +315,23 @@ shell = "interrogate -v qiskit_aqt_provider test"
[tool.poe.tasks.spellcheck]
shell = "typos ."

[tool.poe.tasks.check_internal_dependencies]
shell = "tach check"

[tool.poe.tasks.check_external_dependencies]
# Exclude the test module because tach doesn't collect
# dependencies outside the main group.
shell = "tach check-external -e test/"

[tool.poe.tasks]
lint = [
"check_pre_commit_consistency",
"check_api_models",
"docstring_coverage",
"ruff_check",
"spellcheck",
"check_internal_dependencies",
"check_external_dependencies",
]
format_check = [
"python_format_check",
Expand Down
1 change: 1 addition & 0 deletions scripts/check_pre_commit_consistency.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
readonly SCRIPT_DIR

# Tools to check.
# FIXME: add tach when using upstream tag again
TOOLS=(ruff typos pyproject-fmt interrogate)
readonly TOOLS

Expand Down
Loading

0 comments on commit 7b118c6

Please sign in to comment.