# using https://hatch.pypa.io/latest/ # hatch build -t wheel # hatch run test:test # hatch run test:coverage # hatch shell [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "ironcore-alloy" authors = [{ name = "IronCore Labs", email = "info@ironcorelabs.com" }] description = "Python bindings to the IronCore Labs Alloy SDK. Used for encrypting and decrypting embeddings and their related metadata." readme = "README.md" requires-python = ">=3.9" classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Operating System :: MacOS", "Operating System :: POSIX :: Linux", ] dependencies = [] dynamic = ["version"] [project.urls] Homepage = "https://ironcorelabs.com" [tool.hatch.version] # version is locked to the Rust SDK version in Cargo.toml path = "../../Cargo.toml" pattern = "^version = \"(?P[^\"]+)\"$" [tool.hatch.build] artifacts = ["*.so", "*.dylib"] # tells hatch to use our `hatch_build.py` file [tool.hatch.build.targets.wheel.hooks.custom] [tool.hatch.envs.default] python = "3.10" [tool.hatch.envs.docs] dependencies = ["mkdocs.material==9.4.8", "mkdocstrings-python==1.10.8"] [tool.hatch.envs.docs.scripts] build = "mkdocs build --clean --strict {args}" serve = "mkdocs serve --dev-addr localhost:8000 {args}" [tool.hatch.envs.test] dependencies = [ "pytest==7.4.2", "pytest-cov==4.1.0", "pytest-metadata==3.0.0", "pytest-asyncio==0.21.1", ] [tool.hatch.envs.test.scripts] coverage = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=ironcore_alloy --cov=tests {args}" test = "coverage --no-cov {args}" [[tool.hatch.envs.test.matrix]] python = ["39", "310", "311"] [tool.hatch.envs.bench] dependencies = ["pyperf==2.6.2"] [tool.hatch.envs.bench.scripts] bench = "rm bench.json; python bench.py -o bench.json" stats = "pyperf stats bench.json" [tool.coverage.run] branch = true parallel = true omit = ["ironcore_alloy/__about__.py"] [tool.coverage.report] exclude_lines = [ "no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:", "class _Uniffi", "def _uniffi", "_Uniffi", ]