diff --git a/cpp/pyproject.toml.jinja b/cpp/pyproject.toml.jinja index 933ce06..3ea7c4e 100644 --- a/cpp/pyproject.toml.jinja +++ b/cpp/pyproject.toml.jinja @@ -8,7 +8,9 @@ build-backend="hatchling.build" [project] name = "{{project_name_formatted}}" -authors = [{name = "{{team}}", email = "{{email}}"}] +authors = [ + {name = "{{team}}", email = "{{email}}"}, +] description = "{{project_description}}" readme = "README.md" license = { text = "Apache-2.0" } @@ -46,6 +48,8 @@ develop = [ "pytest-cov", "ruff>=0.9,<0.15", "twine", + "ty", + "uv", "wheel", ] @@ -125,30 +129,61 @@ src = "/" [tool.hatch.build.hooks.hatch-cpp] verbose = true libraries = [ -{name = "{{module}}/extension", sources = ["cpp/{{project_name_formatted}}/extension.cpp"], include-dirs = ["cpp"], binding="pybind11"} + {name = "{{module}}/extension", sources = ["cpp/{{project_name_formatted}}/extension.cpp"], include-dirs = ["cpp"], binding="pybind11"} ] [tool.hatch.build.targets.sdist] -packages = ["{{module}}", "cpp"] +packages = [ + "{{module}}", + "cpp", +] [tool.hatch.build.targets.wheel] -packages = ["{{module}}"] +packages = [ + "{{module}}", +] [tool.pytest.ini_options] -addopts = ["-vvv", "--junitxml=junit.xml"] +addopts = [ + "-vvv", + "--junitxml=junit.xml", +] testpaths = "{{module}}/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 = ["{{module}}"] -section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"] +known-first-party = [ + "{{module}}", +] +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", +] + +{%- if add_docs %} + +[tool.yardang] +title = "{{ project_name }}" +root = "README.md" +pages = [] +use-autoapi = true +{% endif %} + diff --git a/js/pyproject.toml.jinja b/js/pyproject.toml.jinja index 574bee2..c7d2999 100644 --- a/js/pyproject.toml.jinja +++ b/js/pyproject.toml.jinja @@ -1,10 +1,15 @@ [build-system] -requires = ["hatchling", "hatch-js"] +requires = [ + "hatchling", + "hatch-js", +] build-backend="hatchling.build" [project] name = "{{project_name_formatted}}" -authors = [{name = "{{team}}", email = "{{email}}"}] +authors = [ + {name = "{{team}}", email = "{{email}}"}, +] description = "{{project_description}}" readme = "README.md" license = { text = "Apache-2.0" } @@ -41,6 +46,8 @@ develop = [ "pytest-cov", "ruff>=0.9,<0.15", "twine", + "ty", + "uv", "wheel", ] @@ -105,37 +112,71 @@ artifacts = [ src = "/" [tool.hatch.build.targets.sdist] -packages = ["{{module}}", "js"] +packages = [ + "{{module}}", + "js", +] exclude = [ "/js/dist", "/js/node_modules", ] [tool.hatch.build.targets.wheel] -packages = ["{{module}}"] -exclude = ["/js"] +packages = [ + "{{module}}", +] +exclude = [ + "/js", +] [tool.hatch.build.hooks.hatch-js] path = "js" build_cmd = "build" tool = "pnpm" -targets = ["{{module}}/extension/cdn/index.js"] +targets = [ + "{{module}}/extension/cdn/index.js", +] [tool.pytest.ini_options] -addopts = ["-vvv", "--junitxml=junit.xml"] +addopts = [ + "-vvv", + "--junitxml=junit.xml", +] testpaths = "{{module}}/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 = ["{{module}}"] -section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"] +known-first-party = [ + "{{module}}", +] +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", +] + +{%- if add_docs %} + +[tool.yardang] +title = "{{ project_name }}" +root = "README.md" +pages = [] +use-autoapi = true +{% endif %} diff --git a/jupyter/pyproject.toml.jinja b/jupyter/pyproject.toml.jinja index cc84aba..9b1970e 100644 --- a/jupyter/pyproject.toml.jinja +++ b/jupyter/pyproject.toml.jinja @@ -1,10 +1,16 @@ [build-system] -requires = ["hatchling", "hatch-js", "jupyterlab>=4,<5"] +requires = [ + "hatchling", + "hatch-js", + "jupyterlab>=4,<5", +] build-backend="hatchling.build" [project] name = "{{project_name_formatted}}" -authors = [{name = "{{team}}", email = "{{email}}"}] +authors = [ + {name = "{{team}}", email = "{{email}}"}, +] description = "{{project_description}}" readme = "README.md" license = { text = "Apache-2.0" } @@ -44,6 +50,8 @@ develop = [ "pytest-cov", "ruff>=0.9,<0.15", "twine", + "ty", + "uv", "wheel", ] @@ -112,14 +120,19 @@ artifacts = [ src = "/" [tool.hatch.build.targets.sdist] -packages = ["{{module}}", "js"] +packages = [ + "{{module}}", + "js", +] exclude = [ "/js/dist", "/js/node_modules", ] [tool.hatch.build.targets.wheel] -packages = ["{{module}}"] +packages = [ + "{{module}}", +] exclude = [ "/js" ] @@ -139,20 +152,45 @@ targets = [ ] [tool.pytest.ini_options] -addopts = ["-vvv", "--junitxml=junit.xml"] +addopts = [ + "-vvv", + "--junitxml=junit.xml", +] testpaths = "{{module}}/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 = ["{{module}}"] -section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"] +known-first-party = [ + "{{module}}", +] +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", +] + +{%- if add_docs %} + +[tool.yardang] +title = "{{ project_name }}" +root = "README.md" +pages = [] +use-autoapi = true +{% endif %} diff --git a/python/pyproject.toml.jinja b/python/pyproject.toml.jinja index f32e4fa..8d15d91 100644 --- a/python/pyproject.toml.jinja +++ b/python/pyproject.toml.jinja @@ -1,10 +1,14 @@ [build-system] -requires = ["hatchling"] +requires = [ + "hatchling", +] build-backend="hatchling.build" [project] name = "{{project_name_formatted}}" -authors = [{name = "{{team}}", email = "{{email}}"}] +authors = [ + {name = "{{team}}", email = "{{email}}"}, +] description = "{{project_description}}" readme = "README.md" license = { text = "Apache-2.0" } @@ -40,6 +44,7 @@ develop = [ "pytest-cov", "ruff>=0.9,<0.15", "twine", + "ty", "uv", "wheel", ] @@ -94,31 +99,51 @@ artifacts = [] src = "/" [tool.hatch.build.targets.sdist] -packages = ["{{module}}"] +packages = [ + "{{module}}", +] [tool.hatch.build.targets.wheel] -packages = ["{{module}}"] +packages = [ + "{{module}}", +] [tool.hatch.build.targets.wheel.shared-data] [tool.pytest.ini_options] -addopts = ["-vvv", "--junitxml=junit.xml"] +addopts = [ + "-vvv", + "--junitxml=junit.xml", +] testpaths = "{{module}}/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 = ["{{module}}"] -section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"] +known-first-party = [ + "{{module}}", +] +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", +] {%- if add_docs %} @@ -127,5 +152,4 @@ title = "{{ project_name }}" root = "README.md" pages = [] use-autoapi = true - -{% endif -%} +{% endif %} diff --git a/rust/pyproject.toml.jinja b/rust/pyproject.toml.jinja index 9485c5d..b91796a 100644 --- a/rust/pyproject.toml.jinja +++ b/rust/pyproject.toml.jinja @@ -1,10 +1,15 @@ [build-system] -requires = ["hatchling", "hatch-rs>=0.1.4"] +requires = [ + "hatchling", + "hatch-rs>=0.1.4", +] build-backend="hatchling.build" [project] name = "{{project_name_formatted}}" -authors = [{name = "{{team}}", email = "{{email}}"}] +authors = [ + {name = "{{team}}", email = "{{email}}"}, +] description = "{{project_description}}" readme = "README.md" license = { text = "Apache-2.0" } @@ -43,6 +48,8 @@ develop = [ "pytest-cov", "ruff>=0.9,<0.15", "twine", + "ty", + "uv", "wheel", ] @@ -93,7 +100,12 @@ ignore = [ [tool.cibuildwheel] build = "cp310-*" test-command = "pytest -vvv {project}/{{module}}/tests" -test-requires = ["pytest", "pytest-cov", "pytest-sugar", "pytest-xdist"] +test-requires = [ + "pytest", + "pytest-cov", + "pytest-sugar", + "pytest-xdist", +] [tool.cibuildwheel.linux] before-all = """ @@ -143,27 +155,60 @@ module = "{{module}}" path = "." [tool.hatch.build.targets.sdist] -packages = ["{{module}}", "/rust", "/src"] -sources = ["."] +packages = [ + "{{module}}", + "/rust", + "/src", +] +sources = [ + ".", +] [tool.hatch.build.targets.wheel] -packages = ["{{module}}"] +packages = [ + "{{module}}", +] [tool.pytest.ini_options] -addopts = ["-vvv", "--junitxml=junit.xml"] +addopts = [ + "-vvv", + "--junitxml=junit.xml", +] testpaths = "{{module}}/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 = ["{{module}}"] -section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"] +known-first-party = [ + "{{module}}", +] +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", +] + +{%- if add_docs %} + +[tool.yardang] +title = "{{ project_name }}" +root = "README.md" +pages = [] +use-autoapi = true +{% endif %} diff --git a/rust/rust/Makefile.jinja b/rust/rust/Makefile.jinja index 7d8e168..de9c2a3 100644 --- a/rust/rust/Makefile.jinja +++ b/rust/rust/Makefile.jinja @@ -3,7 +3,7 @@ requirements: ## install required dev dependencies rustup component add rustfmt rustup component add clippy - cargo install cargo-nextest --force + cargo install cargo-nextest --locked --force cargo install cargo-llvm-cov --force develop: requirements ## install required dev dependencies diff --git a/rustjswasm/js/Cargo.toml.jinja b/rustjswasm/js/Cargo.toml.jinja index d5832ea..05d71f3 100644 --- a/rustjswasm/js/Cargo.toml.jinja +++ b/rustjswasm/js/Cargo.toml.jinja @@ -13,4 +13,4 @@ crate-type = ["cdylib"] [dependencies] {{module}} = { path = "../rust", version = "*" } -wasm-bindgen = "0.2.106" +wasm-bindgen = "0.2.108" diff --git a/rustjswasm/js/package.json.jinja b/rustjswasm/js/package.json.jinja index 77f1740..0e88ded 100644 --- a/rustjswasm/js/package.json.jinja +++ b/rustjswasm/js/package.json.jinja @@ -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/{{module}}.wasm --out-dir ./dist/pkg --target web", diff --git a/rustjswasm/pyproject.toml.jinja b/rustjswasm/pyproject.toml.jinja index 1bc95f3..9316765 100644 --- a/rustjswasm/pyproject.toml.jinja +++ b/rustjswasm/pyproject.toml.jinja @@ -1,10 +1,16 @@ [build-system] -requires = ["hatchling", "hatch-js", "hatch-rs"] +requires = [ + "hatchling", + "hatch-js", + "hatch-rs", +] build-backend = "hatchling.build" [project] name = "{{project_name_formatted}}" -authors = [{name = "{{team}}", email = "{{email}}"}] +authors = [ + {name = "{{team}}", email = "{{email}}"}, +] description = "{{project_description}}" 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,12 @@ ignore = [ [tool.cibuildwheel] build = "cp310-*" test-command = "pytest -vvv {project}/{{module}}/tests" -test-requires = ["pytest", "pytest-cov", "pytest-sugar", "pytest-xdist"] +test-requires = [ + "pytest", + "pytest-cov", + "pytest-sugar", + "pytest-xdist", +] [tool.cibuildwheel.linux] before-all = """ @@ -145,7 +158,9 @@ fail_under = 50 path = "js" build_cmd = "build" tool = "pnpm" -targets = ["{{module}}/extension/cdn/index.js"] +targets = [ + "{{module}}/extension/cdn/index.js", +] [tool.hatch.build.hooks.hatch-rs] verbose = true @@ -153,28 +168,57 @@ module = "{{module}}" path = "." [tool.hatch.build.targets.sdist] -packages = ["{{module}}", "/js", "/rust", "/src"] -sources = ["."] +packages = [ + "{{module}}", + "/js", + "/rust", + "/src", +] +sources = [ + ".", +] [tool.hatch.build.targets.wheel] -packages = ["{{module}}"] -exclude = ["/js", "/rust", "/src"] +packages = [ + "{{module}}", +] +exclude = [ + "/js", + "/rust", + "/src", +] [tool.pytest.ini_options] -addopts = ["-vvv", "--junitxml=junit.xml"] +addopts = [ + "-vvv", + "--junitxml=junit.xml", +] testpaths = "{{module}}/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 = ["{{module}}"] -section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"] +known-first-party = [ + "{{module}}", +] +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/rustjswasm/rust/Makefile.jinja b/rustjswasm/rust/Makefile.jinja index 21d9e91..d10474a 100644 --- a/rustjswasm/rust/Makefile.jinja +++ b/rustjswasm/rust/Makefile.jinja @@ -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