OperonDBS 0.6.2__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 (232) hide show
  1. operondbs-0.6.2/.github/workflows/deploy.yml +48 -0
  2. operondbs-0.6.2/.github/workflows/publish.yml +88 -0
  3. operondbs-0.6.2/.gitignore +28 -0
  4. operondbs-0.6.2/.readthedocs.yaml +15 -0
  5. operondbs-0.6.2/AGENTS.md +190 -0
  6. operondbs-0.6.2/LICENSE +661 -0
  7. operondbs-0.6.2/MANIFEST.in +17 -0
  8. operondbs-0.6.2/OperonDBS.egg-info/PKG-INFO +115 -0
  9. operondbs-0.6.2/OperonDBS.egg-info/SOURCES.txt +230 -0
  10. operondbs-0.6.2/OperonDBS.egg-info/dependency_links.txt +1 -0
  11. operondbs-0.6.2/OperonDBS.egg-info/entry_points.txt +2 -0
  12. operondbs-0.6.2/OperonDBS.egg-info/requires.txt +44 -0
  13. operondbs-0.6.2/OperonDBS.egg-info/top_level.txt +1 -0
  14. operondbs-0.6.2/PKG-INFO +115 -0
  15. operondbs-0.6.2/README.md +58 -0
  16. operondbs-0.6.2/README_ZH.md +55 -0
  17. operondbs-0.6.2/benchmarks/qc_representative_entities.tsv +19 -0
  18. operondbs-0.6.2/docs/_static/language-switcher.js +20 -0
  19. operondbs-0.6.2/docs/_static/operon.css +32 -0
  20. operondbs-0.6.2/docs/_templates/layout.html +10 -0
  21. operondbs-0.6.2/docs/conf.py +91 -0
  22. operondbs-0.6.2/docs/en/architecture/extensibility.md +13 -0
  23. operondbs-0.6.2/docs/en/architecture/external-analysis.md +47 -0
  24. operondbs-0.6.2/docs/en/architecture/files-and-storage.md +50 -0
  25. operondbs-0.6.2/docs/en/architecture/index.md +25 -0
  26. operondbs-0.6.2/docs/en/architecture/metadata-and-data-model.md +72 -0
  27. operondbs-0.6.2/docs/en/architecture/overview.md +154 -0
  28. operondbs-0.6.2/docs/en/architecture/qc-and-rules.md +66 -0
  29. operondbs-0.6.2/docs/en/architecture/release-lifecycle.md +32 -0
  30. operondbs-0.6.2/docs/en/architecture/taxonomy-coverage.md +16 -0
  31. operondbs-0.6.2/docs/en/contributor/application-release.md +52 -0
  32. operondbs-0.6.2/docs/en/contributor/development-testing.md +34 -0
  33. operondbs-0.6.2/docs/en/contributor/documentation-deployment.md +38 -0
  34. operondbs-0.6.2/docs/en/contributor/index.md +17 -0
  35. operondbs-0.6.2/docs/en/contributor/pypi-release.md +45 -0
  36. operondbs-0.6.2/docs/en/contributor/repository-guide.md +31 -0
  37. operondbs-0.6.2/docs/en/getting-started/daily-workflow.md +60 -0
  38. operondbs-0.6.2/docs/en/getting-started/first-project.md +331 -0
  39. operondbs-0.6.2/docs/en/getting-started/index.md +15 -0
  40. operondbs-0.6.2/docs/en/getting-started/installation.md +66 -0
  41. operondbs-0.6.2/docs/en/getting-started/quickstart.md +44 -0
  42. operondbs-0.6.2/docs/en/guides/backup-migration.md +60 -0
  43. operondbs-0.6.2/docs/en/guides/curation-lifecycle.md +107 -0
  44. operondbs-0.6.2/docs/en/guides/external-analysis.md +259 -0
  45. operondbs-0.6.2/docs/en/guides/file-archiving.md +83 -0
  46. operondbs-0.6.2/docs/en/guides/index.md +31 -0
  47. operondbs-0.6.2/docs/en/guides/metadata-import.md +66 -0
  48. operondbs-0.6.2/docs/en/guides/ncbi-datasets.md +140 -0
  49. operondbs-0.6.2/docs/en/guides/qc-profiles.md +147 -0
  50. operondbs-0.6.2/docs/en/guides/remote-execution.md +96 -0
  51. operondbs-0.6.2/docs/en/guides/remote-storage.md +110 -0
  52. operondbs-0.6.2/docs/en/guides/taxonomy-coverage.md +194 -0
  53. operondbs-0.6.2/docs/en/guides/troubleshooting.md +20 -0
  54. operondbs-0.6.2/docs/en/index.md +44 -0
  55. operondbs-0.6.2/docs/en/operations/database-compatibility.md +69 -0
  56. operondbs-0.6.2/docs/en/operations/index.md +13 -0
  57. operondbs-0.6.2/docs/en/operations/ncbi-recovery-migration.md +208 -0
  58. operondbs-0.6.2/docs/en/operations/qc-performance.md +102 -0
  59. operondbs-0.6.2/docs/en/overview.md +35 -0
  60. operondbs-0.6.2/docs/en/reference/cli-analysis.md +111 -0
  61. operondbs-0.6.2/docs/en/reference/cli-decisions-reports.md +146 -0
  62. operondbs-0.6.2/docs/en/reference/cli-files-qc.md +69 -0
  63. operondbs-0.6.2/docs/en/reference/cli-project-metadata.md +174 -0
  64. operondbs-0.6.2/docs/en/reference/cli-remote.md +56 -0
  65. operondbs-0.6.2/docs/en/reference/cli-taxonomy-lifecycle-admin.md +87 -0
  66. operondbs-0.6.2/docs/en/reference/cli-tui.md +117 -0
  67. operondbs-0.6.2/docs/en/reference/cli-workflow.md +96 -0
  68. operondbs-0.6.2/docs/en/reference/data-model.md +110 -0
  69. operondbs-0.6.2/docs/en/reference/index.md +42 -0
  70. operondbs-0.6.2/docs/en/reference/recipe-fields.md +328 -0
  71. operondbs-0.6.2/docs/en/reference/recipe-overview.md +129 -0
  72. operondbs-0.6.2/docs/en/reference/recipe-parsers-examples.md +286 -0
  73. operondbs-0.6.2/docs/index.md +18 -0
  74. operondbs-0.6.2/docs/requirements.txt +3 -0
  75. operondbs-0.6.2/docs/zh/architecture/extensibility.md +38 -0
  76. operondbs-0.6.2/docs/zh/architecture/external-analysis.md +114 -0
  77. operondbs-0.6.2/docs/zh/architecture/files-and-storage.md +75 -0
  78. operondbs-0.6.2/docs/zh/architecture/index.md +25 -0
  79. operondbs-0.6.2/docs/zh/architecture/metadata-and-data-model.md +111 -0
  80. operondbs-0.6.2/docs/zh/architecture/overview.md +140 -0
  81. operondbs-0.6.2/docs/zh/architecture/qc-and-rules.md +89 -0
  82. operondbs-0.6.2/docs/zh/architecture/release-lifecycle.md +51 -0
  83. operondbs-0.6.2/docs/zh/architecture/taxonomy-coverage.md +33 -0
  84. operondbs-0.6.2/docs/zh/contributor/application-release.md +69 -0
  85. operondbs-0.6.2/docs/zh/contributor/development-testing.md +42 -0
  86. operondbs-0.6.2/docs/zh/contributor/documentation-deployment.md +38 -0
  87. operondbs-0.6.2/docs/zh/contributor/index.md +17 -0
  88. operondbs-0.6.2/docs/zh/contributor/pypi-release.md +38 -0
  89. operondbs-0.6.2/docs/zh/contributor/repository-guide.md +31 -0
  90. operondbs-0.6.2/docs/zh/getting-started/daily-workflow.md +62 -0
  91. operondbs-0.6.2/docs/zh/getting-started/first-project.md +404 -0
  92. operondbs-0.6.2/docs/zh/getting-started/index.md +15 -0
  93. operondbs-0.6.2/docs/zh/getting-started/installation.md +65 -0
  94. operondbs-0.6.2/docs/zh/getting-started/quickstart.md +42 -0
  95. operondbs-0.6.2/docs/zh/guides/backup-migration.md +62 -0
  96. operondbs-0.6.2/docs/zh/guides/curation-lifecycle.md +116 -0
  97. operondbs-0.6.2/docs/zh/guides/external-analysis.md +324 -0
  98. operondbs-0.6.2/docs/zh/guides/file-archiving.md +89 -0
  99. operondbs-0.6.2/docs/zh/guides/index.md +31 -0
  100. operondbs-0.6.2/docs/zh/guides/metadata-import.md +72 -0
  101. operondbs-0.6.2/docs/zh/guides/ncbi-datasets.md +166 -0
  102. operondbs-0.6.2/docs/zh/guides/qc-profiles.md +158 -0
  103. operondbs-0.6.2/docs/zh/guides/remote-execution.md +121 -0
  104. operondbs-0.6.2/docs/zh/guides/remote-storage.md +124 -0
  105. operondbs-0.6.2/docs/zh/guides/taxonomy-coverage.md +233 -0
  106. operondbs-0.6.2/docs/zh/guides/troubleshooting.md +20 -0
  107. operondbs-0.6.2/docs/zh/index.md +44 -0
  108. operondbs-0.6.2/docs/zh/operations/database-compatibility.md +136 -0
  109. operondbs-0.6.2/docs/zh/operations/index.md +13 -0
  110. operondbs-0.6.2/docs/zh/operations/ncbi-recovery-migration.md +249 -0
  111. operondbs-0.6.2/docs/zh/operations/qc-performance.md +141 -0
  112. operondbs-0.6.2/docs/zh/overview.md +33 -0
  113. operondbs-0.6.2/docs/zh/reference/cli-analysis.md +152 -0
  114. operondbs-0.6.2/docs/zh/reference/cli-decisions-reports.md +193 -0
  115. operondbs-0.6.2/docs/zh/reference/cli-files-qc.md +90 -0
  116. operondbs-0.6.2/docs/zh/reference/cli-project-metadata.md +212 -0
  117. operondbs-0.6.2/docs/zh/reference/cli-remote.md +73 -0
  118. operondbs-0.6.2/docs/zh/reference/cli-taxonomy-lifecycle-admin.md +108 -0
  119. operondbs-0.6.2/docs/zh/reference/cli-tui.md +101 -0
  120. operondbs-0.6.2/docs/zh/reference/cli-workflow.md +82 -0
  121. operondbs-0.6.2/docs/zh/reference/data-model.md +135 -0
  122. operondbs-0.6.2/docs/zh/reference/index.md +42 -0
  123. operondbs-0.6.2/docs/zh/reference/recipe-fields.md +364 -0
  124. operondbs-0.6.2/docs/zh/reference/recipe-overview.md +141 -0
  125. operondbs-0.6.2/docs/zh/reference/recipe-parsers-examples.md +305 -0
  126. operondbs-0.6.2/operon/__init__.py +8 -0
  127. operondbs-0.6.2/operon/__main__.py +4 -0
  128. operondbs-0.6.2/operon/adapters/__init__.py +1 -0
  129. operondbs-0.6.2/operon/adapters/ncbi_datasets.py +2750 -0
  130. operondbs-0.6.2/operon/backup.py +136 -0
  131. operondbs-0.6.2/operon/cli.py +1947 -0
  132. operondbs-0.6.2/operon/config.py +238 -0
  133. operondbs-0.6.2/operon/coverage.py +775 -0
  134. operondbs-0.6.2/operon/database.py +1662 -0
  135. operondbs-0.6.2/operon/demo.py +212 -0
  136. operondbs-0.6.2/operon/entity_view.py +341 -0
  137. operondbs-0.6.2/operon/environment.py +92 -0
  138. operondbs-0.6.2/operon/errors.py +37 -0
  139. operondbs-0.6.2/operon/execution.py +1240 -0
  140. operondbs-0.6.2/operon/export.py +260 -0
  141. operondbs-0.6.2/operon/files.py +749 -0
  142. operondbs-0.6.2/operon/import_wizard.py +594 -0
  143. operondbs-0.6.2/operon/lifecycle.py +370 -0
  144. operondbs-0.6.2/operon/lineage.py +193 -0
  145. operondbs-0.6.2/operon/metadata_files.py +19 -0
  146. operondbs-0.6.2/operon/ncbi_reconcile.py +468 -0
  147. operondbs-0.6.2/operon/profiles.py +253 -0
  148. operondbs-0.6.2/operon/qc_module/__init__.py +691 -0
  149. operondbs-0.6.2/operon/qc_module/_parsers.pyx +876 -0
  150. operondbs-0.6.2/operon/qc_module/parsers.py +629 -0
  151. operondbs-0.6.2/operon/release.py +276 -0
  152. operondbs-0.6.2/operon/remotes.py +1108 -0
  153. operondbs-0.6.2/operon/reports.py +200 -0
  154. operondbs-0.6.2/operon/rules.py +312 -0
  155. operondbs-0.6.2/operon/schema.py +461 -0
  156. operondbs-0.6.2/operon/shutdown.py +74 -0
  157. operondbs-0.6.2/operon/table_import.py +393 -0
  158. operondbs-0.6.2/operon/taxonomy.py +1087 -0
  159. operondbs-0.6.2/operon/tools.py +1537 -0
  160. operondbs-0.6.2/operon/tui/__init__.py +1 -0
  161. operondbs-0.6.2/operon/tui/actions.py +520 -0
  162. operondbs-0.6.2/operon/tui/app.py +143 -0
  163. operondbs-0.6.2/operon/tui/app.tcss +255 -0
  164. operondbs-0.6.2/operon/tui/data.py +580 -0
  165. operondbs-0.6.2/operon/tui/screens/__init__.py +1 -0
  166. operondbs-0.6.2/operon/tui/screens/common.py +289 -0
  167. operondbs-0.6.2/operon/tui/screens/config.py +939 -0
  168. operondbs-0.6.2/operon/tui/screens/decisions.py +300 -0
  169. operondbs-0.6.2/operon/tui/screens/entities.py +341 -0
  170. operondbs-0.6.2/operon/tui/screens/files.py +233 -0
  171. operondbs-0.6.2/operon/tui/screens/files_ops.py +237 -0
  172. operondbs-0.6.2/operon/tui/screens/home.py +125 -0
  173. operondbs-0.6.2/operon/tui/screens/runs.py +221 -0
  174. operondbs-0.6.2/operon/utils.py +266 -0
  175. operondbs-0.6.2/operon/workflow.py +447 -0
  176. operondbs-0.6.2/pyproject.toml +123 -0
  177. operondbs-0.6.2/setup.cfg +4 -0
  178. operondbs-0.6.2/setup.py +25 -0
  179. operondbs-0.6.2/tests/__init__.py +1 -0
  180. operondbs-0.6.2/tests/compatibility/__init__.py +1 -0
  181. operondbs-0.6.2/tests/compatibility/test_python_support.py +51 -0
  182. operondbs-0.6.2/tests/helpers.py +80 -0
  183. operondbs-0.6.2/tests/integration/__init__.py +1 -0
  184. operondbs-0.6.2/tests/integration/test_analysis_resume.py +220 -0
  185. operondbs-0.6.2/tests/integration/test_analysis_shutdown.py +202 -0
  186. operondbs-0.6.2/tests/integration/test_analysis_tools.py +492 -0
  187. operondbs-0.6.2/tests/integration/test_application_build.py +298 -0
  188. operondbs-0.6.2/tests/integration/test_execution_backends.py +179 -0
  189. operondbs-0.6.2/tests/integration/test_lineage_cascade.py +170 -0
  190. operondbs-0.6.2/tests/integration/test_ncbi_datasets_adapter.py +1269 -0
  191. operondbs-0.6.2/tests/integration/test_pipeline_and_release.py +150 -0
  192. operondbs-0.6.2/tests/integration/test_taxonomy_coverage.py +361 -0
  193. operondbs-0.6.2/tests/regression/__init__.py +1 -0
  194. operondbs-0.6.2/tests/regression/test_correctness.py +498 -0
  195. operondbs-0.6.2/tests/regression/test_cython_parser_parity.py +210 -0
  196. operondbs-0.6.2/tests/regression/test_parser_semantics.py +169 -0
  197. operondbs-0.6.2/tests/unit/__init__.py +1 -0
  198. operondbs-0.6.2/tests/unit/test_cli_edges.py +685 -0
  199. operondbs-0.6.2/tests/unit/test_config_workflow_edges.py +157 -0
  200. operondbs-0.6.2/tests/unit/test_coverage_edges.py +426 -0
  201. operondbs-0.6.2/tests/unit/test_database_edges_more.py +124 -0
  202. operondbs-0.6.2/tests/unit/test_environment.py +121 -0
  203. operondbs-0.6.2/tests/unit/test_execution.py +1073 -0
  204. operondbs-0.6.2/tests/unit/test_execution_edges.py +500 -0
  205. operondbs-0.6.2/tests/unit/test_export.py +196 -0
  206. operondbs-0.6.2/tests/unit/test_files_edges.py +413 -0
  207. operondbs-0.6.2/tests/unit/test_import_backup_show.py +523 -0
  208. operondbs-0.6.2/tests/unit/test_import_wizard_edges.py +341 -0
  209. operondbs-0.6.2/tests/unit/test_lifecycle.py +629 -0
  210. operondbs-0.6.2/tests/unit/test_lineage.py +227 -0
  211. operondbs-0.6.2/tests/unit/test_ncbi_edge_cases.py +1035 -0
  212. operondbs-0.6.2/tests/unit/test_ncbi_reconcile_edges.py +206 -0
  213. operondbs-0.6.2/tests/unit/test_parser_edge_paths.py +115 -0
  214. operondbs-0.6.2/tests/unit/test_qc_and_rules.py +525 -0
  215. operondbs-0.6.2/tests/unit/test_qc_edges_more.py +189 -0
  216. operondbs-0.6.2/tests/unit/test_recipe_history.py +220 -0
  217. operondbs-0.6.2/tests/unit/test_remotes.py +817 -0
  218. operondbs-0.6.2/tests/unit/test_remotes_edges.py +532 -0
  219. operondbs-0.6.2/tests/unit/test_rules_schema_edges.py +357 -0
  220. operondbs-0.6.2/tests/unit/test_schema_2_9.py +86 -0
  221. operondbs-0.6.2/tests/unit/test_schema_and_metadata.py +137 -0
  222. operondbs-0.6.2/tests/unit/test_shutdown.py +66 -0
  223. operondbs-0.6.2/tests/unit/test_support_edges.py +202 -0
  224. operondbs-0.6.2/tests/unit/test_table_import_edges.py +210 -0
  225. operondbs-0.6.2/tests/unit/test_taxonomy_edges.py +563 -0
  226. operondbs-0.6.2/tests/unit/test_tools_edges.py +361 -0
  227. operondbs-0.6.2/tests/unit/test_tui.py +817 -0
  228. operondbs-0.6.2/tests/unit/test_tui_config.py +613 -0
  229. operondbs-0.6.2/tests/unit/test_tui_writes.py +844 -0
  230. operondbs-0.6.2/tests/unit/test_views_release_reports_edges.py +166 -0
  231. operondbs-0.6.2/tests/unit/test_workflow_cli.py +242 -0
  232. operondbs-0.6.2/tools/build.py +519 -0
@@ -0,0 +1,48 @@
1
+ name: deploy
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ pytest:
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ os: [ ubuntu-latest, macos-latest ]
13
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
14
+ runs-on: ${{ matrix.os }}
15
+ steps:
16
+ - uses: actions/checkout@v6
17
+ - uses: actions/setup-python@v7
18
+ with:
19
+ python-version: ${{ matrix.python-version }}
20
+ - run: python -m pip install --upgrade pip
21
+ - run: python -m pip install -e '.[test]'
22
+ - run: python -m pytest
23
+ - if: ${{ !cancelled() }}
24
+ uses: codecov/codecov-action@v7
25
+ with:
26
+ token: ${{ secrets.CODECOV_TOKEN }}
27
+ report_type: test_results
28
+
29
+ frozen-release-test:
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ - uses: actions/checkout@v6
33
+ - uses: actions/setup-python@v7
34
+ with:
35
+ python-version: "3.14"
36
+ - run: python -m pip install -e '.[build]'
37
+ - run: python tools/build.py
38
+
39
+ documentation:
40
+ runs-on: ubuntu-latest
41
+ steps:
42
+ - uses: actions/checkout@v6
43
+ - uses: actions/setup-python@v7
44
+ with:
45
+ python-version: "3.12"
46
+ - run: python -m pip install --upgrade pip
47
+ - run: python -m pip install -e '.[docs]'
48
+ - run: sphinx-build -W --keep-going -b html docs docs/_build/html
@@ -0,0 +1,88 @@
1
+ name: publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ source-distribution:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v6
15
+ with:
16
+ persist-credentials: false
17
+ - uses: actions/setup-python@v7
18
+ with:
19
+ python-version: "3.14"
20
+ - name: Verify release tag
21
+ env:
22
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
23
+ run: >-
24
+ python -c "import os, tomllib;
25
+ version = tomllib.load(open('pyproject.toml', 'rb'))['project']['version'];
26
+ expected = f'v{version}'; actual = os.environ['RELEASE_TAG'];
27
+ assert actual == expected, f'release tag {actual!r} does not match {expected!r}'"
28
+ - run: python -m pip install --upgrade build twine
29
+ - run: python -m build --sdist
30
+ - run: python -m twine check dist/*
31
+ - uses: actions/upload-artifact@v5
32
+ with:
33
+ name: python-package-sdist
34
+ path: dist/*.tar.gz
35
+ if-no-files-found: error
36
+
37
+ wheels:
38
+ strategy:
39
+ fail-fast: false
40
+ matrix:
41
+ include:
42
+ - os: ubuntu-latest
43
+ architecture: x86_64
44
+ artifact: linux-x86_64
45
+ - os: macos-15-intel
46
+ architecture: x86_64
47
+ artifact: macos-x86_64
48
+ - os: macos-latest
49
+ architecture: arm64
50
+ artifact: macos-arm64
51
+ runs-on: ${{ matrix.os }}
52
+ steps:
53
+ - uses: actions/checkout@v6
54
+ with:
55
+ persist-credentials: false
56
+ - uses: actions/setup-python@v7
57
+ with:
58
+ python-version: "3.14"
59
+ - run: python -m pip install cibuildwheel==4.2.0
60
+ - run: python -m cibuildwheel --output-dir wheelhouse
61
+ env:
62
+ CIBW_ARCHS: ${{ matrix.architecture }}
63
+ CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-*"
64
+ CIBW_SKIP: "*-musllinux_*"
65
+ CIBW_TEST_COMMAND: >-
66
+ python -c "import operon; import operon.qc_module._parsers;
67
+ print(operon.__version__)" && operon --help
68
+ - uses: actions/upload-artifact@v5
69
+ with:
70
+ name: python-package-wheel-${{ matrix.artifact }}
71
+ path: wheelhouse/*.whl
72
+ if-no-files-found: error
73
+
74
+ pypi-publish:
75
+ needs: [source-distribution, wheels]
76
+ runs-on: ubuntu-latest
77
+ environment:
78
+ name: pypi
79
+ url: https://pypi.org/project/operondbs/
80
+ permissions:
81
+ id-token: write
82
+ steps:
83
+ - uses: actions/download-artifact@v6
84
+ with:
85
+ pattern: python-package-*
86
+ path: dist/
87
+ merge-multiple: true
88
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,28 @@
1
+ .venv/
2
+ .idea/
3
+ build/
4
+ dist/
5
+ __pycache__/
6
+ *.py[cod]
7
+ *.so
8
+ operon/qc_module/_parsers.c
9
+ *.egg-info/
10
+ *.sqlite
11
+ *.sqlite-wal
12
+ *.sqlite-shm
13
+ logs/
14
+ raw/
15
+ standardized/
16
+ qc/
17
+ analysis/
18
+ reports/
19
+ releases/
20
+ examples/
21
+ metadata/*.tsv
22
+ !metadata/README.md
23
+ coverage.xml
24
+ junit.xml
25
+ .coverage
26
+ htmlcov/
27
+ /site/
28
+ /docs/_build/
@@ -0,0 +1,15 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-24.04
5
+ tools:
6
+ python: "3.12"
7
+
8
+ sphinx:
9
+ configuration: docs/conf.py
10
+ builder: html
11
+ fail_on_warning: true
12
+
13
+ python:
14
+ install:
15
+ - requirements: docs/requirements.txt
@@ -0,0 +1,190 @@
1
+ # AGENTS.md
2
+
3
+ Guidance for AI agents and contributors working in this repository.
4
+
5
+ ## Project overview
6
+
7
+ Operon is a Python-based, file-backed database for large-scale genomic data:
8
+ archiving, metadata management, quality control (QC), rule-based decisions,
9
+ deterministic automation, taxonomy coverage auditing, and versioned dataset
10
+ releases. A single SQLite file (`operon.sqlite`) is the sole writable source
11
+ of truth inside each managed project; large sequence files never enter the
12
+ database, only their manifest records, QC metrics, and provenance do.
13
+
14
+ The core design invariants are:
15
+
16
+ 1. Structured metadata is the single source of truth.
17
+ 2. Raw data is immutable; derived data is rebuildable.
18
+ 3. File identity is `file_id + sha256 + size_bytes`, never the path.
19
+ 4. QC tools only measure metrics; decisions come from versioned YAML profiles.
20
+ 5. All processing runs as an explicit, idempotent state machine with
21
+ machine-readable provenance.
22
+
23
+ Keep these invariants intact when changing code. See
24
+ `docs/en/architecture/` (or the mirrored `docs/zh/architecture/`) for the
25
+ principle-to-implementation mapping.
26
+
27
+ Current version markers (must stay consistent across code and docs):
28
+
29
+ - `operon` 0.6.2 (`pyproject.toml`)
30
+ - database schema 2.9 (`operon/database.py`, `SCHEMA_VERSION`)
31
+ - metadata schema 1.4 (`operon/schema.py`, `METADATA_SCHEMA_VERSION`)
32
+
33
+ The project is licensed AGPL-3.0-or-later (`LICENSE` at the repo root).
34
+
35
+ ## Repository layout
36
+
37
+ - `operon/` — the Python package (CLI entry points: `operon/cli.py`,
38
+ `operon/__main__.py`; console script `operon = operon.cli:main`).
39
+ - `operon/adapters/` — external source adapters (currently NCBI Datasets,
40
+ offline-first: JSON/JSONL, ZIP, or unpacked directories, plus optional
41
+ online download).
42
+ - `operon/qc_module/` — streaming FASTA/FASTQ/GFF3/protein parsers and
43
+ built-in QC stages. `parsers.py` is the pure-Python reference
44
+ implementation; `_parsers.pyx` is the Cython-accelerated build of the
45
+ same API (compiled in place as `operon.qc_module._parsers`). The Cython
46
+ module is the required production backend; the pure-Python module is the
47
+ behavioral reference used by regression tests. Both must produce
48
+ identical metrics and error messages (enforced by
49
+ `tests/regression/test_cython_parser_parity.py`).
50
+ - `operon/execution.py` — execution backends for external commands:
51
+ `local` subprocess, `slurm` (sbatch submit + squeue poll), and `ssh`
52
+ (Paramiko; HPC head nodes and cloud VMs, optionally through remote
53
+ Slurm). All backends share one provenance contract.
54
+ - `operon/remotes.py` — SFTP remote storage mirrors (push/pull with
55
+ checksum verification) and `sftp://` / `remote://` URL fetching.
56
+ - `operon/tui/` — Textual-based terminal UI (`operon tui`, optional `tui`
57
+ extra): Home dashboard, Entities browser, Files browser, workflow-run
58
+ monitor, a Decisions screen, and a Config screen. Read access lives in
59
+ `operon/tui/data.py` and is strictly read-only (short-lived read-only
60
+ connections only). Phase 2 write operations (evaluate, curate,
61
+ retire/restore, ingest, verify, QC batch) live in
62
+ `operon/tui/actions.py`: each function opens its own short-lived
63
+ *writable* `Database`, calls the same core functions as the CLI
64
+ (identical `changes`/`workflow_runs` provenance), and returns plain
65
+ dicts; writable connections are never held by the UI. Every write in the
66
+ UI follows form/plan preview → equivalent CLI command shown → explicit
67
+ Confirm → background worker → notify + reload or inline error. The
68
+ Config screen (`operon/tui/screens/config.py`, nav key `6`) edits
69
+ `config/profiles/*.yaml` (kind `qc`) and single recipes inside
70
+ `config/tools.yaml` through structured control-based forms (no free-text
71
+ YAML): every save bumps the `version`, records the same content-addressed
72
+ snapshot the CLI records (`qc_profiles` / `recipe_snapshots`), and
73
+ restores the previous file bytes on failure; keys the forms do not model
74
+ are preserved verbatim; history modals restore snapshots into the editor
75
+ as the next version; tools-check runs in a worker with per-row updates.
76
+ Textual is imported only inside this package, which the `tui` command
77
+ handler imports lazily.
78
+ - Other top-level modules by responsibility: `database.py` (SQLite schema
79
+ and migrations), `schema.py` (YAML metadata schema and validation),
80
+ `config.py` (project configuration and directory layout), `files.py`
81
+ (immutable manifest archival and verification), `profiles.py` +
82
+ `rules.py` (versioned QC profiles and the decision engine),
83
+ `workflow.py` (state machine and run logs), `tools.py` (external-tool
84
+ recipes from `config/tools.yaml`), `taxonomy.py` + `coverage.py` (frozen
85
+ NCBI Taxonomy snapshots and coverage denominators), `release.py` +
86
+ `export.py` (immutable releases and selective exports), `lifecycle.py`
87
+ (audited reversible entity retirement), `lineage.py` (adopting external
88
+ workflow outputs), `backup.py`, `reports.py`, `table_import.py`,
89
+ `import_wizard.py`, `entity_view.py`, `environment.py`
90
+ (execution-environment capture), `shutdown.py` (graceful SIGINT/SIGTERM
91
+ handling), `ncbi_reconcile.py` (development-era adapter anomaly repair),
92
+ `demo.py` (deterministic synthetic demo project), `errors.py`,
93
+ `utils.py`.
94
+ - `tests/` — pytest suite organized as `unit/`, `integration/`,
95
+ `regression/`, `compatibility/`, with shared fixtures in
96
+ `tests/helpers.py`.
97
+ - `docs/` — Sphinx documentation in two mirrored language trees, `docs/en/`
98
+ and `docs/zh/`, each split into `overview.md`, `getting-started/`,
99
+ `guides/`, `architecture/`, `reference/`, `operations/`, and
100
+ `contributor/`. Built with `docs/conf.py`; published via Read the Docs
101
+ (`.readthedocs.yaml`).
102
+ - `benchmarks/` — representative entity sets for QC performance diagnostics
103
+ (see `docs/*/operations/qc-performance.md`).
104
+ - `tools/build.py` — the only standalone-application release entry point.
105
+ - `build/release/v<version>/` — generated cx_Freeze application releases,
106
+ including third-party licenses and corresponding source.
107
+
108
+ ## Setup, test, and build
109
+
110
+ Always work inside the project virtual environment (`.venv/` exists in the
111
+ repo root; activate it or invoke `.venv/bin/python` explicitly).
112
+
113
+ ```bash
114
+ python3 -m venv .venv && source .venv/bin/activate
115
+ python -m pip install -e '.[dev]' # runtime + pytest + cx_Freeze + Cython +
116
+ # Sphinx; also compiles the qc parsers
117
+ # extension
118
+
119
+ python -m pytest # full suite (coverage gate: 90% branch)
120
+ python -m pytest tests/unit # by category: unit / integration /
121
+ # regression / compatibility
122
+
123
+ python setup.py build_ext --inplace # rebuild only the Cython extension
124
+
125
+ sphinx-build -W --keep-going -b html docs docs/_build/html # strict docs build
126
+
127
+ python tools/build.py # complete standalone release -> build/release/v<version>/
128
+ ```
129
+
130
+ Run the relevant test category after any change; run the full suite before
131
+ considering work done. CI (`.github/workflows/deploy.yml`) runs pytest on
132
+ Python 3.10–3.14, the frozen release build, and the strict Sphinx build.
133
+
134
+ `tools/build.py` compiles the Cython parser, builds the Sphinx documentation
135
+ strictly, collects third-party license texts, builds the
136
+ corresponding-source sdist, freezes the application, assembles the versioned
137
+ directory, and runs the frozen executable smoke test. Do not call cx_Freeze
138
+ directly for a release bundle.
139
+
140
+ Do not commit or perform other git mutations unless the user explicitly
141
+ asks.
142
+
143
+ ## Conventions
144
+
145
+ - Python 3.10+. Treat `pyproject.toml` as the authoritative dependency
146
+ list: `[project.dependencies]` contains core runtime dependencies, while
147
+ `[project.optional-dependencies]` contains separately installable extras
148
+ (`test`, `build`, `remote`, `tui`, `docs`, `dev`). Runtime-feature extras must
149
+ remain lazy-imported by their feature paths (e.g. Paramiko is only
150
+ imported inside remote/SSH code); test/build extras must stay out of
151
+ normal runtime paths. Do not promote an extra dependency to core, or add a
152
+ new core runtime dependency, unless the user explicitly authorizes that
153
+ dependency. Approval for one dependency does not authorize others unless
154
+ the user grants a broader allowance. Merely informing the user is not
155
+ authorization; new optional dependencies must still be surfaced and kept
156
+ in the narrowest appropriate extra.
157
+ - Documentation language: `docs/` is maintained in parallel English
158
+ (`docs/en/`) and Chinese (`docs/zh/`) trees — keep both in sync;
159
+ `README.md` is English and `README_ZH.md` is Chinese. Code, comments,
160
+ docstrings, and commit messages are in English.
161
+ - Naming in prose: headings use the stylized `Operon`; body text refers to
162
+ the tool as `` `operon` `` (code-formatted).
163
+ - Never hard-code thresholds in QC code — they belong in versioned YAML
164
+ profiles (under `config/profiles/` inside each managed project).
165
+ - Never silently overwrite archived files: same entity + role with different
166
+ bytes must raise `ConflictError`; identical bytes must be idempotent.
167
+ - Manual overrides (e.g. `curate`, forced `set-state`) must always be
168
+ recorded in the `changes` audit table.
169
+ - `docs/*/operations/database-compatibility.md` lists migration code that
170
+ exists only for pre-1.0 databases and is scheduled for removal at the 1.0
171
+ release; check it before touching `operon/database.py` migrations or the
172
+ NCBI adapter's schema-upgrade path.
173
+
174
+ ## Documentation sync
175
+
176
+ When you change behavior, CLI surface, configuration fields, or storage
177
+ layout, update both language trees (`docs/en/` and `docs/zh/`) in the same
178
+ change:
179
+
180
+ - CLI commands/flags → `docs/*/reference/cli-*.md`
181
+ - Task-level workflows → `docs/*/guides/` and `docs/*/getting-started/`
182
+ - Architecture, data model, state machine, guarantees → `docs/*/architecture/`
183
+ - `tools.yaml` recipes/placeholders/parsers → `docs/*/reference/recipe-*.md`
184
+ - Migrations, performance diagnostics, compatibility boundaries →
185
+ `docs/*/operations/`
186
+ - Contributor-facing processes → `docs/*/contributor/`; navigation →
187
+ `docs/*/index.md`
188
+
189
+ Version markers in docs (`operon` 0.6.2, database schema 2.9, metadata
190
+ schema 1.4) must match `pyproject.toml` and the code.