diff --git a/.copier-answers.yaml b/.copier-answers.yaml index 0fe2c29..4dfcf0e 100644 --- a/.copier-answers.yaml +++ b/.copier-answers.yaml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: b74d698 +_commit: 37f89c1 _src_path: https://github.com/python-project-templates/base.git add_docs: true add_extension: rustjswasm diff --git a/js/Cargo.toml b/js/Cargo.toml index 053d577..35f7e28 100644 --- a/js/Cargo.toml +++ b/js/Cargo.toml @@ -13,4 +13,4 @@ crate-type = ["cdylib"] [dependencies] python_template_rust = { path = "../rust", version = "*" } -wasm-bindgen = "0.2.106" +wasm-bindgen = "0.2.108" diff --git a/js/package.json b/js/package.json index 361a2a2..1398d7b 100644 --- a/js/package.json +++ b/js/package.json @@ -26,7 +26,7 @@ "access": "public" }, "scripts": { - "setup": "cargo install -f wasm-bindgen-cli --version 0.2.106", + "setup": "cargo install -f wasm-bindgen-cli --version 0.2.108", "build:debug": "node build.mjs --debug", "build:rust": "cargo build --release --all-features --target wasm32-unknown-unknown", "build:wasm-bindgen": "wasm-bindgen ../target/wasm32-unknown-unknown/release/python_template_rust.wasm --out-dir ./dist/pkg --target web", diff --git a/pyproject.toml b/pyproject.toml index 5ba12b4..475718b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,16 @@ [build-system] -requires = ["hatchling", "hatch-js", "hatch-rs"] +requires = [ + "hatchling", + "hatch-js", + "hatch-rs", +] build-backend = "hatchling.build" [project] name = "python-template-rust" -authors = [{name = "Python Project Template Authors", email = "3105306+timkpaine@users.noreply.github.com"}] +authors = [ + {name = "Python Project Template Authors", email = "3105306+timkpaine@users.noreply.github.com"}, +] description = "A Rust-Python project template" readme = "README.md" license = { text = "Apache-2.0" } @@ -44,6 +50,8 @@ develop = [ "pytest-cov", "ruff>=0.9,<0.15", "twine", + "ty", + "uv", "wheel", ] @@ -108,7 +116,7 @@ ignore = [ [tool.cibuildwheel] build = "cp310-*" test-command = "pytest -vvv {project}/python_template_rust/tests" -test-requires = ["pytest", "pytest-cov", "pytest-sugar", "pytest-xdist"] +test-extras = "develop" [tool.cibuildwheel.linux] before-all = """ @@ -145,7 +153,9 @@ fail_under = 50 path = "js" build_cmd = "build" tool = "pnpm" -targets = ["python_template_rust/extension/cdn/index.js"] +targets = [ + "python_template_rust/extension/cdn/index.js", +] [tool.hatch.build.hooks.hatch-rs] verbose = true @@ -153,28 +163,57 @@ module = "python_template_rust" path = "." [tool.hatch.build.targets.sdist] -packages = ["python_template_rust", "/js", "/rust", "/src"] -sources = ["."] +packages = [ + "python_template_rust", + "/js", + "/rust", + "/src", +] +sources = [ + ".", +] [tool.hatch.build.targets.wheel] -packages = ["python_template_rust"] -exclude = ["/js", "/rust", "/src"] +packages = [ + "python_template_rust", +] +exclude = [ + "/js", + "/rust", + "/src", +] [tool.pytest.ini_options] -addopts = ["-vvv", "--junitxml=junit.xml"] +addopts = [ + "-vvv", + "--junitxml=junit.xml", +] testpaths = "python_template_rust/tests" [tool.ruff] line-length = 150 [tool.ruff.lint] -extend-select = ["I"] +extend-select = [ + "I", +] [tool.ruff.lint.isort] combine-as-imports = true default-section = "third-party" -known-first-party = ["python_template_rust"] -section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"] +known-first-party = [ + "python_template_rust", +] +section-order = [ + "future", + "standard-library", + "third-party", + "first-party", + "local-folder", +] [tool.ruff.lint.per-file-ignores] -"__init__.py" = ["F401", "F403"] +"__init__.py" = [ + "F401", + "F403", +] diff --git a/rust/Makefile b/rust/Makefile index 21d9e91..d10474a 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -3,9 +3,9 @@ requirements: ## install required dev dependencies rustup component add rustfmt rustup component add clippy - cargo install -f cargo-nextest + cargo install -f cargo-nextest --locked cargo install -f cargo-llvm-cov - cargo install -f wasm-bindgen-cli --version 0.2.106 + cargo install -f wasm-bindgen-cli --version 0.2.108 rustup target add wasm32-unknown-unknown develop: requirements ## install required dev dependencies