From 274cb7654c30fbc25ddd41c4df20fae13b66ab3b Mon Sep 17 00:00:00 2001 From: David Plankensteiner Date: Mon, 17 Nov 2025 15:29:35 +0100 Subject: [PATCH 1/4] Add CI to check docstrings --- .github/workflows/docstrings.yml | 17 +++++++++++++++++ pyproject.toml | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 .github/workflows/docstrings.yml diff --git a/.github/workflows/docstrings.yml b/.github/workflows/docstrings.yml new file mode 100644 index 00000000..bcee68bd --- /dev/null +++ b/.github/workflows/docstrings.yml @@ -0,0 +1,17 @@ +name: Lint +on: + pull_request: + push: + branches: + - main +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + docstrings: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Check docstrings + run: ruff check --select="D" src/ diff --git a/pyproject.toml b/pyproject.toml index 9018d4e8..902effad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,6 +116,9 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" [tool.coverage.run] include = ["src/bloqade/*"] +[tool.ruff.lint.pydocstyle] +convention = "google" + [tool.pytest.ini_options] testpaths = "test/" filterwarnings = [ From 5a1dfd641f87c222494004d1d8be205153916771 Mon Sep 17 00:00:00 2001 From: David Plankensteiner Date: Mon, 17 Nov 2025 15:30:21 +0100 Subject: [PATCH 2/4] Fix name --- .github/workflows/docstrings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docstrings.yml b/.github/workflows/docstrings.yml index bcee68bd..18eba47f 100644 --- a/.github/workflows/docstrings.yml +++ b/.github/workflows/docstrings.yml @@ -1,4 +1,4 @@ -name: Lint +name: Docstrings on: pull_request: push: From 731d52e0c4ba4ccaffb5257b22bfafd6d588e12d Mon Sep 17 00:00:00 2001 From: David Plankensteiner Date: Mon, 17 Nov 2025 15:31:27 +0100 Subject: [PATCH 3/4] Add ruff action --- .github/workflows/docstrings.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docstrings.yml b/.github/workflows/docstrings.yml index 18eba47f..b31cf7a7 100644 --- a/.github/workflows/docstrings.yml +++ b/.github/workflows/docstrings.yml @@ -13,5 +13,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 + - uses: chartboost/ruff-action@v1 - name: Check docstrings run: ruff check --select="D" src/ From d900247828e65f574aa915fb18b502e1a6828f64 Mon Sep 17 00:00:00 2001 From: David Plankensteiner Date: Mon, 17 Nov 2025 15:32:58 +0100 Subject: [PATCH 4/4] Run via ruff action --- .github/workflows/docstrings.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docstrings.yml b/.github/workflows/docstrings.yml index b31cf7a7..df48230d 100644 --- a/.github/workflows/docstrings.yml +++ b/.github/workflows/docstrings.yml @@ -14,5 +14,6 @@ jobs: steps: - uses: actions/checkout@v5 - uses: chartboost/ruff-action@v1 - - name: Check docstrings - run: ruff check --select="D" src/ + with: + args: check --select="D" + src: src/