anyconv-core 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. anyconv_core-1.0.0/AGENTS.md +124 -0
  2. anyconv_core-1.0.0/CHANGELOG.md +43 -0
  3. anyconv_core-1.0.0/LICENSE +21 -0
  4. anyconv_core-1.0.0/MANIFEST.in +9 -0
  5. anyconv_core-1.0.0/Makefile +68 -0
  6. anyconv_core-1.0.0/PKG-INFO +497 -0
  7. anyconv_core-1.0.0/README.md +448 -0
  8. anyconv_core-1.0.0/SECURITY.md +37 -0
  9. anyconv_core-1.0.0/SPEC.md +745 -0
  10. anyconv_core-1.0.0/docs/DECISIONS.md +112 -0
  11. anyconv_core-1.0.0/docs/RELEASING.md +151 -0
  12. anyconv_core-1.0.0/docs/deployment.md +52 -0
  13. anyconv_core-1.0.0/docs/dev-task-basic-modules.md +304 -0
  14. anyconv_core-1.0.0/docs/dev-task-core.md +287 -0
  15. anyconv_core-1.0.0/docs/quickstart.md +161 -0
  16. anyconv_core-1.0.0/docs/side-modules-dev-instruction.md +322 -0
  17. anyconv_core-1.0.0/docs/your-first-module.md +163 -0
  18. anyconv_core-1.0.0/pyproject.toml +103 -0
  19. anyconv_core-1.0.0/sdk/README.md +322 -0
  20. anyconv_core-1.0.0/sdk/SPEC.md +745 -0
  21. anyconv_core-1.0.0/sdk/VERSION +1 -0
  22. anyconv_core-1.0.0/sdk/data/currencies/iso4217.yaml +36 -0
  23. anyconv_core-1.0.0/sdk/data/formats/aliases.yaml +73 -0
  24. anyconv_core-1.0.0/sdk/data/formats/formats.yaml +625 -0
  25. anyconv_core-1.0.0/sdk/data/units/length.yaml +15 -0
  26. anyconv_core-1.0.0/sdk/data/units/mass.yaml +14 -0
  27. anyconv_core-1.0.0/sdk/data/units/volume.yaml +17 -0
  28. anyconv_core-1.0.0/sdk/examples/minimal.module.yaml +18 -0
  29. anyconv_core-1.0.0/sdk/examples/quantity.module.yaml +110 -0
  30. anyconv_core-1.0.0/sdk/schemas/module-manifest-1.json +703 -0
  31. anyconv_core-1.0.0/sdk/side-modules-dev-instruction.md +322 -0
  32. anyconv_core-1.0.0/sdk/templates/anyconv.module.yaml +131 -0
  33. anyconv_core-1.0.0/sdk/templates/module.py +26 -0
  34. anyconv_core-1.0.0/sdk/templates/pyproject.toml +29 -0
  35. anyconv_core-1.0.0/sdk/templates/tests/test_contract.py +7 -0
  36. anyconv_core-1.0.0/sdk/validate.py +774 -0
  37. anyconv_core-1.0.0/sdk/vocab/analyses.json +26 -0
  38. anyconv_core-1.0.0/sdk/vocab/effects.json +65 -0
  39. anyconv_core-1.0.0/sdk/vocab/errors.json +114 -0
  40. anyconv_core-1.0.0/sdk/vocab/namespaces.json +21 -0
  41. anyconv_core-1.0.0/sdk/vocab/operations.json +82 -0
  42. anyconv_core-1.0.0/sdk/vocab/traits.json +26 -0
  43. anyconv_core-1.0.0/setup.cfg +4 -0
  44. anyconv_core-1.0.0/setup.py +29 -0
  45. anyconv_core-1.0.0/spec/VERSION +1 -0
  46. anyconv_core-1.0.0/spec/data/currencies/iso4217.yaml +36 -0
  47. anyconv_core-1.0.0/spec/data/formats/aliases.yaml +73 -0
  48. anyconv_core-1.0.0/spec/data/formats/formats.yaml +625 -0
  49. anyconv_core-1.0.0/spec/data/units/length.yaml +15 -0
  50. anyconv_core-1.0.0/spec/data/units/mass.yaml +14 -0
  51. anyconv_core-1.0.0/spec/data/units/volume.yaml +17 -0
  52. anyconv_core-1.0.0/spec/examples/minimal.module.yaml +18 -0
  53. anyconv_core-1.0.0/spec/examples/quantity.module.yaml +110 -0
  54. anyconv_core-1.0.0/spec/schemas/module-manifest-1.json +703 -0
  55. anyconv_core-1.0.0/spec/vocab/analyses.yaml +12 -0
  56. anyconv_core-1.0.0/spec/vocab/effects.yaml +21 -0
  57. anyconv_core-1.0.0/spec/vocab/errors.yaml +40 -0
  58. anyconv_core-1.0.0/spec/vocab/namespaces.yaml +21 -0
  59. anyconv_core-1.0.0/spec/vocab/operations.yaml +24 -0
  60. anyconv_core-1.0.0/spec/vocab/traits.yaml +25 -0
  61. anyconv_core-1.0.0/src/anyconv/__init__.py +5 -0
  62. anyconv_core-1.0.0/src/anyconv/__main__.py +7 -0
  63. anyconv_core-1.0.0/src/anyconv/_contract/README.md +322 -0
  64. anyconv_core-1.0.0/src/anyconv/_contract/SPEC.md +745 -0
  65. anyconv_core-1.0.0/src/anyconv/_contract/VERSION +1 -0
  66. anyconv_core-1.0.0/src/anyconv/_contract/data/currencies/iso4217.yaml +36 -0
  67. anyconv_core-1.0.0/src/anyconv/_contract/data/formats/aliases.yaml +73 -0
  68. anyconv_core-1.0.0/src/anyconv/_contract/data/formats/formats.yaml +625 -0
  69. anyconv_core-1.0.0/src/anyconv/_contract/data/units/length.yaml +15 -0
  70. anyconv_core-1.0.0/src/anyconv/_contract/data/units/mass.yaml +14 -0
  71. anyconv_core-1.0.0/src/anyconv/_contract/data/units/volume.yaml +17 -0
  72. anyconv_core-1.0.0/src/anyconv/_contract/examples/minimal.module.yaml +18 -0
  73. anyconv_core-1.0.0/src/anyconv/_contract/examples/quantity.module.yaml +110 -0
  74. anyconv_core-1.0.0/src/anyconv/_contract/schemas/module-manifest-1.json +703 -0
  75. anyconv_core-1.0.0/src/anyconv/_contract/side-modules-dev-instruction.md +322 -0
  76. anyconv_core-1.0.0/src/anyconv/_contract/templates/anyconv.module.yaml +131 -0
  77. anyconv_core-1.0.0/src/anyconv/_contract/templates/module.py +26 -0
  78. anyconv_core-1.0.0/src/anyconv/_contract/templates/pyproject.toml +29 -0
  79. anyconv_core-1.0.0/src/anyconv/_contract/templates/tests/test_contract.py +7 -0
  80. anyconv_core-1.0.0/src/anyconv/_contract/validate.py +774 -0
  81. anyconv_core-1.0.0/src/anyconv/_contract/vocab/analyses.json +26 -0
  82. anyconv_core-1.0.0/src/anyconv/_contract/vocab/effects.json +65 -0
  83. anyconv_core-1.0.0/src/anyconv/_contract/vocab/errors.json +114 -0
  84. anyconv_core-1.0.0/src/anyconv/_contract/vocab/namespaces.json +21 -0
  85. anyconv_core-1.0.0/src/anyconv/_contract/vocab/operations.json +82 -0
  86. anyconv_core-1.0.0/src/anyconv/_contract/vocab/traits.json +26 -0
  87. anyconv_core-1.0.0/src/anyconv/cli/__init__.py +4 -0
  88. anyconv_core-1.0.0/src/anyconv/cli/__main__.py +7 -0
  89. anyconv_core-1.0.0/src/anyconv/cli/main.py +911 -0
  90. anyconv_core-1.0.0/src/anyconv/engine.py +576 -0
  91. anyconv_core-1.0.0/src/anyconv/loader/__init__.py +24 -0
  92. anyconv_core-1.0.0/src/anyconv/loader/discovery.py +320 -0
  93. anyconv_core-1.0.0/src/anyconv/loader/loader.py +325 -0
  94. anyconv_core-1.0.0/src/anyconv/manifest/__init__.py +61 -0
  95. anyconv_core-1.0.0/src/anyconv/manifest/expressions.py +184 -0
  96. anyconv_core-1.0.0/src/anyconv/manifest/loader.py +261 -0
  97. anyconv_core-1.0.0/src/anyconv/manifest/ranges.py +121 -0
  98. anyconv_core-1.0.0/src/anyconv/manifest/settings.py +230 -0
  99. anyconv_core-1.0.0/src/anyconv/manifest/validator.py +109 -0
  100. anyconv_core-1.0.0/src/anyconv/model/__init__.py +27 -0
  101. anyconv_core-1.0.0/src/anyconv/model/artifact.py +116 -0
  102. anyconv_core-1.0.0/src/anyconv/model/manifest.py +240 -0
  103. anyconv_core-1.0.0/src/anyconv/model/output.py +106 -0
  104. anyconv_core-1.0.0/src/anyconv/model/plan.py +103 -0
  105. anyconv_core-1.0.0/src/anyconv/model/result.py +15 -0
  106. anyconv_core-1.0.0/src/anyconv/model/typeref.py +268 -0
  107. anyconv_core-1.0.0/src/anyconv/planner/__init__.py +5 -0
  108. anyconv_core-1.0.0/src/anyconv/planner/graph.py +192 -0
  109. anyconv_core-1.0.0/src/anyconv/planner/planner.py +500 -0
  110. anyconv_core-1.0.0/src/anyconv/py.typed +0 -0
  111. anyconv_core-1.0.0/src/anyconv/registry/__init__.py +13 -0
  112. anyconv_core-1.0.0/src/anyconv/registry/host.py +110 -0
  113. anyconv_core-1.0.0/src/anyconv/registry/records.py +122 -0
  114. anyconv_core-1.0.0/src/anyconv/registry/registry.py +204 -0
  115. anyconv_core-1.0.0/src/anyconv/runtime/__init__.py +7 -0
  116. anyconv_core-1.0.0/src/anyconv/runtime/cache.py +33 -0
  117. anyconv_core-1.0.0/src/anyconv/runtime/envelope.py +85 -0
  118. anyconv_core-1.0.0/src/anyconv/runtime/executor.py +842 -0
  119. anyconv_core-1.0.0/src/anyconv/runtime/workspace.py +20 -0
  120. anyconv_core-1.0.0/src/anyconv/sdk/__init__.py +46 -0
  121. anyconv_core-1.0.0/src/anyconv/sdk/context.py +371 -0
  122. anyconv_core-1.0.0/src/anyconv/sdk/errors.py +195 -0
  123. anyconv_core-1.0.0/src/anyconv/sdk/module.py +41 -0
  124. anyconv_core-1.0.0/src/anyconv/sdk/registries.py +438 -0
  125. anyconv_core-1.0.0/src/anyconv/sdk/testing.py +628 -0
  126. anyconv_core-1.0.0/src/anyconv/server/__init__.py +4 -0
  127. anyconv_core-1.0.0/src/anyconv/server/app.py +483 -0
  128. anyconv_core-1.0.0/src/anyconv/version.py +9 -0
  129. anyconv_core-1.0.0/src/anyconv_core.egg-info/PKG-INFO +497 -0
  130. anyconv_core-1.0.0/src/anyconv_core.egg-info/SOURCES.txt +145 -0
  131. anyconv_core-1.0.0/src/anyconv_core.egg-info/dependency_links.txt +1 -0
  132. anyconv_core-1.0.0/src/anyconv_core.egg-info/entry_points.txt +2 -0
  133. anyconv_core-1.0.0/src/anyconv_core.egg-info/requires.txt +25 -0
  134. anyconv_core-1.0.0/src/anyconv_core.egg-info/top_level.txt +1 -0
  135. anyconv_core-1.0.0/templates/anyconv.module.yaml +131 -0
  136. anyconv_core-1.0.0/templates/module.py +26 -0
  137. anyconv_core-1.0.0/templates/pyproject.toml +29 -0
  138. anyconv_core-1.0.0/templates/tests/test_contract.py +7 -0
  139. anyconv_core-1.0.0/tools/__init__.py +1 -0
  140. anyconv_core-1.0.0/tools/_console.py +18 -0
  141. anyconv_core-1.0.0/tools/check_invariants.py +98 -0
  142. anyconv_core-1.0.0/tools/compile_vocab.py +12 -0
  143. anyconv_core-1.0.0/tools/contract.py +32 -0
  144. anyconv_core-1.0.0/tools/dev.py +374 -0
  145. anyconv_core-1.0.0/tools/sdk/validate.py +774 -0
  146. anyconv_core-1.0.0/tools/sdk_sync.py +65 -0
  147. anyconv_core-1.0.0/tools/spec_check.py +196 -0
@@ -0,0 +1,124 @@
1
+ # AnyConv Core — guide for AI agents and new contributors
2
+
3
+ This file is the fast path for coding agents. Read it before changing code.
4
+ Human-oriented docs: [README.md](README.md), [CONTRIBUTING.md](CONTRIBUTING.md),
5
+ [docs/quickstart.md](docs/quickstart.md).
6
+
7
+ ## What this repository is
8
+
9
+ `anyconv-core` is a domain-agnostic conversion engine. It loads third-party
10
+ modules, validates their manifests, plans a conversion graph and executes it.
11
+ The repository also ships the public module contract (`anyconv.sdk`,
12
+ `anyconv.model`), the CLI and a local Flask API.
13
+
14
+ Public repos:
15
+
16
+ - core: https://gitlab.com/raceozr/anyconv-core
17
+ - reference modules: https://gitlab.com/raceozr/anyconv-modules
18
+
19
+ ## Golden rules
20
+
21
+ 1. **No domain knowledge in the core.** `src/anyconv/` must not know about
22
+ formats, units, currencies, providers, network clients or API keys. CI
23
+ enforces this with `tools/check_invariants.py`.
24
+ 2. **`spec/` and `SPEC.md` are the source of truth.** Never change the
25
+ generated `sdk/` mirror by hand. Change `spec/`, `SPEC.md`, `templates/` or
26
+ `docs/side-modules-dev-instruction.md`, then run:
27
+ `python -m tools.sdk_sync && python -m tools.contract`.
28
+ 3. **Public module API is only `anyconv.sdk` and `anyconv.model`.** Imports
29
+ from `anyconv.loader`, `anyconv.runtime` and other internals are private.
30
+ 4. **No network in the core or tests.** Tests use synthetic modules from
31
+ `tests/fixtures/modules/`; they never download models or call APIs.
32
+ 5. **Tests are the contract.** Add a failing test before fixing behavior. The
33
+ coverage gate for `manifest`/`planner`/`registry` is 85%.
34
+ 6. **Do not edit `src/anyconv/_contract/`.** It is copied from `sdk/` and is
35
+ ignored by git.
36
+
37
+ ## Bootstrap (Linux, macOS, Windows)
38
+
39
+ ```bash
40
+ python -m pip install -e ".[all,dev]"
41
+ python -m tools.contract
42
+ ```
43
+
44
+ `make` is optional. On Windows, use the `python -m tools.dev` commands below.
45
+
46
+ ## Verify
47
+
48
+ ```bash
49
+ python -m tools.dev check # spec + lint + typecheck + coverage + invariants
50
+ python -m tools.dev smoke # build wheel, install in a clean venv, export SDK
51
+ python -m tools.dev gunicorn # HTTP smoke on Linux/macOS (gunicorn)
52
+ python -m tools.dev docker # build/run container if Docker is available
53
+ ```
54
+
55
+ `check` must be green before a commit. `smoke` is required before a release.
56
+
57
+ ## Layout
58
+
59
+ | Path | Meaning |
60
+ |---|---|
61
+ | `src/anyconv/engine.py` | public facade |
62
+ | `src/anyconv/manifest/` | schema, vocab, settings, expressions, ranges |
63
+ | `src/anyconv/loader/` | discovery, compat-check, `check()`, registration |
64
+ | `src/anyconv/planner/` | type graph, Dijkstra, routing, fidelity |
65
+ | `src/anyconv/runtime/` | workspace, blobs, limits, cancellation, provenance |
66
+ | `src/anyconv/registry/` | records, host policy, conflicts |
67
+ | `src/anyconv/sdk/`, `model/` | **public** contract |
68
+ | `spec/` | source of truth: schema, vocab, data, examples |
69
+ | `sdk/` | generated distributable copy for module authors |
70
+ | `templates/` | scaffold sources (intentionally invalid placeholders) |
71
+ | `tests/fixtures/modules/` | synthetic modules for tests |
72
+ | `docs/` | user/developer documentation |
73
+
74
+ ## Common tasks
75
+
76
+ ### Add or change a manifest rule
77
+
78
+ 1. Edit `spec/schemas/module-manifest-1.json` or `spec/vocab/*.yaml`.
79
+ 2. Bump `spec/VERSION` if the contract changes.
80
+ 3. Run `python -m tools.sdk_sync` and `python -m tools.contract`.
81
+ 4. Add tests in `tests/unit/test_manifest.py` or `test_extra_manifest.py`.
82
+ 5. Run `python -m tools.dev check`.
83
+
84
+ ### Change planner/runtime behavior
85
+
86
+ 1. Add a focused test first.
87
+ 2. Update `docs/DECISIONS.md` if the behavior resolves a spec ambiguity.
88
+ 3. Run `python -m tools.dev check`.
89
+ 4. If the public API changes, update `README.md`, `CHANGELOG.md` and the
90
+ version policy in `docs/RELEASING.md`.
91
+
92
+ ### Add a CLI command
93
+
94
+ 1. Implement it in `src/anyconv/cli/main.py`.
95
+ 2. Add a `CliRunner` test in `tests/unit/test_cli.py`.
96
+ 3. Document it in `README.md` and `docs/quickstart.md`.
97
+ 4. Keep machine output (`--json`) on stdout and diagnostics on stderr.
98
+
99
+ ## Release
100
+
101
+ See [docs/RELEASING.md](docs/RELEASING.md). Short version:
102
+
103
+ ```bash
104
+ python -m tools.dev release-check
105
+ python -m tools.dev build
106
+ python -m tools.dev smoke
107
+ git tag -a v1.0.0 -m "AnyConv Core 1.0.0"
108
+ git push origin v1.0.0
109
+ ```
110
+
111
+ The tag pipeline publishes to the GitLab Package Registry and creates a GitLab
112
+ Release. PyPI publication is a manual job guarded by `PYPI_API_TOKEN`.
113
+
114
+ ## Pitfalls
115
+
116
+ - **Build artifacts:** `build/`, `dist/`, `.venv/` and `__pycache__/` are
117
+ excluded from module path discovery. Do not add recursive scans that bypass
118
+ this exclusion.
119
+ - **Windows console:** use `PYTHONIOENCODING=utf-8` or the provided tools; dev
120
+ tools already force UTF-8 output.
121
+ - **Generated files:** `sdk/`, `src/anyconv/_contract/`, `dist/` and
122
+ `coverage.xml` are generated. Do not hand-edit them.
123
+ - **No `make`:** every target has a cross-platform equivalent in
124
+ `python -m tools.dev`.
@@ -0,0 +1,43 @@
1
+ # Changelog
2
+
3
+ Формат — [Keep a Changelog](https://keepachangelog.com/ru/1.1.0/).
4
+ Версионирование — [SemVer](https://semver.org/lang/ru/).
5
+
6
+ ## [1.0.0] — 2026-11-27
7
+
8
+ Первый стабильный релиз ядра. Контракт `SPEC 1.0`, Core API `1.0`.
9
+
10
+ ### Добавлено
11
+
12
+ - Python API, CLI и локальный HTTP API поверх одного `Engine`.
13
+ - Загрузка модулей из entry points, `ANYCONV_PATH`, явных путей и по id;
14
+ compat-check, `check()`-handshake и регистрация.
15
+ - Планировщик графа преобразований: маршрутизация, fidelity, коллекции,
16
+ ограничение шагов и объяснение плана.
17
+ - Рантайм: workspace, blob-выходы, значения, лимиты, отмена, прогресс,
18
+ provenance и in-process кэш.
19
+ - Публичный контракт `anyconv.sdk` / `anyconv.model` и contract-kit L0–L3.
20
+ - Самодостаточная папка `sdk/`: спека, JSON Schema, словари, реестры данных,
21
+ валидные примеры, шаблоны и офлайн-валидатор.
22
+ - Хост-конфигурация: размещение, trust-политика, конфиг модулей и безопасность.
23
+ - Dockerfile с gunicorn и healthcheck.
24
+ - Документация для новичков и AI-агентов: `docs/quickstart.md`,
25
+ `docs/your-first-module.md`, `AGENTS.md`.
26
+
27
+ ### Исправлено
28
+
29
+ - Discovery больше не находит копии манифеста в `build/`, `.venv/`,
30
+ `__pycache__/` и других служебных каталогах после `pip install .`.
31
+ Раньше это давало ложный `E_MODULE_ID_CONFLICT`.
32
+ - Dev-инструменты и офлайн-валидатор принудительно пишут UTF-8, поэтому
33
+ сообщения с `→` не падают на Windows/cp1251.
34
+ - Примеры в README приведены к фактическому поведению: обязательный
35
+ `target_unit`, корректный вывод CLI и Python API.
36
+
37
+ ### Известные ограничения
38
+
39
+ - Исполнение только in-process; subprocess-воркеры и IPC зарезервированы.
40
+ - HTTP API синхронный; асинхронные jobs и очередь зарезервированы.
41
+ - Ядро не предоставляет сеть, провайдеров, секреты и загрузку моделей.
42
+ - Публикация в PyPI выполняется отдельным ручным job после настройки токена;
43
+ до этого используйте релизный git-тег или GitLab Package Registry.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AnyConv contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,9 @@
1
+ include SPEC.md README.md Makefile pyproject.toml setup.py
2
+ include LICENSE CHANGELOG.md SECURITY.md AGENTS.md
3
+ recursive-include spec *
4
+ recursive-include sdk *
5
+ recursive-include templates *
6
+ recursive-include tools *
7
+ recursive-include docs *
8
+ include src/anyconv/py.typed
9
+ global-exclude __pycache__ *.py[cod]
@@ -0,0 +1,68 @@
1
+ PYTHON ?= python
2
+
3
+ .PHONY: help dev sdk-sync contract spec-check lint typecheck test coverage invariants check build smoke gunicorn docker release-check clean
4
+
5
+ help:
6
+ @echo "make dev — editable install с extras"
7
+ @echo "make sdk-sync — пересобрать sdk/ из spec/ и исходников"
8
+ @echo "make contract — скопировать sdk/ в src/anyconv/_contract"
9
+ @echo "make spec-check — проверить спеку, словари и золотые примеры"
10
+ @echo "make lint — ruff"
11
+ @echo "make typecheck — mypy"
12
+ @echo "make test — pytest"
13
+ @echo "make coverage — покрытие manifest/planner/registry (порог 85%)"
14
+ @echo "make invariants — CI-инварианты"
15
+ @echo "make check — spec-check + lint + typecheck + coverage + invariants"
16
+ @echo "make build — wheel/sdist"
17
+ @echo "make smoke — установка wheel в чистый venv и проверка SDK"
18
+ @echo "make gunicorn — HTTP smoke через gunicorn (Linux/macOS)"
19
+ @echo "make docker — сборка и healthcheck контейнера"
20
+ @echo "make release-check — версии, CHANGELOG и тег"
21
+
22
+ dev: contract
23
+ $(PYTHON) -m pip install -e ".[all,dev]"
24
+
25
+ sdk-sync:
26
+ $(PYTHON) -m tools.sdk_sync
27
+
28
+ contract: sdk-sync
29
+ $(PYTHON) -m tools.contract
30
+
31
+ spec-check: contract
32
+ $(PYTHON) -m tools.spec_check
33
+
34
+ lint:
35
+ $(PYTHON) -m ruff check src tests tools setup.py
36
+
37
+ typecheck:
38
+ $(PYTHON) -m mypy src/anyconv
39
+
40
+ test:
41
+ $(PYTHON) -m pytest
42
+
43
+ coverage:
44
+ $(PYTHON) -m pytest --cov=anyconv.manifest --cov=anyconv.planner --cov=anyconv.registry --cov-report=term-missing --cov-report=xml:coverage.xml --cov-fail-under=85
45
+
46
+ invariants: contract
47
+ $(PYTHON) -m tools.check_invariants
48
+
49
+ check: spec-check lint typecheck coverage invariants
50
+
51
+ build: contract
52
+ $(PYTHON) -m build
53
+
54
+ smoke:
55
+ $(PYTHON) -m tools.dev smoke
56
+
57
+ gunicorn:
58
+ $(PYTHON) -m tools.dev gunicorn
59
+
60
+ docker:
61
+ $(PYTHON) -m tools.dev docker
62
+
63
+ release-check:
64
+ $(PYTHON) -m tools.dev release-check
65
+
66
+ clean:
67
+ rm -rf build dist *.egg-info .pytest_cache .mypy_cache .ruff_cache coverage.xml
68
+ find . -name __pycache__ -type d -prune -exec rm -rf {} +