quantum-atlas 0.2.3__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.
- quantum_atlas-0.2.3/.env.example +225 -0
- quantum_atlas-0.2.3/.github/workflows/go.yml +77 -0
- quantum_atlas-0.2.3/.github/workflows/nightly.yml +65 -0
- quantum_atlas-0.2.3/.github/workflows/pytest.yml +50 -0
- quantum_atlas-0.2.3/.github/workflows/release.yml +320 -0
- quantum_atlas-0.2.3/.gitignore +271 -0
- quantum_atlas-0.2.3/CHANGELOG.md +101 -0
- quantum_atlas-0.2.3/LICENSE +201 -0
- quantum_atlas-0.2.3/PKG-INFO +241 -0
- quantum_atlas-0.2.3/README.md +204 -0
- quantum_atlas-0.2.3/atlas/__init__.py +35 -0
- quantum_atlas-0.2.3/atlas/cli.py +168 -0
- quantum_atlas-0.2.3/atlas/client/__init__.py +1 -0
- quantum_atlas-0.2.3/atlas/client/__main__.py +210 -0
- quantum_atlas-0.2.3/atlas/client/_common.py +139 -0
- quantum_atlas-0.2.3/atlas/client/auth.py +431 -0
- quantum_atlas-0.2.3/atlas/client/mineru.py +408 -0
- quantum_atlas-0.2.3/atlas/client/upload.py +240 -0
- quantum_atlas-0.2.3/atlas/codegen/__init__.py +45 -0
- quantum_atlas-0.2.3/atlas/codegen/__main__.py +165 -0
- quantum_atlas-0.2.3/atlas/codegen/formatter.py +275 -0
- quantum_atlas-0.2.3/atlas/codegen/generator.py +229 -0
- quantum_atlas-0.2.3/atlas/codegen/qiskit_generator.py +213 -0
- quantum_atlas-0.2.3/atlas/codegen/qpanda_generator.py +213 -0
- quantum_atlas-0.2.3/atlas/codegen/template_engine.py +170 -0
- quantum_atlas-0.2.3/atlas/codegen/templates/qiskit_template.py.j2 +88 -0
- quantum_atlas-0.2.3/atlas/codegen/templates/qpanda_template.py.j2 +78 -0
- quantum_atlas-0.2.3/atlas/designer/__init__.py +47 -0
- quantum_atlas-0.2.3/atlas/designer/__main__.py +292 -0
- quantum_atlas-0.2.3/atlas/designer/designer.py +495 -0
- quantum_atlas-0.2.3/atlas/designer/optimizer.py +464 -0
- quantum_atlas-0.2.3/atlas/designer/parameter_mapper.py +401 -0
- quantum_atlas-0.2.3/atlas/designer/primitive_composer.py +469 -0
- quantum_atlas-0.2.3/atlas/designer/primitive_loader.py +276 -0
- quantum_atlas-0.2.3/atlas/designer/quantum_circuit.py +519 -0
- quantum_atlas-0.2.3/atlas/designer/quantum_ir.py +320 -0
- quantum_atlas-0.2.3/atlas/estimator/__init__.py +41 -0
- quantum_atlas-0.2.3/atlas/estimator/__main__.py +261 -0
- quantum_atlas-0.2.3/atlas/estimator/estimator.py +309 -0
- quantum_atlas-0.2.3/atlas/estimator/report_generator.py +380 -0
- quantum_atlas-0.2.3/atlas/estimator/resource_analyzer.py +353 -0
- quantum_atlas-0.2.3/atlas/extractor/__init__.py +36 -0
- quantum_atlas-0.2.3/atlas/extractor/__main__.py +349 -0
- quantum_atlas-0.2.3/atlas/extractor/algorithm_ir.py +174 -0
- quantum_atlas-0.2.3/atlas/extractor/extractor.py +226 -0
- quantum_atlas-0.2.3/atlas/extractor/llm_interface.py +661 -0
- quantum_atlas-0.2.3/atlas/knowledge/__init__.py +16 -0
- quantum_atlas-0.2.3/atlas/knowledge/models.py +128 -0
- quantum_atlas-0.2.3/atlas/knowledge/neo4j_client.py +264 -0
- quantum_atlas-0.2.3/atlas/knowledge_graph/__init__.py +16 -0
- quantum_atlas-0.2.3/atlas/knowledge_graph/primitives/__init__.py +16 -0
- quantum_atlas-0.2.3/atlas/knowledge_graph/primitives/amplitude_amplification.yaml +34 -0
- quantum_atlas-0.2.3/atlas/knowledge_graph/primitives/block_encoding.yaml +29 -0
- quantum_atlas-0.2.3/atlas/knowledge_graph/primitives/hamiltonian_simulation.yaml +36 -0
- quantum_atlas-0.2.3/atlas/knowledge_graph/primitives/qft.yaml +31 -0
- quantum_atlas-0.2.3/atlas/knowledge_graph/primitives/qpe.yaml +32 -0
- quantum_atlas-0.2.3/atlas/knowledge_graph/primitives/quantum_walk.yaml +34 -0
- quantum_atlas-0.2.3/atlas/knowledge_graph/primitives/variational_circuit.yaml +38 -0
- quantum_atlas-0.2.3/atlas/knowledge_graph/schemas/__init__.py +16 -0
- quantum_atlas-0.2.3/atlas/knowledge_graph/schemas/nodes.py +87 -0
- quantum_atlas-0.2.3/atlas/knowledge_graph/schemas/relationships.py +92 -0
- quantum_atlas-0.2.3/atlas/paper_assets.py +206 -0
- quantum_atlas-0.2.3/atlas/parser/__init__.py +16 -0
- quantum_atlas-0.2.3/atlas/parser/__main__.py +236 -0
- quantum_atlas-0.2.3/atlas/parser/arxiv_fetcher.py +242 -0
- quantum_atlas-0.2.3/atlas/parser/mineru_client.py +122 -0
- quantum_atlas-0.2.3/atlas/parser/pdf_parser.py +307 -0
- quantum_atlas-0.2.3/atlas/server/__init__.py +25 -0
- quantum_atlas-0.2.3/atlas/server/__main__.py +7 -0
- quantum_atlas-0.2.3/atlas/server/config.py +226 -0
- quantum_atlas-0.2.3/atlas/server/main.py +143 -0
- quantum_atlas-0.2.3/atlas/server/routers/__init__.py +12 -0
- quantum_atlas-0.2.3/atlas/server/routers/api.py +2104 -0
- quantum_atlas-0.2.3/atlas/server/routers/downloads.py +147 -0
- quantum_atlas-0.2.3/atlas/server/routers/shares.py +328 -0
- quantum_atlas-0.2.3/atlas/server/service.py +424 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/MetricGrid-TNhAVqu9.js +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/PageHeader-Blcd8xWN.js +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/PageListItem-DDbBOniU.js +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/Panel-nEwT3N9R.js +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/StatusBlock-C6kqip7j.js +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/git-branch-CvbCW-xn.js +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/graph.index-BEn5q3PI.js +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/graph.node._-DJEgbSld.js +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/index-B6ZtsPTl.js +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/index-BUkeT4SV.css +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/index-C85i9If6.js +10 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/layers-3-eMZBNPIE.js +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/queries-DJ-Teqp8.js +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/token-DFsuZF75.js +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/utils-IcUtUVxz.js +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/wiki.index-BxzRRftC.js +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/wiki.page._-Qzytrnms.js +65 -0
- quantum_atlas-0.2.3/atlas/server/static/web/assets/wiki.search-B17nyWx0.js +1 -0
- quantum_atlas-0.2.3/atlas/server/static/web/index.html +13 -0
- quantum_atlas-0.2.3/atlas/server/tasks.py +156 -0
- quantum_atlas-0.2.3/atlas/validator/__init__.py +47 -0
- quantum_atlas-0.2.3/atlas/validator/__main__.py +292 -0
- quantum_atlas-0.2.3/atlas/validator/equivalence_checker.py +458 -0
- quantum_atlas-0.2.3/atlas/validator/reference_comparison.py +440 -0
- quantum_atlas-0.2.3/atlas/validator/test_framework.py +496 -0
- quantum_atlas-0.2.3/atlas/validator/validator.py +539 -0
- quantum_atlas-0.2.3/atlas/wiki/__init__.py +27 -0
- quantum_atlas-0.2.3/atlas/wiki/__main__.py +368 -0
- quantum_atlas-0.2.3/atlas/wiki/engine.py +632 -0
- quantum_atlas-0.2.3/atlas/wiki/ingester.py +403 -0
- quantum_atlas-0.2.3/atlas/wiki/linter.py +373 -0
- quantum_atlas-0.2.3/atlas/wiki/page.py +313 -0
- quantum_atlas-0.2.3/atlas/wiki/querier.py +345 -0
- quantum_atlas-0.2.3/atlas/wiki/sync/__init__.py +19 -0
- quantum_atlas-0.2.3/atlas/wiki/sync/neo4j_sync.py +416 -0
- quantum_atlas-0.2.3/atlas/wiki/templates.py +529 -0
- quantum_atlas-0.2.3/cmd/qatlas-server/install-server.sh +346 -0
- quantum_atlas-0.2.3/cmd/qatlas-server/main.go +538 -0
- quantum_atlas-0.2.3/cmd/qatlas-server/pat_cmd.go +409 -0
- quantum_atlas-0.2.3/cmd/qatlas-server/pat_cmd_test.go +452 -0
- quantum_atlas-0.2.3/cmd/qatlas-server/service_cmd.go +632 -0
- quantum_atlas-0.2.3/cmd/qatlas-server/service_cmd_test.go +362 -0
- quantum_atlas-0.2.3/cmd/qatlas-server/service_template.go +121 -0
- quantum_atlas-0.2.3/cmd/qatlas-server/sqlite_tuning.go +136 -0
- quantum_atlas-0.2.3/cmd/qatlas-server/storage_cmd.go +366 -0
- quantum_atlas-0.2.3/cmd/qatlas-server/storage_cmd_test.go +227 -0
- quantum_atlas-0.2.3/docs/architecture.md +272 -0
- quantum_atlas-0.2.3/docs/contribution-workflow.md +323 -0
- quantum_atlas-0.2.3/docs/deployment.md +594 -0
- quantum_atlas-0.2.3/docs/development.md +414 -0
- quantum_atlas-0.2.3/docs/graph-visualization-research.md +93 -0
- quantum_atlas-0.2.3/docs/migration-storage-layout.md +167 -0
- quantum_atlas-0.2.3/docs/python-legacy.md +127 -0
- quantum_atlas-0.2.3/docs/storage-design.md +662 -0
- quantum_atlas-0.2.3/docs/storage-rustfs.md +383 -0
- quantum_atlas-0.2.3/docs/upload-api.md +282 -0
- quantum_atlas-0.2.3/docs/wiki-conventions.md +516 -0
- quantum_atlas-0.2.3/examples/demo_pipeline.py +301 -0
- quantum_atlas-0.2.3/go.mod +62 -0
- quantum_atlas-0.2.3/go.sum +185 -0
- quantum_atlas-0.2.3/internal/auth/oauth.go +275 -0
- quantum_atlas-0.2.3/internal/auth/oauth_test.go +57 -0
- quantum_atlas-0.2.3/internal/config/config.go +336 -0
- quantum_atlas-0.2.3/internal/config/config_test.go +401 -0
- quantum_atlas-0.2.3/internal/healthz/healthz.go +305 -0
- quantum_atlas-0.2.3/internal/mineruclaim/claim.go +218 -0
- quantum_atlas-0.2.3/internal/neo4j/client.go +268 -0
- quantum_atlas-0.2.3/internal/objstore/local.go +431 -0
- quantum_atlas-0.2.3/internal/objstore/local_test.go +358 -0
- quantum_atlas-0.2.3/internal/objstore/s3.go +568 -0
- quantum_atlas-0.2.3/internal/objstore/s3_dual_test.go +75 -0
- quantum_atlas-0.2.3/internal/objstore/s3_test.go +507 -0
- quantum_atlas-0.2.3/internal/objstore/store.go +217 -0
- quantum_atlas-0.2.3/internal/paperassets/fs.go +22 -0
- quantum_atlas-0.2.3/internal/paperassets/key_test.go +69 -0
- quantum_atlas-0.2.3/internal/paperassets/path.go +352 -0
- quantum_atlas-0.2.3/internal/paperassets/resolve_store.go +260 -0
- quantum_atlas-0.2.3/internal/paperassets/resolve_store_test.go +141 -0
- quantum_atlas-0.2.3/internal/pat/cache.go +301 -0
- quantum_atlas-0.2.3/internal/pat/cache_test.go +180 -0
- quantum_atlas-0.2.3/internal/pat/migrations.go +178 -0
- quantum_atlas-0.2.3/internal/pat/pat.go +339 -0
- quantum_atlas-0.2.3/internal/pat/pat_test.go +204 -0
- quantum_atlas-0.2.3/internal/pat/ratelimits.go +119 -0
- quantum_atlas-0.2.3/internal/pat/ratelimits_test.go +138 -0
- quantum_atlas-0.2.3/internal/pat/scopes.go +176 -0
- quantum_atlas-0.2.3/internal/pat/scopes_test.go +148 -0
- quantum_atlas-0.2.3/internal/routes/auth.go +180 -0
- quantum_atlas-0.2.3/internal/routes/auth_test.go +156 -0
- quantum_atlas-0.2.3/internal/routes/graph.go +124 -0
- quantum_atlas-0.2.3/internal/routes/papers.go +926 -0
- quantum_atlas-0.2.3/internal/routes/papers_upload_concurrent_test.go +286 -0
- quantum_atlas-0.2.3/internal/routes/papers_upload_test.go +400 -0
- quantum_atlas-0.2.3/internal/routes/pat.go +354 -0
- quantum_atlas-0.2.3/internal/routes/pat_markused_test.go +132 -0
- quantum_atlas-0.2.3/internal/routes/pat_test.go +405 -0
- quantum_atlas-0.2.3/internal/routes/scope_guard.go +68 -0
- quantum_atlas-0.2.3/internal/routes/shares.go +337 -0
- quantum_atlas-0.2.3/internal/routes/stagedupload.go +348 -0
- quantum_atlas-0.2.3/internal/routes/stagedupload_test.go +238 -0
- quantum_atlas-0.2.3/internal/routes/wiki.go +242 -0
- quantum_atlas-0.2.3/internal/safego/safego.go +117 -0
- quantum_atlas-0.2.3/internal/safego/safego_test.go +75 -0
- quantum_atlas-0.2.3/internal/shares/record.go +194 -0
- quantum_atlas-0.2.3/internal/shares/store.go +243 -0
- quantum_atlas-0.2.3/internal/wiki/git.go +211 -0
- quantum_atlas-0.2.3/internal/wiki/page.go +446 -0
- quantum_atlas-0.2.3/pixi.lock +1213 -0
- quantum_atlas-0.2.3/pyproject.toml +196 -0
- quantum_atlas-0.2.3/scripts/init_primitives.py +85 -0
- quantum_atlas-0.2.3/scripts/migrate_to_wiki.py +348 -0
- quantum_atlas-0.2.3/scripts/rustfs_bootstrap.sh +163 -0
- quantum_atlas-0.2.3/scripts/verify_neo4j.py +51 -0
- quantum_atlas-0.2.3/tests/__init__.py +1 -0
- quantum_atlas-0.2.3/tests/codegen/__init__.py +1 -0
- quantum_atlas-0.2.3/tests/codegen/test_cli.py +343 -0
- quantum_atlas-0.2.3/tests/codegen/test_formatter.py +255 -0
- quantum_atlas-0.2.3/tests/codegen/test_generator.py +320 -0
- quantum_atlas-0.2.3/tests/codegen/test_qiskit_generator.py +217 -0
- quantum_atlas-0.2.3/tests/codegen/test_qpanda_generator.py +188 -0
- quantum_atlas-0.2.3/tests/codegen/test_template_engine.py +146 -0
- quantum_atlas-0.2.3/tests/conftest.py +79 -0
- quantum_atlas-0.2.3/tests/designer/__init__.py +1 -0
- quantum_atlas-0.2.3/tests/designer/test_designer.py +283 -0
- quantum_atlas-0.2.3/tests/designer/test_optimizer.py +176 -0
- quantum_atlas-0.2.3/tests/designer/test_primitive_composer.py +183 -0
- quantum_atlas-0.2.3/tests/designer/test_quantum_circuit.py +241 -0
- quantum_atlas-0.2.3/tests/estimator/__init__.py +3 -0
- quantum_atlas-0.2.3/tests/estimator/test_estimator.py +382 -0
- quantum_atlas-0.2.3/tests/estimator/test_report_generator.py +391 -0
- quantum_atlas-0.2.3/tests/estimator/test_resource_analyzer.py +261 -0
- quantum_atlas-0.2.3/tests/extractor/__init__.py +1 -0
- quantum_atlas-0.2.3/tests/extractor/test_algorithm_ir.py +171 -0
- quantum_atlas-0.2.3/tests/extractor/test_llm_interface.py +296 -0
- quantum_atlas-0.2.3/tests/integration/__init__.py +1 -0
- quantum_atlas-0.2.3/tests/integration/test_e2e_pipeline.py +383 -0
- quantum_atlas-0.2.3/tests/integration/test_live_server_paper_flow.py +175 -0
- quantum_atlas-0.2.3/tests/integration/test_production_smoke.py +397 -0
- quantum_atlas-0.2.3/tests/integration/test_user_env_ingest_flow.py +254 -0
- quantum_atlas-0.2.3/tests/knowledge/__init__.py +1 -0
- quantum_atlas-0.2.3/tests/knowledge/test_models.py +97 -0
- quantum_atlas-0.2.3/tests/parser/__init__.py +1 -0
- quantum_atlas-0.2.3/tests/parser/test_arxiv_fetcher.py +217 -0
- quantum_atlas-0.2.3/tests/parser/test_pdf_parser.py +106 -0
- quantum_atlas-0.2.3/tests/server/__init__.py +1 -0
- quantum_atlas-0.2.3/tests/server/test_ingest_audit_log.py +57 -0
- quantum_atlas-0.2.3/tests/server/test_ingest_pipeline.py +375 -0
- quantum_atlas-0.2.3/tests/server/test_mineru_claims.py +227 -0
- quantum_atlas-0.2.3/tests/server/test_paper_assets.py +211 -0
- quantum_atlas-0.2.3/tests/server/test_paper_uploads.py +189 -0
- quantum_atlas-0.2.3/tests/server/test_server.py +439 -0
- quantum_atlas-0.2.3/tests/server/test_server_config_env.py +230 -0
- quantum_atlas-0.2.3/tests/server/test_service_installer.py +143 -0
- quantum_atlas-0.2.3/tests/test_cli.py +270 -0
- quantum_atlas-0.2.3/tests/test_client_auth.py +306 -0
- quantum_atlas-0.2.3/tests/test_client_common.py +159 -0
- quantum_atlas-0.2.3/tests/test_paper_assets_ids.py +25 -0
- quantum_atlas-0.2.3/tests/validator/__init__.py +1 -0
- quantum_atlas-0.2.3/tests/validator/test_equivalence_checker.py +430 -0
- quantum_atlas-0.2.3/tests/validator/test_reference_comparison.py +348 -0
- quantum_atlas-0.2.3/tests/validator/test_test_framework.py +528 -0
- quantum_atlas-0.2.3/tests/validator/test_validator.py +570 -0
- quantum_atlas-0.2.3/tests/wiki/__init__.py +8 -0
- quantum_atlas-0.2.3/tests/wiki/test_engine.py +423 -0
- quantum_atlas-0.2.3/tests/wiki/test_linter.py +243 -0
- quantum_atlas-0.2.3/tests/wiki/test_page.py +196 -0
- quantum_atlas-0.2.3/uv.lock +1365 -0
- quantum_atlas-0.2.3/web/.gitignore +24 -0
- quantum_atlas-0.2.3/web/README.md +132 -0
- quantum_atlas-0.2.3/web/components.json +21 -0
- quantum_atlas-0.2.3/web/embed.go +41 -0
- quantum_atlas-0.2.3/web/eslint.config.js +28 -0
- quantum_atlas-0.2.3/web/index.html +12 -0
- quantum_atlas-0.2.3/web/package-lock.json +7094 -0
- quantum_atlas-0.2.3/web/package.json +52 -0
- quantum_atlas-0.2.3/web/src/components/language-switcher.tsx +64 -0
- quantum_atlas-0.2.3/web/src/components/metric-grid.tsx +126 -0
- quantum_atlas-0.2.3/web/src/components/page-card.tsx +38 -0
- quantum_atlas-0.2.3/web/src/components/page-header.tsx +25 -0
- quantum_atlas-0.2.3/web/src/components/page-list-item.tsx +28 -0
- quantum_atlas-0.2.3/web/src/components/panel.tsx +49 -0
- quantum_atlas-0.2.3/web/src/components/sidebar.tsx +104 -0
- quantum_atlas-0.2.3/web/src/components/status-block.tsx +54 -0
- quantum_atlas-0.2.3/web/src/components/theme-provider.tsx +29 -0
- quantum_atlas-0.2.3/web/src/components/theme-toggle.tsx +38 -0
- quantum_atlas-0.2.3/web/src/components/topbar.tsx +160 -0
- quantum_atlas-0.2.3/web/src/components/ui/alert.tsx +66 -0
- quantum_atlas-0.2.3/web/src/components/ui/badge.tsx +48 -0
- quantum_atlas-0.2.3/web/src/components/ui/button.tsx +64 -0
- quantum_atlas-0.2.3/web/src/components/ui/card.tsx +92 -0
- quantum_atlas-0.2.3/web/src/components/ui/dialog.tsx +158 -0
- quantum_atlas-0.2.3/web/src/components/ui/dropdown-menu.tsx +255 -0
- quantum_atlas-0.2.3/web/src/components/ui/input.tsx +21 -0
- quantum_atlas-0.2.3/web/src/components/ui/label.tsx +22 -0
- quantum_atlas-0.2.3/web/src/components/ui/scroll-area.tsx +58 -0
- quantum_atlas-0.2.3/web/src/components/ui/select.tsx +190 -0
- quantum_atlas-0.2.3/web/src/components/ui/separator.tsx +28 -0
- quantum_atlas-0.2.3/web/src/components/ui/sheet.tsx +143 -0
- quantum_atlas-0.2.3/web/src/components/ui/skeleton.tsx +13 -0
- quantum_atlas-0.2.3/web/src/components/ui/sonner.tsx +38 -0
- quantum_atlas-0.2.3/web/src/components/ui/tabs.tsx +89 -0
- quantum_atlas-0.2.3/web/src/components/ui/textarea.tsx +18 -0
- quantum_atlas-0.2.3/web/src/components/ui/tooltip.tsx +55 -0
- quantum_atlas-0.2.3/web/src/hooks/use-lang.ts +15 -0
- quantum_atlas-0.2.3/web/src/i18n/index.ts +50 -0
- quantum_atlas-0.2.3/web/src/i18n/locales/en.json +189 -0
- quantum_atlas-0.2.3/web/src/i18n/locales/zh.json +189 -0
- quantum_atlas-0.2.3/web/src/index.css +193 -0
- quantum_atlas-0.2.3/web/src/lib/api.ts +77 -0
- quantum_atlas-0.2.3/web/src/lib/auth.ts +191 -0
- quantum_atlas-0.2.3/web/src/lib/pb.ts +18 -0
- quantum_atlas-0.2.3/web/src/lib/queries.ts +47 -0
- quantum_atlas-0.2.3/web/src/lib/utils.ts +24 -0
- quantum_atlas-0.2.3/web/src/main.tsx +44 -0
- quantum_atlas-0.2.3/web/src/routeTree.gen.ts +300 -0
- quantum_atlas-0.2.3/web/src/routes/$lang.graph.index.tsx +82 -0
- quantum_atlas-0.2.3/web/src/routes/$lang.graph.node.$.tsx +31 -0
- quantum_atlas-0.2.3/web/src/routes/$lang.index.tsx +127 -0
- quantum_atlas-0.2.3/web/src/routes/$lang.pat.tsx +463 -0
- quantum_atlas-0.2.3/web/src/routes/$lang.token.tsx +165 -0
- quantum_atlas-0.2.3/web/src/routes/$lang.tsx +52 -0
- quantum_atlas-0.2.3/web/src/routes/$lang.wiki.index.tsx +64 -0
- quantum_atlas-0.2.3/web/src/routes/$lang.wiki.page.$.tsx +62 -0
- quantum_atlas-0.2.3/web/src/routes/$lang.wiki.search.tsx +111 -0
- quantum_atlas-0.2.3/web/src/routes/__root.tsx +70 -0
- quantum_atlas-0.2.3/web/src/routes/auth.callback.tsx +117 -0
- quantum_atlas-0.2.3/web/src/routes/index.tsx +30 -0
- quantum_atlas-0.2.3/web/src/routes/login.tsx +99 -0
- quantum_atlas-0.2.3/web/src/vite-env.d.ts +1 -0
- quantum_atlas-0.2.3/web/tsconfig.app.json +32 -0
- quantum_atlas-0.2.3/web/tsconfig.json +13 -0
- quantum_atlas-0.2.3/web/tsconfig.node.json +25 -0
- quantum_atlas-0.2.3/web/vite.config.ts +33 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# QuantumAtlas 环境变量覆盖模板
|
|
2
|
+
#
|
|
3
|
+
# 复制本文件为 .env,然后只取消注释你明确想覆盖的变量。
|
|
4
|
+
# 保持注释时,Go server 的 internal/config/config.go 会使用代码内置的
|
|
5
|
+
# 本地开发默认值(旧 Python server 的 atlas/server/config.py 仍可参考,
|
|
6
|
+
# 但已不是生产路径)。
|
|
7
|
+
#
|
|
8
|
+
# 不要提交真实 .env。token、API key、公网 URL 都应视为部署环境专属配置或密钥。
|
|
9
|
+
#
|
|
10
|
+
# ─── 命名规范 ─────────────────────────────────────────────────────────────
|
|
11
|
+
# 项目自有变量统一加 `QATLAS_` 前缀,避免与系统 / 其他工具变量冲突。
|
|
12
|
+
# 旧名(无前缀)仍作为 alias 保留,新代码请用 QATLAS_*。
|
|
13
|
+
#
|
|
14
|
+
# 第三方 / SDK 标准名不加前缀(业界生态已认这些名字,强行包就破坏复用):
|
|
15
|
+
# - NEO4J_URI / NEO4J_USER / NEO4J_PASSWORD — Neo4j 官方驱动认这些
|
|
16
|
+
# - OPENAI_API_KEY / ANTHROPIC_API_KEY — LLM SDK 默认读
|
|
17
|
+
# - MINERU_* — MinerU 厂家 token 可跨工具共用
|
|
18
|
+
# ──────────────────────────────────────────────────────────────────────────
|
|
19
|
+
#
|
|
20
|
+
# ─── 字段分类(client / server) ───────────────────────────────────────────
|
|
21
|
+
# 同一份 .env 既给本机 client(qatlas 子命令)用,也给 server 用。按角色取舍:
|
|
22
|
+
#
|
|
23
|
+
# ▸ 纯 client(不跑 server,所有调用走 QATLAS_SERVER_URL 指向远端):
|
|
24
|
+
# 必填:QATLAS_SERVER_URL
|
|
25
|
+
# 可选:QATLAS_INSECURE — 远端使用自签证书时设 1 跳过 TLS 校验
|
|
26
|
+
# QATLAS_WIKI_DIR — `qatlas wiki list/show/search/lint` 都在本地
|
|
27
|
+
# git clone 的 wiki repo 上跑,跟 server 无关
|
|
28
|
+
# MINERU_API_TOKEN — 只在本地跑 `qatlas mineru` 自费走自己配额时填
|
|
29
|
+
# QATLAS_TOKEN — 写操作 (upload-pdf / upload-markdown /
|
|
30
|
+
# mineru-claim / 创建 share) 需要的 bearer
|
|
31
|
+
# token,从 https://<server>/token 拷过来;
|
|
32
|
+
# 也可以用 `--token` 命令行覆盖
|
|
33
|
+
# 不要写:QATLAS_SERVER_HOST/PORT、QATLAS_RAW_DIR、QATLAS_DATA_DIR、
|
|
34
|
+
# NEO4J_*、QATLAS_SHARE_*、QATLAS_USER_HEADER。
|
|
35
|
+
# client 上传 PDF 走 `--pdf <任意路径>`,不读 RAW_DIR;
|
|
36
|
+
# client 不监听端口,不连 Neo4j。
|
|
37
|
+
#
|
|
38
|
+
# ▸ server(本机自己跑 `qatlas server`):上面所有字段按需配置。
|
|
39
|
+
# ──────────────────────────────────────────────────────────────────────────
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# ============================================================================
|
|
43
|
+
# Client 侧(也允许 server 使用)
|
|
44
|
+
# ============================================================================
|
|
45
|
+
|
|
46
|
+
# API、share 链接和外部解析器使用的对外根地址。
|
|
47
|
+
# 纯 client 必填,指向远端服务(如 https://quantum-atlas.ai);
|
|
48
|
+
# server 自跑时也用来生成 share URL。
|
|
49
|
+
# alias: PUBLIC_BASE_URL
|
|
50
|
+
# QATLAS_SERVER_URL=https://atlas.example.com
|
|
51
|
+
|
|
52
|
+
# 跳过 TLS 证书校验。等价于客户端 CLI 加 `--insecure`。
|
|
53
|
+
# 仅在 QATLAS_SERVER_URL 是自签 HTTPS(如开发环境 Caddy `tls internal`)时启用。
|
|
54
|
+
# QATLAS_INSECURE=0
|
|
55
|
+
|
|
56
|
+
# 客户端写操作 (`qatlas upload pdf`、`qatlas upload markdown`、
|
|
57
|
+
# `qatlas mineru`、`POST /api/shares/`) 携带的 bearer token。
|
|
58
|
+
# 服务端 authGuard 接受两种凭据:
|
|
59
|
+
# (a) PocketBase 用户 session token —— 浏览器登录后从
|
|
60
|
+
# https://<server>/token 拷过来(默认 14 天有效,隐式拥有所有权限);
|
|
61
|
+
# (b) Personal Access Token (PAT) —— 浏览器登录后到
|
|
62
|
+
# https://<server>/pat 创建。**强制设置过期**(最长 365 天,
|
|
63
|
+
# 无"永不过期"选项)+ **显式 scope opt-in**(默认空集 = 全 403),
|
|
64
|
+
# 一次性显示明文,前缀 "qat_",可随时在同一页面撤销。
|
|
65
|
+
# Scope 词表见 docs/contribution-workflow.md §2。
|
|
66
|
+
# CI / nightly / 长跑脚本推荐用 (b),避免每两周重新拷一次。
|
|
67
|
+
# 命令行同名参数 `--token` 优先级高于本环境变量。
|
|
68
|
+
# QATLAS_TOKEN=
|
|
69
|
+
|
|
70
|
+
# 本地 wiki repo 路径,client 和 server 都用。
|
|
71
|
+
#
|
|
72
|
+
# 默认值:`<.env 所在目录>/../QuantumAtlas-Wiki`
|
|
73
|
+
# (即兄弟 Git checkout,方便多人 PR / review;符合 Gollum / mkdocs 等成熟
|
|
74
|
+
# wiki 项目的约定)。**不再**默认指向仓库内 `wiki/`——那样会让仓库
|
|
75
|
+
# 累积大量 wiki commit,跟代码主线混在一起。
|
|
76
|
+
#
|
|
77
|
+
# 显式覆盖示例:
|
|
78
|
+
# QATLAS_WIKI_DIR=/srv/quantum/QuantumAtlas-Wiki # 绝对路径
|
|
79
|
+
# QATLAS_WIKI_DIR=../QuantumAtlas-Wiki # 相对 .env 所在目录
|
|
80
|
+
#
|
|
81
|
+
# alias: WIKI_DIR
|
|
82
|
+
# QATLAS_WIKI_DIR=../QuantumAtlas-Wiki
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
# ============================================================================
|
|
86
|
+
# PocketBase / OAuth (server 内嵌 PocketBase, Go 二进制启动时自动注入)
|
|
87
|
+
# ============================================================================
|
|
88
|
+
|
|
89
|
+
# GitHub OAuth App credentials. 服务端 internal/auth/oauth.go 在 OnBootstrap
|
|
90
|
+
# 时把它们同步到 users collection 的 OAuth2 providers。在
|
|
91
|
+
# https://github.com/settings/developers (或 organization/settings/applications)
|
|
92
|
+
# 创建 OAuth App,callback 填 https://<your-server>/api/oauth2-redirect。
|
|
93
|
+
# GITHUB_CLIENT_ID=
|
|
94
|
+
# GITHUB_CLIENT_SECRET=
|
|
95
|
+
|
|
96
|
+
# GitHub 用户名白名单(逗号分隔)。**当前 handler 未实现**,
|
|
97
|
+
# 设置此字段不会影响行为;保留 env 名是为了未来自动 admin 提权时不破坏 .env。
|
|
98
|
+
# QATLAS_ADMIN_GITHUB_LOGINS=alice,bob
|
|
99
|
+
|
|
100
|
+
# 强制 server 用 tcp4-only listener(默认 off)。**只在 host 被 v4-only
|
|
101
|
+
# portproxy 包裹时打开**(典型场景:WSL2 + Windows netsh portproxy)。
|
|
102
|
+
# 普通 Linux 云 VPS 不要打开 —— 默认 PocketBase 用 dual-stack v6 socket
|
|
103
|
+
# 同时服务 v4 + v6 client;打开此项会关掉 v6 入口。
|
|
104
|
+
# 取值:1 / true / yes / on / y / t = 启用。
|
|
105
|
+
# QATLAS_FORCE_TCP4=0
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
# ============================================================================
|
|
109
|
+
# Server 侧
|
|
110
|
+
# ============================================================================
|
|
111
|
+
|
|
112
|
+
# 服务监听地址。位于本机反向代理后时使用 127.0.0.1;只有在明确配置好防火墙和
|
|
113
|
+
# 反向代理边界时,才考虑监听 0.0.0.0。纯 client 不需要设置。
|
|
114
|
+
# alias: SERVER_HOST / SERVER_PORT / SERVER_DEBUG
|
|
115
|
+
# QATLAS_SERVER_HOST=127.0.0.1
|
|
116
|
+
# QATLAS_SERVER_PORT=4200
|
|
117
|
+
# QATLAS_SERVER_DEBUG=false
|
|
118
|
+
|
|
119
|
+
# 存储根目录。**仅 server 使用**;纯 client 不需要(上传走 --pdf 任意路径)。
|
|
120
|
+
#
|
|
121
|
+
# 默认值(都遵循 XDG Base Directory 规范):
|
|
122
|
+
# QATLAS_RAW_DIR -> ${XDG_DATA_HOME:-$HOME/.local/share}/quantum-atlas/raw
|
|
123
|
+
# QATLAS_DATA_DIR -> ${XDG_DATA_HOME:-$HOME/.local/share}/quantum-atlas/data
|
|
124
|
+
# QATLAS_PB_DATA_DIR -> ${XDG_DATA_HOME:-$HOME/.local/share}/quantum-atlas/pb_data
|
|
125
|
+
#
|
|
126
|
+
# 为什么不再默认在仓库内:
|
|
127
|
+
# - 仓库内的 raw/data/pb_data 让 git 状态混乱(必须维护 .gitignore 规则)
|
|
128
|
+
# - 仓库内的 raw/ 可能是 FUSE 挂载(rclone SMB),让 `go ./...` 卡死
|
|
129
|
+
# - 跟 12-factor / XDG / FHS 都背道
|
|
130
|
+
#
|
|
131
|
+
# 想覆盖到其他位置(FHS / 自建挂载点 / 共享盘)时显式赋值。
|
|
132
|
+
#
|
|
133
|
+
# alias: RAW_DIR / DATA_DIR / PB_DATA_DIR
|
|
134
|
+
# QATLAS_RAW_DIR=
|
|
135
|
+
# QATLAS_DATA_DIR=
|
|
136
|
+
# QATLAS_PB_DATA_DIR=
|
|
137
|
+
#
|
|
138
|
+
# 注:pb_data 路径**只通过 QATLAS_PB_DATA_DIR 控制**——server 启动时
|
|
139
|
+
# 自动转成 PocketBase 的 `--dir=` 传给底层。systemd unit 的 ExecStart
|
|
140
|
+
# 不需要也不应该再硬写 `--dir=...`(cmdline 会覆盖 env,给排障添麻烦)。
|
|
141
|
+
|
|
142
|
+
# 可选的常驻 share token,用于 canonical paper assets。
|
|
143
|
+
# 只有在明确需要稳定、不过期的 /share/<token>/... URL 时才设置。
|
|
144
|
+
# alias: SHARE_ACCESS_TOKEN
|
|
145
|
+
# QATLAS_SHARE_ACCESS_TOKEN=<generate-a-long-random-token>
|
|
146
|
+
|
|
147
|
+
# 通过 POST /api/shares 创建的动态 share token,如果请求未提供 expires_in,
|
|
148
|
+
# 会使用这里的 TTL。取消注释即可覆盖代码默认值。
|
|
149
|
+
# alias: DEFAULT_SHARE_EXPIRES_IN
|
|
150
|
+
# QATLAS_DEFAULT_SHARE_EXPIRES_IN=600
|
|
151
|
+
|
|
152
|
+
# 可选的服务端审计用户头,由反向代理、SSO 或 API gateway 注入。
|
|
153
|
+
# 留空时不记录用户头;客户端不应手动设置这个头。
|
|
154
|
+
# alias: USER_HEADER
|
|
155
|
+
# QATLAS_USER_HEADER=X-Token-Subject
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
# ============================================================================
|
|
159
|
+
# 第三方 / SDK 标准名(无 QATLAS_ 前缀)
|
|
160
|
+
# ============================================================================
|
|
161
|
+
|
|
162
|
+
# Neo4j 连接配置。仅 server 需要。
|
|
163
|
+
# NEO4J_URI=bolt://localhost:7687
|
|
164
|
+
# NEO4J_USER=neo4j
|
|
165
|
+
# NEO4J_PASSWORD=
|
|
166
|
+
|
|
167
|
+
# 可选的本地或服务端 LLM 提取密钥。
|
|
168
|
+
# 如果提取流程在 QuantumAtlas 外部处理,或 ingest 使用 --no-extract,请保持未设置。
|
|
169
|
+
# OPENAI_API_KEY=
|
|
170
|
+
# ANTHROPIC_API_KEY=
|
|
171
|
+
|
|
172
|
+
# 可选的 MinerU 精准解析 API。client 跑 `qatlas mineru` 时也读取这些字段
|
|
173
|
+
# (服务端不再帮 client 转 MinerU;token 配额属于触发命令的人)。
|
|
174
|
+
# MINERU_API_TOKEN=
|
|
175
|
+
# MINERU_API_BASE_URL=https://mineru.net
|
|
176
|
+
# MINERU_MODEL_VERSION=vlm
|
|
177
|
+
# MINERU_LANGUAGE=ch
|
|
178
|
+
# MINERU_IS_OCR=false
|
|
179
|
+
# MINERU_ENABLE_FORMULA=true
|
|
180
|
+
# MINERU_ENABLE_TABLE=true
|
|
181
|
+
# MINERU_POLL_INTERVAL=3
|
|
182
|
+
# MINERU_TIMEOUT=1800
|
|
183
|
+
|
|
184
|
+
# ============================================================================
|
|
185
|
+
# 对象存储(RustFS / S3 兼容)— 仅 server 需要
|
|
186
|
+
# ============================================================================
|
|
187
|
+
# Go server 通过 internal/objstore 抽象层接 S3 兼容后端(minio-go SDK)。
|
|
188
|
+
# 四个字段必须**同时**填或同时不填:
|
|
189
|
+
# - 全部留空 → 走本地 RawDir(LocalStore),仍然可用,适合 dev 起步;
|
|
190
|
+
# - 全部填上 → 走 S3 后端(S3Store),所有 PDF / markdown / JSON / 图片
|
|
191
|
+
# 经过这个 bucket,server 端不再读写本地 RAW_DIR;
|
|
192
|
+
# - 半填 / 缺一不可 → 启动直接报错退出(避免 reader / writer 跑两套后端
|
|
193
|
+
# 的悄悄数据腐败)。
|
|
194
|
+
#
|
|
195
|
+
# 凭据生成:bash scripts/rustfs_bootstrap.sh (需要 RustFS root 凭据)
|
|
196
|
+
# 详细部署 / rotate / Caddy 入口模板见 docs/storage-design.md
|
|
197
|
+
# `## RustFS 部署后置:bucket / user / policy 自助配置`
|
|
198
|
+
#
|
|
199
|
+
# Endpoint 必须含 scheme(https:// 或 http://),minio-go 据此决定是否
|
|
200
|
+
# 走 TLS。Bucket 名是单独参数,不要把 bucket 拼进 endpoint。
|
|
201
|
+
#
|
|
202
|
+
# QATLAS_S3_ENDPOINT=https://raw.your-domain.tld
|
|
203
|
+
# QATLAS_S3_BUCKET=qatlas-raw
|
|
204
|
+
# QATLAS_S3_ACCESS_KEY_ID=<bootstrap 脚本输出>
|
|
205
|
+
# QATLAS_S3_SECRET_ACCESS_KEY=<bootstrap 脚本输出>
|
|
206
|
+
#
|
|
207
|
+
# QATLAS_S3_PUBLIC_ENDPOINT(可选) —— 仅用于给最终用户 client 签 presigned
|
|
208
|
+
# URL 的"公网入口"。server↔RustFS 走 ENDPOINT(mesh / 内网,省一跳反代),
|
|
209
|
+
# 但 share URL 里的 host 必须是公网可达的,否则浏览器拿到 307 直接连不通。
|
|
210
|
+
# 留空(或与 ENDPOINT 相同)= 单 endpoint 模式,presign 用 ENDPOINT 签
|
|
211
|
+
# —— 仅适合开发或全内网部署,不要在生产边缘节点这么干。
|
|
212
|
+
#
|
|
213
|
+
# 每个边缘节点用自己的公网入口,不共享:
|
|
214
|
+
# RackNerd .env: QATLAS_S3_PUBLIC_ENDPOINT=https://raw.quantum-atlas.ai
|
|
215
|
+
# Alibaba .env: QATLAS_S3_PUBLIC_ENDPOINT=https://47.102.36.175:9000
|
|
216
|
+
#
|
|
217
|
+
# 部署要点:公网 host 必须反代到内网 RustFS 端口,且要 preserve Host header
|
|
218
|
+
# —— SigV4 验签把 Host 算进 canonical request,Caddy 若改写 Host 会让
|
|
219
|
+
# RustFS 报 SignatureDoesNotMatch。最小 Caddy 模板:
|
|
220
|
+
# raw.quantum-atlas.ai {
|
|
221
|
+
# reverse_proxy 10.144.18.10:9000 { header_up Host {host} }
|
|
222
|
+
# }
|
|
223
|
+
#
|
|
224
|
+
# QATLAS_S3_PUBLIC_ENDPOINT=https://raw.your-domain.tld
|
|
225
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: Go (build + vet + test)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, feat/go-server]
|
|
6
|
+
paths:
|
|
7
|
+
- 'cmd/**'
|
|
8
|
+
- 'internal/**'
|
|
9
|
+
- 'go.mod'
|
|
10
|
+
- 'go.sum'
|
|
11
|
+
- 'pyproject.toml'
|
|
12
|
+
- 'pixi.lock'
|
|
13
|
+
- '.github/workflows/go.yml'
|
|
14
|
+
pull_request:
|
|
15
|
+
branches: [main]
|
|
16
|
+
paths:
|
|
17
|
+
- 'cmd/**'
|
|
18
|
+
- 'internal/**'
|
|
19
|
+
- 'go.mod'
|
|
20
|
+
- 'go.sum'
|
|
21
|
+
- 'pyproject.toml'
|
|
22
|
+
- 'pixi.lock'
|
|
23
|
+
- '.github/workflows/go.yml'
|
|
24
|
+
workflow_dispatch:
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
go:
|
|
28
|
+
name: Go (pixi-managed toolchain)
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
timeout-minutes: 15
|
|
31
|
+
|
|
32
|
+
steps:
|
|
33
|
+
- name: Check out repository
|
|
34
|
+
uses: actions/checkout@v4
|
|
35
|
+
|
|
36
|
+
# Pixi keeps the Go toolchain (+ gxx for cc shims) pinned in
|
|
37
|
+
# pyproject.toml [tool.pixi.dependencies], matching what local
|
|
38
|
+
# devs use. Reproducible across CI / dev machines.
|
|
39
|
+
- name: Install pixi
|
|
40
|
+
uses: prefix-dev/setup-pixi@v0.8.10
|
|
41
|
+
with:
|
|
42
|
+
pixi-version: v0.68.0
|
|
43
|
+
cache: true
|
|
44
|
+
|
|
45
|
+
# Cache the Go module + build cache. GOCACHE/GOMODCACHE are pointed
|
|
46
|
+
# at .gocache/ via pixi's [tool.pixi.activation.env] so both live
|
|
47
|
+
# inside the repo and are cacheable by a single path entry.
|
|
48
|
+
# Key on go.sum so cache invalidates when deps change.
|
|
49
|
+
- name: Cache Go modules + build artifacts
|
|
50
|
+
uses: actions/cache@v4
|
|
51
|
+
with:
|
|
52
|
+
path: .gocache
|
|
53
|
+
key: gocache-${{ runner.os }}-${{ hashFiles('go.sum') }}
|
|
54
|
+
restore-keys: |
|
|
55
|
+
gocache-${{ runner.os }}-
|
|
56
|
+
|
|
57
|
+
# 'pixi run vet' is scoped to ./internal/... ./cmd/... so it
|
|
58
|
+
# finishes fast even on cold cache. 'pixi run test-go' runs the
|
|
59
|
+
# unit suite (no network, no e2e). 'pixi run build' confirms the
|
|
60
|
+
# binary still links — caught in the past when go.mod's minimum
|
|
61
|
+
# Go version drifted above what conda-forge had available.
|
|
62
|
+
- name: pixi run vet
|
|
63
|
+
run: pixi run vet
|
|
64
|
+
|
|
65
|
+
- name: pixi run test-go
|
|
66
|
+
run: pixi run test-go
|
|
67
|
+
|
|
68
|
+
- name: pixi run build
|
|
69
|
+
run: pixi run build
|
|
70
|
+
|
|
71
|
+
- name: Upload server binary
|
|
72
|
+
uses: actions/upload-artifact@v4
|
|
73
|
+
with:
|
|
74
|
+
name: qatlas-server-binary-${{ github.sha }}
|
|
75
|
+
path: build/qatlas-server
|
|
76
|
+
retention-days: 7
|
|
77
|
+
if-no-files-found: error
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: Nightly production smoke
|
|
2
|
+
|
|
3
|
+
# Hits the live QuantumAtlas Go server (cmd/qatlas-server) through both edges
|
|
4
|
+
# every night:
|
|
5
|
+
# - https://quantum-atlas.ai (RackNerd, real LE cert)
|
|
6
|
+
# - https://47.102.36.175 | insecure (Alibaba, tls internal self-signed)
|
|
7
|
+
#
|
|
8
|
+
# Both targets reverse-proxy back to 1810 over EasyTier mesh
|
|
9
|
+
# (10.144.18.10:4200). Failures here usually mean either the user-mode
|
|
10
|
+
# qatlas.service on 1810 fell over, or a Caddy reload broke the public
|
|
11
|
+
# vhost.
|
|
12
|
+
|
|
13
|
+
on:
|
|
14
|
+
schedule:
|
|
15
|
+
- cron: '0 18 * * *' # UTC 18:00 = 北京时间次日 02:00
|
|
16
|
+
workflow_dispatch: # 也允许手动从 Actions 页面触发
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
smoke:
|
|
20
|
+
name: Hit live production targets (Go server)
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
timeout-minutes: 15
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- name: Install uv
|
|
28
|
+
uses: astral-sh/setup-uv@v5
|
|
29
|
+
with:
|
|
30
|
+
enable-cache: true
|
|
31
|
+
|
|
32
|
+
- name: Set up Python
|
|
33
|
+
uses: actions/setup-python@v5
|
|
34
|
+
with:
|
|
35
|
+
python-version: '3.12'
|
|
36
|
+
|
|
37
|
+
- name: Install dependencies
|
|
38
|
+
run: uv sync --extra dev --frozen
|
|
39
|
+
|
|
40
|
+
- name: Run production smoke against both edges
|
|
41
|
+
env:
|
|
42
|
+
# Default to both edges so the nightly is meaningful out of the
|
|
43
|
+
# box. Each target may carry `token-env=NAME` so the test
|
|
44
|
+
# picks up a per-host PAT — required when the edges run
|
|
45
|
+
# independent qatlas instances (active-active), since each
|
|
46
|
+
# has its own users DB and PATs don't cross-validate.
|
|
47
|
+
QATLAS_SERVER_TARGETS: ${{ secrets.QATLAS_SERVER_TARGETS || 'https://quantum-atlas.ai|token-env=QATLAS_TOKEN_RACKNERD,https://47.102.36.175|insecure|token-env=QATLAS_TOKEN_ALIBABA' }}
|
|
48
|
+
# Per-edge PATs. Mint each one on its own edge:
|
|
49
|
+
# ssh <edge> sudo -u <user> /path/qatlas-server pat mint \
|
|
50
|
+
# --user <email> --name nightly-ci \
|
|
51
|
+
# --scopes shares:write --expires-in-days 365
|
|
52
|
+
# The active-active topology means RackNerd and Alibaba have
|
|
53
|
+
# independent SQLite user DBs — a PAT minted on one will get
|
|
54
|
+
# 401 on the other. Two secrets, one per edge.
|
|
55
|
+
QATLAS_TOKEN_RACKNERD: ${{ secrets.QATLAS_TOKEN_RACKNERD }}
|
|
56
|
+
QATLAS_TOKEN_ALIBABA: ${{ secrets.QATLAS_TOKEN_ALIBABA }}
|
|
57
|
+
# Legacy single-edge fallback (still honoured by
|
|
58
|
+
# Target.auth_token() when no per-target token resolves).
|
|
59
|
+
# Set this OR the per-edge tokens above; not both.
|
|
60
|
+
QATLAS_TOKEN: ${{ secrets.QATLAS_CI_TOKEN }}
|
|
61
|
+
# 'legacy' marker covers the old FastAPI-only ingest/* tests that
|
|
62
|
+
# the Go server intentionally does not implement; they must NOT
|
|
63
|
+
# be selected by this nightly run.
|
|
64
|
+
run: uv run pytest -rs -m "e2e and not legacy"
|
|
65
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Pytest
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- 'atlas/**'
|
|
8
|
+
- 'tests/**'
|
|
9
|
+
- 'pyproject.toml'
|
|
10
|
+
- 'uv.lock'
|
|
11
|
+
- '.github/workflows/pytest.yml'
|
|
12
|
+
pull_request:
|
|
13
|
+
branches: [main]
|
|
14
|
+
paths:
|
|
15
|
+
- 'atlas/**'
|
|
16
|
+
- 'tests/**'
|
|
17
|
+
- 'pyproject.toml'
|
|
18
|
+
- 'uv.lock'
|
|
19
|
+
- '.github/workflows/pytest.yml'
|
|
20
|
+
workflow_dispatch:
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
test:
|
|
24
|
+
name: Python ${{ matrix.python-version }}
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
|
|
27
|
+
strategy:
|
|
28
|
+
fail-fast: false
|
|
29
|
+
matrix:
|
|
30
|
+
python-version: ["3.11", "3.12"]
|
|
31
|
+
|
|
32
|
+
steps:
|
|
33
|
+
- name: Check out repository
|
|
34
|
+
uses: actions/checkout@v4
|
|
35
|
+
|
|
36
|
+
- name: Install uv
|
|
37
|
+
uses: astral-sh/setup-uv@v5
|
|
38
|
+
with:
|
|
39
|
+
enable-cache: true
|
|
40
|
+
|
|
41
|
+
- name: Set up Python
|
|
42
|
+
uses: actions/setup-python@v5
|
|
43
|
+
with:
|
|
44
|
+
python-version: ${{ matrix.python-version }}
|
|
45
|
+
|
|
46
|
+
- name: Install dependencies
|
|
47
|
+
run: uv sync --extra dev --frozen
|
|
48
|
+
|
|
49
|
+
- name: Run pytest (offline)
|
|
50
|
+
run: uv run pytest -rs -m "not network and not e2e"
|