diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 9a5eca89..ac07837e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -28,7 +28,8 @@ jobs: strategy: fail-fast: false - language: [ python ] + matrix: + language: [ python ] steps: - name: Checkout @@ -44,7 +45,9 @@ jobs: setup.py - name: Install uv - uses: yezz123/setup-uv@v4 + uses: astral-sh/setup-uv@v3 + with: + version: "latest" - name: Initialize CodeQL uses: github/codeql-action/init@v3 @@ -52,13 +55,32 @@ jobs: languages: ${{ matrix.language }} config-file: ./.github/codeql.yml queries: +security-and-quality + # run an 'alert-suppression' query + packs: "codeql/${{ matrix.language }}-queries:AlertSuppression.ql" #- name: Autobuild # uses: github/codeql-action/autobuild@v2 - name: Install project run: | - uv pip install --editable=.[test] + uv pip install --system '.[test]' - name: Perform CodeQL Analysis + id: analyze uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" + # define the output folder for SARIF files + output: sarif-results + + # Unlock inline mechanism to suppress CodeQL warnings. + # https://github.com/github/codeql/issues/11427#issuecomment-1721059096 + - name: Dismiss alerts + # if: github.ref == 'refs/heads/main' + uses: advanced-security/dismiss-alerts@v1 + with: + # specify a 'sarif-id' and 'sarif-file' + sarif-id: ${{ steps.analyze.outputs.sarif-id }} + sarif-file: sarif-results/${{ matrix.language }}.sarif + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 74b1bdd1..1b9b74e2 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -33,7 +33,9 @@ jobs: cache-dependency-path: 'setup.py' - name: Install uv - uses: yezz123/setup-uv@v4 + uses: astral-sh/setup-uv@v3 + with: + version: "latest" - name: Invoke tests run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b00c58d7..de847c46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,11 +19,13 @@ jobs: cache-dependency-path: 'setup.py' - name: Install uv - uses: yezz123/setup-uv@v4 + uses: astral-sh/setup-uv@v3 + with: + version: "latest" - name: Build package run: | - uv pip install build twine wheel + uv pip install --system build twine wheel python -m build twine check dist/* diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b7b4f964..6f9b0029 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,7 +48,9 @@ jobs: cache-dependency-path: setup.py - name: Install uv - uses: yezz123/setup-uv@v4 + uses: astral-sh/setup-uv@v3 + with: + version: "latest" - name: Invoke tests run: | diff --git a/CHANGES.rst b/CHANGES.rst index 64141cc5..2cf9c9dd 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,15 @@ Changes for crate Unreleased ========== + +2024/11/23 1.0.1 +================ + +- Python: Fixed "implicit namespace packages" migration by omitting + ``__init__.py`` from ``crate`` namespace package, see `PEP 420`_ + and `Package Discovery and Namespace Package » Finding namespace packages`_. + + 2024/11/05 1.0.0 ================ @@ -44,6 +53,7 @@ Unreleased .. _Migrate from crate.client to sqlalchemy-cratedb: https://cratedb.com/docs/sqlalchemy-cratedb/migrate-from-crate-client.html +.. _Package Discovery and Namespace Package » Finding namespace packages: https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#namespace-packages .. _PEP 420: https://peps.python.org/pep-0420/ .. _sqlalchemy-cratedb: https://pypi.org/project/sqlalchemy-cratedb/ diff --git a/setup.py b/setup.py index ccece82e..b5c87934 100644 --- a/setup.py +++ b/setup.py @@ -67,7 +67,7 @@ def read(path): "certifi", "createcoverage>=1,<2", "mypy<1.14", - "poethepoet<0.30", + "poethepoet<0.31", "ruff<0.8", "stopit>=1.1.2,<2", "tox>=3,<5", diff --git a/src/crate/__init__.py b/src/crate/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/src/crate/client/__init__.py b/src/crate/client/__init__.py index 35a53d6e..2fec7abd 100644 --- a/src/crate/client/__init__.py +++ b/src/crate/client/__init__.py @@ -29,8 +29,9 @@ # version string read from setup.py using a regex. Take care not to break the # regex! -__version__ = "1.0.0" +__version__ = "1.0.1" +# codeql[py/unused-global-variable] apilevel = "2.0" threadsafety = 1 paramstyle = "qmark"