-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
111 lines (101 loc) · 4.36 KB
/
Copy pathpyproject.toml
File metadata and controls
111 lines (101 loc) · 4.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
[project]
name = "metaobjects"
version = "0.19.2"
description = "Cross-language metadata standard: declare typed entities once, generate idiomatic drift-checked code across languages — Python port."
readme = "README.md"
requires-python = ">=3.11"
license = "Apache-2.0"
license-files = ["LICENSE"]
authors = [{ name = "Doug Mealing", email = "doug@metaobjects.com" }]
keywords = [
"metadata",
"code-generation",
"codegen",
"schema",
"orm",
"drift-detection",
"cross-language",
"sqlalchemy",
"pydantic",
"fastapi",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Libraries",
"Typing :: Typed",
]
dependencies = [
# YAML authoring front-end (ADR-0006). The desugar lowers sugared YAML to
# canonical JSON before the shared tree-builder runs.
"PyYAML>=6.0",
]
[project.scripts]
# Codegen CLI (gen + verify). Named `metaobjects`, NOT `meta` — `meta` is the
# Node schema CLI. No `migrate` subcommand: schema is Node-owned (ADR-0015).
metaobjects = "metaobjects.cli:main"
[project.urls]
Homepage = "https://metaobjects.dev"
Repository = "https://github.com/metaobjectsdev/metaobjects"
Documentation = "https://github.com/metaobjectsdev/metaobjects/tree/main/docs"
Issues = "https://github.com/metaobjectsdev/metaobjects/issues"
[project.optional-dependencies]
dev = ["pytest>=8", "mypy>=1.10", "ruff>=0.6", "pydantic>=2"]
# On-demand cross-language conformance suites — persistence + api-contract.
# pg8000 is pure-python so this extra installs cleanly without native deps;
# the persistence harness shells out to the docker CLI directly (matches the
# TS/Java pattern of bypassing testcontainers wrappers entirely); the
# api-contract harness drives a FastAPI Author API in-process via the
# starlette TestClient (httpx).
integration = ["pg8000>=1.31", "fastapi>=0.110", "httpx>=0.27"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/metaobjects"]
exclude = ["**/KNOWN_GAPS.md"]
# Bundle the repo-root agent-context/ content tree into the package so the installed
# `metaobjects agent-docs` command can resolve it offline (no Node, no monorepo).
# A custom build hook (hatch_build.py) copies ../../agent-context into
# src/metaobjects/agent_context/_content at build time, and `artifacts` below forces
# that (gitignored) tree into BOTH the sdist and the wheel — so `uv build`
# (sdist -> wheel) works, not just a direct wheel build. In dev/test the resolver
# falls back to walking up to the monorepo agent-context/.
[tool.hatch.build.hooks.custom]
# FR-033 — the 15 shared spec/metamodel/*.json files are COMMITTED copies under
# src/metaobjects/spec_metamodel/ (not build-time-generated), so hatchling's default
# package inclusion ships them in both the sdist and the wheel (read via
# importlib.resources, AOT-safe). A byte-identity gate
# (tests/conformance/test_spec_metamodel_embed.py) keeps the copies from drifting
# from the repo-root spec/metamodel/ source.
[tool.hatch.build]
artifacts = ["src/metaobjects/agent_context/_content/**"]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
[tool.mypy]
python_version = "3.11"
strict = true
files = ["src/metaobjects", "tests"]
# Golden expected files are generated-code fixtures (relative imports resolve only
# as an emitted package); they are validated by the golden + import-check tests, not mypy.
exclude = ["tests/codegen/golden/"]
[dependency-groups]
dev = [
"pytest>=9.0.3",
# `uv run` installs THIS group (PEP 735), not [project.optional-dependencies].
# The validator-parity corpus (tests/codegen/test_validation_conformance.py)
# imports pydantic to exercise the generated Pydantic models, so it must be here
# or the CI `uv run pytest` collection fails with ModuleNotFoundError.
"pydantic>=2",
# ruff is the Python codegen format pass (src/metaobjects/codegen/format.py); the
# cli-registry corpus runs codegen, so without ruff in the group `uv run pytest`
# fails at format time with "No module named ruff".
"ruff>=0.6",
]