docs: simplify project guides and add GPLv3
This commit is contained in:
1 parent
e4de6d0f9a
commit
76d32bb79f
59 files changed
+2267
-8843
No files matched your search
+10
-3
@@ -8,9 +8,16 @@ Helper tools that work across multiple parts of the repository.
|
||||
- `check-api-compat.sh` checks public API compatibility against a selected Git ref.
|
||||
- `check-generated.py` detects generated files that differ from Git.
|
||||
- `docs-check.py` checks documentation, README language pairs, and local links.
|
||||
- `test_docs_check.py` and `test_merge_schemas.py` test documentation validation and schema merging; `test_contract_copies.py` checks that the OpenAPI 3.2 fixture and the ML contract keep identical copies of the api/core conventions.
|
||||
- `test_workflow_aggregate.py` checks every workflow in `.github/workflows` that has an `aggregate` job: the aggregate needs every other job and runs with `if: always()`, and every `needs` entry names an existing job. The test uses only the Python standard library and fails when it does not recognize the workflow structure.
|
||||
- `test_*.py` test these tools, API conventions, and dependencies between CI jobs.
|
||||
|
||||
Run them through Make from the repository root: `make -C api check`, `make -C api check-compat API_BASE_REF=<ref>`, `make check-generated`, `make docs-check`, and `make -C deploy check-workflows` (part of `make -C deploy check`). Service-specific scripts live in their service directories.
|
||||
From the repository root:
|
||||
|
||||
| Purpose | Command |
|
||||
| --- | --- |
|
||||
| Contracts and their tests | `make -C api check` |
|
||||
| Compatibility with a Git ref | `make -C api check-compat API_BASE_REF=<ref>` |
|
||||
| Generated files against Git | `make check-generated` |
|
||||
| Documentation and links | `make docs-check` |
|
||||
| CI job dependencies | `make -C deploy check-workflows` |
|
||||
|
||||
See the [development guide](../docs/en/DEVELOPMENT.md).
|
||||
+10
-3
@@ -8,9 +8,16 @@
|
||||
- `check-api-compat.sh` проверяет совместимость публичного API с выбранной Git-ссылкой.
|
||||
- `check-generated.py` обнаруживает расхождения сгенерированных файлов с Git.
|
||||
- `docs-check.py` проверяет документацию, языковые пары README и локальные ссылки.
|
||||
- `test_docs_check.py` и `test_merge_schemas.py` проверяют валидацию документации и объединение схем; `test_contract_copies.py` проверяет, что фикстура OpenAPI 3.2 и ML-контракт хранят идентичные копии соглашений api/core.
|
||||
- `test_workflow_aggregate.py` проверяет каждый workflow в `.github/workflows` с job `aggregate`: aggregate зависит от всех остальных jobs и запускается с `if: always()`, а все `needs` ссылаются на существующие jobs. Тест использует только стандартную библиотеку Python и падает, если не распознал структуру workflow.
|
||||
- `test_*.py` проверяют эти инструменты, соглашения API и зависимости между CI jobs.
|
||||
|
||||
Запускайте их через Make из корня: `make -C api check`, `make -C api check-compat API_BASE_REF=<ref>`, `make check-generated`, `make docs-check` и `make -C deploy check-workflows` (входит в `make -C deploy check`). Скрипты конкретного сервиса находятся в его каталоге.
|
||||
Из корня репозитория:
|
||||
|
||||
| Задача | Команда |
|
||||
| --- | --- |
|
||||
| Контракты и их тесты | `make -C api check` |
|
||||
| Совместимость с Git ref | `make -C api check-compat API_BASE_REF=<ref>` |
|
||||
| Сгенерированные файлы против Git | `make check-generated` |
|
||||
| Документация и ссылки | `make docs-check` |
|
||||
| Зависимости CI jobs | `make -C deploy check-workflows` |
|
||||
|
||||
Подробнее: [разработка](../docs/ru/DEVELOPMENT.md).
|
||||
@@ -37,7 +37,13 @@ IGNORED_DIRS = {
|
||||
"vendor",
|
||||
"venv",
|
||||
}
|
||||
LANGUAGE_DOCS = {"ARCHITECTURE.md", "DEPLOY.md", "DEVELOPMENT.md", "TESTING.md"}
|
||||
LANGUAGE_DOCS = {
|
||||
"ARCHITECTURE.md",
|
||||
"DEPLOYMENT.md",
|
||||
"DEVELOPMENT.md",
|
||||
"SECURITY.md",
|
||||
"TESTING.md",
|
||||
}
|
||||
README_NAMES = ("README.md", "README.en.md")
|
||||
INLINE_LINK = re.compile(
|
||||
r"!?\[[^\]]*\]\(\s*(<[^>]+>|(?:\\.|[^\s)])+)(?:\s+[^)]*)?\)"
|
||||
|
||||
@@ -34,7 +34,7 @@ class RepositoryTestCase(unittest.TestCase):
|
||||
self.write(".agents/workflows/development.md", "Development.\n")
|
||||
self.write(".agents/workflows/validation.md", "Validation.\n")
|
||||
for language in ("ru", "en"):
|
||||
for name in ("ARCHITECTURE", "DEPLOY", "DEVELOPMENT", "TESTING"):
|
||||
for name in ("ARCHITECTURE", "DEPLOYMENT", "DEVELOPMENT", "SECURITY", "TESTING"):
|
||||
self.write(f"docs/{language}/{name}.md", f"# {name}\n")
|
||||
|
||||
def tearDown(self) -> None:
|
||||
@@ -58,6 +58,16 @@ class DocsCheckTests(RepositoryTestCase):
|
||||
self.write("docs/en/FAQ.md", "# FAQ\n")
|
||||
self.assertEqual([], DOCS_CHECK.validate_repository(self.root))
|
||||
|
||||
def test_requires_deployment_and_security_guides(self) -> None:
|
||||
for name in ("DEPLOYMENT", "SECURITY"):
|
||||
with self.subTest(name=name):
|
||||
path = self.root / "docs/ru" / f"{name}.md"
|
||||
path.unlink()
|
||||
self.write("docs/ru/DEPLOY.md", "# Legacy deployment guide\n")
|
||||
errors = DOCS_CHECK.validate_repository(self.root)
|
||||
self.assertIn(f"docs/ru is missing required files: {name}.md", errors)
|
||||
self.write(f"docs/ru/{name}.md", f"# {name}\n")
|
||||
|
||||
def test_accepts_top_level_readme_pairs(self) -> None:
|
||||
for directory in ("backend", ".github", ".agents", "docs"):
|
||||
self.write(f"{directory}/README.md", "[English](README.en.md)\n")
|
||||
|
||||
Reference in new issue
Block a user