Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 44 additions & 9 deletions cpp/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down Expand Up @@ -46,6 +48,8 @@ develop = [
"pytest-cov",
"ruff>=0.9,<0.15",
"twine",
"ty",
"uv",
"wheel",
]

Expand Down Expand Up @@ -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 %}

63 changes: 52 additions & 11 deletions js/pyproject.toml.jinja
Original file line number Diff line number Diff line change
@@ -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" }
Expand Down Expand Up @@ -41,6 +46,8 @@ develop = [
"pytest-cov",
"ruff>=0.9,<0.15",
"twine",
"ty",
"uv",
"wheel",
]

Expand Down Expand Up @@ -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 %}
56 changes: 47 additions & 9 deletions jupyter/pyproject.toml.jinja
Original file line number Diff line number Diff line change
@@ -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" }
Expand Down Expand Up @@ -44,6 +50,8 @@ develop = [
"pytest-cov",
"ruff>=0.9,<0.15",
"twine",
"ty",
"uv",
"wheel",
]

Expand Down Expand Up @@ -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"
]
Expand All @@ -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 %}
46 changes: 35 additions & 11 deletions python/pyproject.toml.jinja
Original file line number Diff line number Diff line change
@@ -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" }
Expand Down Expand Up @@ -40,6 +44,7 @@ develop = [
"pytest-cov",
"ruff>=0.9,<0.15",
"twine",
"ty",
"uv",
"wheel",
]
Expand Down Expand Up @@ -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 %}

Expand All @@ -127,5 +152,4 @@ title = "{{ project_name }}"
root = "README.md"
pages = []
use-autoapi = true

{% endif -%}
{% endif %}
Loading
Loading