diff --git a/.copier-answers.yaml b/.copier-answers.yaml index 19a84f6..44a4e1b 100644 --- a/.copier-answers.yaml +++ b/.copier-answers.yaml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: ebb6e1c +_commit: 162463c _src_path: https://github.com/python-project-templates/base.git add_docs: true add_extension: rustjswasm diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8a88635..8685eea 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,7 +15,7 @@ on: workflow_dispatch: concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: @@ -103,7 +103,7 @@ jobs: if: matrix.target == 'pyodide' - name: Upload test results (Python) - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: test-results-${{ matrix.name }} path: '**/junit.xml' @@ -173,7 +173,7 @@ jobs: if: matrix.name == 'ubuntu-24.04' - name: Upload distributions - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: dist-${{ matrix.name }} path: ${{ matrix.dist_path }} diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 488188c..0434d8c 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -23,6 +23,8 @@ jobs: - name: Setup Python uses: actions-ext/python/setup@c8228d827a81b9f8c808825328af361c45461ba3 + with: + version: "3.11" - name: Download distributions uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 diff --git a/Cargo.lock b/Cargo.lock index eab21db..11071c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -22,18 +22,18 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "inventory" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4f0c30c76f2f4ccee3fe55a2435f691ca00c0e4bd87abe4f4a851b1d4dac39b" +checksum = "6928282826c822ad91bf1c9a1cb90a30ba1c26770749929b4656cd6be829cd7c" dependencies = [ "rustversion", ] [[package]] name = "libc" -version = "0.2.189" +version = "0.2.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" [[package]] name = "once_cell" @@ -179,7 +179,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.9", ] [[package]] @@ -195,9 +195,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.6" +version = "3.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee" +checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" dependencies = [ "proc-macro2", "quote", @@ -212,9 +212,9 @@ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" [[package]] name = "unicode-ident" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" [[package]] name = "wasm-bindgen" @@ -248,7 +248,7 @@ dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.9", "wasm-bindgen-shared", ] diff --git a/Makefile b/Makefile index 8f5b717..77eb072 100644 --- a/Makefile +++ b/Makefile @@ -55,8 +55,8 @@ lint-rs: ## run rust linter make -C rust lint lint-docs: ## lint docs with mdformat and codespell - python -m mdformat --check README.md docs/wiki/ - python -m codespell_lib README.md docs/wiki/ + python -m mdformat --check README.md $(wildcard docs/src) docs/wiki/ + python -m codespell_lib README.md $(wildcard docs/src) docs/wiki/ lint: lint-rs lint-js lint-py lint-docs ## run project linters @@ -75,8 +75,8 @@ fix-rs: ## fix rust formatting make -C rust fix fix-docs: ## autoformat docs with mdformat and codespell - python -m mdformat README.md docs/wiki/ - python -m codespell_lib --write README.md docs/wiki/ + python -m mdformat README.md $(wildcard docs/src) docs/wiki/ + python -m codespell_lib --write README.md $(wildcard docs/src) docs/wiki/ fix: fix-rs fix-js fix-py fix-docs ## run project autoformatters @@ -94,7 +94,7 @@ check-dist: ## check python sdist and wheel with check-dist check-types: ## check python types with ty ty check --python $$(which python) -checks: check-dist +checks: check-dist check-types # alias check: checks diff --git a/pyproject.toml b/pyproject.toml index a7cf183..dd832ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,7 @@ develop = [ "hatch-rs>=0.3.0", "hatchling", "mdformat", + "mdformat-frontmatter", "mdformat-tables>=1", "pytest", "pytest-cov", @@ -134,7 +135,7 @@ xbuild-tools = ["cargo", "rustc", "rustup"] [tool.coverage.run] branch = true omit = [ - "python_template_rust/tests/integration/", + "python_template_rust/tests/integration/*", ] [tool.coverage.report] @@ -148,9 +149,6 @@ fail_under = 50 [tool.hatch.build] artifacts = [ - "python_template_rust/*.dll", - "python_template_rust/*.dylib", - "python_template_rust/*.so", "python_template_rust/extension", ] @@ -180,9 +178,10 @@ packages = [ "Cargo.lock", ] exclude = [ - "python_template_rust/*.dll", - "python_template_rust/*.dylib", - "python_template_rust/*.so", + "*.dll", + "*.dylib", + "*.so", + "*.pyd", "python_template_rust/extension", "js/dist", "js/node_modules", @@ -191,6 +190,12 @@ exclude = [ ] [tool.hatch.build.targets.wheel] +artifacts = [ + "python_template_rust/*.dll", + "python_template_rust/*.dylib", + "python_template_rust/*.so", + "python_template_rust/extension", +] packages = [ "python_template_rust", ]