Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Move pyproject.toml to tket2-py #546

Merged
merged 4 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 4 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ updates:
# Major updates still generate individual PRs

- package-ecosystem: "pip"
directory: "/" # Location of package manifests
directories: # Location of package manifests
- "/"
- "/tket2-py"
- "/tket2-eccs"
schedule:
interval: "weekly"
commit-message:
Expand Down
26 changes: 22 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

99 changes: 17 additions & 82 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,39 +1,21 @@
[tool.poetry]
name = "tket2-py"
version = "0.2.1"
description = "Quantinuum's TKET2 Quantum Compiler"
classifiers = [
"Environment :: Console",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
]
name = "tket2-project"
version = "0.0.0"
description = "Namespace for the python packages in the tket2 repository. See the individual packages for more information."
authors = ["TKET development team <[email protected]>"]
maintainers = ["TKET development team <[email protected]>"]
include = ["pyproject.toml"]
license = "Apache-2.0"
readme = "README.md"

packages = [{ include = "tket2-py" }]
packages = [
{ include = "tket2", from = "tket2-py" },
{ include = "tket2_eccs", from = "tket2-eccs" },
]
package-mode = false

[tool.poetry.dependencies]
python = "^3.10"

# Note: Be sure to update the dependency versions in [project.dependencies] as well
#
# Poetry does not currently follow PEP 621, it will be supported on poetry 2
# https://github.com/python-poetry/poetry/issues/3332
tket2_eccs = { path = "tket2-eccs", develop = true }
pytket = "1.31.1"
hugr = "^0.7.0"

[tool.poetry.group.dev.dependencies]
maturin = "^1.7.0"
pytest = "^8.3.2"
Expand All @@ -44,66 +26,19 @@ hypothesis = "^6.111.0"
graphviz = "^0.20"
pre-commit = "^3.8.0"

[build-system]
requires = ["maturin~=1.7"]
build-backend = "maturin"

[project]
name = "tket2"
classifiers = [
"Environment :: Console",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
]
authors = [
{ name = "TKET development team", email = "[email protected]" },
]
maintainers = [
{ name = "TKET development team", email = "[email protected]" },
]
version = "0.2.1"
description = "Quantinuum's TKET2 Quantum Compiler"
requires-python = ">=3.10"
license = { file = "LICENCE" }

# Note: Be sure to update the dependency versions in [tool.poetry.dependencies] as well
dependencies = [
'pytket >= 1.29.2, < 2',
'hugr >= 0.7.0, < 0.8',
'tket2_eccs >= 0.1.0, < 0.2',
]

[project.urls]
homepage = "https://github.com/CQCL/tket2"
repository = "https://github.com/CQCL/tket2"
[tool.poetry.group.tket2.dependencies]
tket2 = { path = "tket2-py", develop = true }

[tool.maturin]
module-name = "tket2._tket2"
# Maturin is not the build system for the workspace (it is only used for `tket2-py`)
# we mirror the `tket2-py/pyproject.toml` config here so `maturin develop` still works
aborgna-q marked this conversation as resolved.
Show resolved Hide resolved
# from the root of the workspace.
manifest-path = "tket2-py/Cargo.toml"
python-source = "tket2-py"
module-name = "tket2._tket2"
# "extension-module" tells pyo3 we want to build an extension module (skips linking against libpython.so)
features = ["pyo3/extension-module"]

[tool.pytest]
pythonpath = "tket2-py"

[tool.pytest.ini_options]
# Lark throws deprecation warnings for `src_parse` and `src_constants`.
filterwarnings = "ignore::DeprecationWarning:lark.*"

[tool.pyright]
# Rust bindings have typing stubs but no python source code.
reportMissingModuleSource = "none"

[[tool.mypy.overrides]]
# Ignore errors in tikv-jemalloc.
module = "gen_run_tests.*"
ignore_errors = true
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
5 changes: 1 addition & 4 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
"include-component-in-tag": true,
"draft": false,
"prerelease": false,
"draft-pull-request": true,
"extra-files": [
"pyproject.toml"
]
"draft-pull-request": true
},
"tket2-eccs": {
"release-type": "python",
Expand Down
4 changes: 2 additions & 2 deletions tket2-eccs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ license = { file = "LICENCE" }
dependencies = []

[project.urls]
homepage = "https://github.com/CQCL/tket2"
repository = "https://github.com/CQCL/tket2"
homepage = "https://github.com/CQCL/tket2/tree/main/tket2-eccs"
repository = "https://github.com/CQCL/tket2/tree/main/tket2-eccs"
Loading
Loading