cndb 0.1.6__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.
- cndb-0.1.6/.bumpversion.toml +18 -0
- cndb-0.1.6/.copier-answers.yml +19 -0
- cndb-0.1.6/.coveragerc +14 -0
- cndb-0.1.6/.dockerignore +46 -0
- cndb-0.1.6/.gitattributes +30 -0
- cndb-0.1.6/.github/workflows/ci.yml +96 -0
- cndb-0.1.6/.github/workflows/release.yml +65 -0
- cndb-0.1.6/.gitignore +54 -0
- cndb-0.1.6/.pre-commit-config.yaml +32 -0
- cndb-0.1.6/.python-version +1 -0
- cndb-0.1.6/.readthedocs.yaml +23 -0
- cndb-0.1.6/CHANGELOG.md +40 -0
- cndb-0.1.6/Dockerfile +50 -0
- cndb-0.1.6/LICENSE +21 -0
- cndb-0.1.6/Makefile +90 -0
- cndb-0.1.6/PKG-INFO +261 -0
- cndb-0.1.6/README.md +203 -0
- cndb-0.1.6/alembic/README +1 -0
- cndb-0.1.6/alembic/env.py +82 -0
- cndb-0.1.6/alembic/script.py.mako +28 -0
- cndb-0.1.6/alembic/versions/62817ea574fa_add_workflows_tables.py +85 -0
- cndb-0.1.6/alembic/versions/6399e5f0f61f_initial.py +185 -0
- cndb-0.1.6/alembic/versions/6955718a847b_add_table_owner_and_member.py +253 -0
- cndb-0.1.6/alembic/versions/949b0d8ddf3f_add_datafield_hidden.py +33 -0
- cndb-0.1.6/alembic/versions/a1b2c3d4e5f6_add_user_preferences.py +36 -0
- cndb-0.1.6/alembic/versions/b2c3d4e5f6a7_add_workspace_extension.py +59 -0
- cndb-0.1.6/alembic/versions/c7e8f9a0b1c2_add_wechat_accounts_table.py +54 -0
- cndb-0.1.6/alembic/versions/d8e9f0a1b2c3_add_import_task_validation_report.py +55 -0
- cndb-0.1.6/alembic.ini +150 -0
- cndb-0.1.6/deploy/Dockerfile +86 -0
- cndb-0.1.6/deploy/Dockerfile.wheel +50 -0
- cndb-0.1.6/deploy/nginx.conf +137 -0
- cndb-0.1.6/docker-compose.wheel.yml +62 -0
- cndb-0.1.6/docker-compose.yml +77 -0
- cndb-0.1.6/docs/_static/.gitkeep +0 -0
- cndb-0.1.6/docs/api.rst +7 -0
- cndb-0.1.6/docs/changelog.rst +7 -0
- cndb-0.1.6/docs/conf.py +69 -0
- cndb-0.1.6/docs/index.rst +58 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/346/237/220/344/274/201/344/270/232/351/224/200/345/224/256/347/256/241/347/220/206/views.json +618 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/346/237/220/344/274/201/344/270/232/351/224/200/345/224/256/347/256/241/347/220/206//344/272/247/345/223/201/345/274/200/345/217/221.csv +501 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/346/237/220/344/274/201/344/270/232/351/224/200/345/224/256/347/256/241/347/220/206//345/207/272/345/267/256/347/273/237/350/256/241.csv +163 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/346/237/220/344/274/201/344/270/232/351/224/200/345/224/256/347/256/241/347/220/206//345/256/242/346/210/267/346/265/201/345/244/261.csv +501 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/346/237/220/344/274/201/344/270/232/351/224/200/345/224/256/347/256/241/347/220/206//347/224/265/345/225/206/351/224/200/345/224/256.csv +501 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/346/237/220/345/234/260/345/214/272/346/225/260/346/215/256/views.json +18 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/346/237/220/345/234/260/345/214/272/346/225/260/346/215/256//346/210/277/344/273/267/351/242/204/346/265/213.csv +501 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/346/237/220/345/234/260/345/214/272/346/225/260/346/215/256//346/260/224/346/270/251/345/244/251/346/260/224.csv +501 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/347/247/221/347/240/224/351/241/271/347/233/256/347/256/241/347/220/206/views.json +461 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/347/247/221/347/240/224/351/241/271/347/233/256/347/256/241/347/220/206//347/247/221/347/240/224/347/273/217/350/264/271.csv +33 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/347/247/221/347/240/224/351/241/271/347/233/256/347/256/241/347/220/206//347/247/221/347/240/224/351/241/271/347/233/256.csv +16 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/347/247/221/347/240/224/351/241/271/347/233/256/347/256/241/347/220/206//350/257/276/351/242/230/350/264/237/350/264/243/344/272/272.csv +19 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/347/247/221/347/240/224/351/241/271/347/233/256/347/256/241/347/220/206//351/241/271/347/233/256/350/277/233/345/261/225.csv +32 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/350/202/241/347/245/250/344/277/241/346/201/257/347/256/241/347/220/206/api_config.json +71 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/351/241/271/347/233/256/347/256/241/347/220/206/WBS/344/273/273/345/212/241/345/210/206/350/247/243.csv +24 -0
- cndb-0.1.6/examples/datasets//345/267/245/344/275/234/345/214/272-/351/241/271/347/233/256/347/256/241/347/220/206/views.json +148 -0
- cndb-0.1.6/frontend/.gitignore +27 -0
- cndb-0.1.6/frontend/eslint.config.js +99 -0
- cndb-0.1.6/frontend/index.html +13 -0
- cndb-0.1.6/frontend/package.json +57 -0
- cndb-0.1.6/frontend/playwright.config.ts +44 -0
- cndb-0.1.6/frontend/pnpm-lock.yaml +4952 -0
- cndb-0.1.6/frontend/pnpm-workspace.yaml +2 -0
- cndb-0.1.6/frontend/public/favicon.svg +1 -0
- cndb-0.1.6/frontend/public/fonts/inter/inter-latin-400-normal.woff2 +0 -0
- cndb-0.1.6/frontend/public/fonts/inter/inter-latin-500-normal.woff2 +0 -0
- cndb-0.1.6/frontend/public/fonts/inter/inter-latin-600-normal.woff2 +0 -0
- cndb-0.1.6/frontend/public/fonts/inter/inter-latin-700-normal.woff2 +0 -0
- cndb-0.1.6/frontend/public/fonts/inter/inter-latin-ext-400-normal.woff2 +0 -0
- cndb-0.1.6/frontend/public/fonts/inter/inter-latin-ext-500-normal.woff2 +0 -0
- cndb-0.1.6/frontend/public/fonts/inter/inter-latin-ext-600-normal.woff2 +0 -0
- cndb-0.1.6/frontend/public/fonts/inter/inter-latin-ext-700-normal.woff2 +0 -0
- cndb-0.1.6/frontend/public/fonts/jetbrains-mono/jetbrains-mono-latin-400-normal.woff2 +0 -0
- cndb-0.1.6/frontend/public/fonts/jetbrains-mono/jetbrains-mono-latin-700-normal.woff2 +0 -0
- cndb-0.1.6/frontend/public/fonts/jetbrains-mono/jetbrains-mono-latin-ext-400-normal.woff2 +0 -0
- cndb-0.1.6/frontend/public/fonts/jetbrains-mono/jetbrains-mono-latin-ext-700-normal.woff2 +0 -0
- cndb-0.1.6/frontend/public/fonts/noto-sans-sc/noto-sans-sc-101-400-normal.woff2 +0 -0
- cndb-0.1.6/frontend/public/fonts/noto-sans-sc/noto-sans-sc-101-500-normal.woff2 +0 -0
- cndb-0.1.6/frontend/public/fonts/noto-sans-sc/noto-sans-sc-101-700-normal.woff2 +0 -0
- cndb-0.1.6/frontend/src/App.tsx +80 -0
- cndb-0.1.6/frontend/src/api/client.ts +50 -0
- cndb-0.1.6/frontend/src/api/index.ts +480 -0
- cndb-0.1.6/frontend/src/api/types.ts +551 -0
- cndb-0.1.6/frontend/src/auth/AuthContext.tsx +89 -0
- cndb-0.1.6/frontend/src/components/ProtectedRoute.tsx +24 -0
- cndb-0.1.6/frontend/src/components/report-editor/FieldPanel.tsx +135 -0
- cndb-0.1.6/frontend/src/components/report-editor/PreviewPanel.tsx +107 -0
- cndb-0.1.6/frontend/src/components/report-editor/ReportTemplateEditor.tsx +128 -0
- cndb-0.1.6/frontend/src/components/report-editor/SyntaxHelpPanel.tsx +128 -0
- cndb-0.1.6/frontend/src/components/report-editor/TemplateEditor.tsx +165 -0
- cndb-0.1.6/frontend/src/components/report-editor/index.ts +20 -0
- cndb-0.1.6/frontend/src/components/report-editor/jinja2Highlight.ts +54 -0
- cndb-0.1.6/frontend/src/components/report-editor/reportEditor.css +230 -0
- cndb-0.1.6/frontend/src/hooks/useResponsive.ts +73 -0
- cndb-0.1.6/frontend/src/index.css +666 -0
- cndb-0.1.6/frontend/src/layouts/AuthLayout.tsx +16 -0
- cndb-0.1.6/frontend/src/layouts/MainLayout.tsx +195 -0
- cndb-0.1.6/frontend/src/layouts/PublicLayout.tsx +17 -0
- cndb-0.1.6/frontend/src/main.tsx +35 -0
- cndb-0.1.6/frontend/src/nunjucks.d.ts +1 -0
- cndb-0.1.6/frontend/src/pages/auth/LoginPage.tsx +49 -0
- cndb-0.1.6/frontend/src/pages/auth/RegisterPage.tsx +118 -0
- cndb-0.1.6/frontend/src/pages/grid/GridPage.tsx +938 -0
- cndb-0.1.6/frontend/src/pages/grid/components/CalendarView.tsx +730 -0
- cndb-0.1.6/frontend/src/pages/grid/components/ColumnFilterDropdown.tsx +125 -0
- cndb-0.1.6/frontend/src/pages/grid/components/CreateEditViewForm.tsx +185 -0
- cndb-0.1.6/frontend/src/pages/grid/components/GalleryView.tsx +151 -0
- cndb-0.1.6/frontend/src/pages/grid/components/GanttView.tsx +1186 -0
- cndb-0.1.6/frontend/src/pages/grid/components/GridCell.tsx +613 -0
- cndb-0.1.6/frontend/src/pages/grid/components/KanbanView.tsx +633 -0
- cndb-0.1.6/frontend/src/pages/grid/components/MoveTableForm.tsx +34 -0
- cndb-0.1.6/frontend/src/pages/grid/components/PermissionEditor.tsx +403 -0
- cndb-0.1.6/frontend/src/pages/grid/components/RowDetailDrawer.tsx +330 -0
- cndb-0.1.6/frontend/src/pages/grid/components/TableSettingsDialog.tsx +113 -0
- cndb-0.1.6/frontend/src/pages/grid/components/ViewConfigDialog.tsx +275 -0
- cndb-0.1.6/frontend/src/pages/grid/components/WbsView.tsx +564 -0
- cndb-0.1.6/frontend/src/pages/grid/components/buildColumns.tsx +75 -0
- cndb-0.1.6/frontend/src/pages/grid/components/dateUtils.ts +29 -0
- cndb-0.1.6/frontend/src/pages/grid/components/fieldOps.ts +159 -0
- cndb-0.1.6/frontend/src/pages/grid/components/fieldValueFormat.ts +127 -0
- cndb-0.1.6/frontend/src/pages/grid/components/viewOptionSchema.ts +335 -0
- cndb-0.1.6/frontend/src/pages/modals/ApiImportDialog.tsx +456 -0
- cndb-0.1.6/frontend/src/pages/modals/FieldManager.tsx +737 -0
- cndb-0.1.6/frontend/src/pages/modals/ImportExportDialog.tsx +467 -0
- cndb-0.1.6/frontend/src/pages/modals/SettingsModal.tsx +136 -0
- cndb-0.1.6/frontend/src/pages/modals/TableSettingsModal.tsx +418 -0
- cndb-0.1.6/frontend/src/pages/modals/TrashPanel.tsx +208 -0
- cndb-0.1.6/frontend/src/pages/modals/WorkspaceBackupDialog.tsx +165 -0
- cndb-0.1.6/frontend/src/pages/modals/WorkspaceSettingsContent.tsx +656 -0
- cndb-0.1.6/frontend/src/pages/modals/WorkspaceSettingsModal.tsx +37 -0
- cndb-0.1.6/frontend/src/pages/public/PublicFormPage.tsx +105 -0
- cndb-0.1.6/frontend/src/pages/public/PublicSharePage.tsx +76 -0
- cndb-0.1.6/frontend/src/pages/reports/ReportsPage.tsx +662 -0
- cndb-0.1.6/frontend/src/pages/workspace/TablesList.tsx +489 -0
- cndb-0.1.6/frontend/src/pages/workspace/WorkspaceList.tsx +290 -0
- cndb-0.1.6/frontend/src/pages/workspace/WorkspaceSettingsPage.tsx +59 -0
- cndb-0.1.6/frontend/src/theme/TableSettingsProvider.tsx +50 -0
- cndb-0.1.6/frontend/src/theme/ThemeProvider.tsx +64 -0
- cndb-0.1.6/frontend/src/theme/tableSettings.ts +55 -0
- cndb-0.1.6/frontend/src/theme/theme.ts +615 -0
- cndb-0.1.6/frontend/src/utils/tagColors.ts +230 -0
- cndb-0.1.6/frontend/src/vite-env.d.ts +1 -0
- cndb-0.1.6/frontend/tests/e2e/auth.setup.ts +27 -0
- cndb-0.1.6/frontend/tests/e2e/critical/api-import.spec.ts +424 -0
- cndb-0.1.6/frontend/tests/e2e/critical/calendar-view.spec.ts +578 -0
- cndb-0.1.6/frontend/tests/e2e/critical/fields-import.spec.ts +179 -0
- cndb-0.1.6/frontend/tests/e2e/critical/gantt-view.spec.ts +627 -0
- cndb-0.1.6/frontend/tests/e2e/critical/kanban-view.spec.ts +551 -0
- cndb-0.1.6/frontend/tests/e2e/critical/navigation.spec.ts +45 -0
- cndb-0.1.6/frontend/tests/e2e/critical/permission-members.spec.ts +222 -0
- cndb-0.1.6/frontend/tests/e2e/critical/reports.spec.ts +323 -0
- cndb-0.1.6/frontend/tests/e2e/critical/row-crud.spec.ts +138 -0
- cndb-0.1.6/frontend/tests/e2e/critical/settings-pages.spec.ts +324 -0
- cndb-0.1.6/frontend/tests/e2e/critical/table-copy.spec.ts +413 -0
- cndb-0.1.6/frontend/tests/e2e/critical/trash-page.spec.ts +53 -0
- cndb-0.1.6/frontend/tests/e2e/critical/view-filter-sort-ext.spec.ts +459 -0
- cndb-0.1.6/frontend/tests/e2e/critical/view-filter-sort.spec.ts +337 -0
- cndb-0.1.6/frontend/tests/e2e/critical/view-mode-persist.spec.ts +454 -0
- cndb-0.1.6/frontend/tests/e2e/critical/view-mode-sync.spec.ts +402 -0
- cndb-0.1.6/frontend/tests/e2e/critical/wbs-view.spec.ts +534 -0
- cndb-0.1.6/frontend/tests/e2e/critical/workspace-features.spec.ts +130 -0
- cndb-0.1.6/frontend/tests/e2e/smoke/grid.spec.ts +56 -0
- cndb-0.1.6/frontend/tests/e2e/smoke/login.spec.ts +68 -0
- cndb-0.1.6/frontend/tests/e2e/smoke/logout.spec.ts +25 -0
- cndb-0.1.6/frontend/tests/e2e/smoke/theme-switch.spec.ts +385 -0
- cndb-0.1.6/frontend/tests/e2e/smoke/workspace.spec.ts +35 -0
- cndb-0.1.6/frontend/tsconfig.app.json +33 -0
- cndb-0.1.6/frontend/tsconfig.json +11 -0
- cndb-0.1.6/frontend/tsconfig.node.json +26 -0
- cndb-0.1.6/frontend/vite.config.ts +86 -0
- cndb-0.1.6/frontend-mini/.gitignore +21 -0
- cndb-0.1.6/frontend-mini/.swc/plugins/v7_linux_x86_64_0.104.8/2b4f2ec8b003a8f816bafcdbe4f010f24d884f2ca9f9e9777a46a6367f73f01b +0 -0
- cndb-0.1.6/frontend-mini/babel.config.js +9 -0
- cndb-0.1.6/frontend-mini/config/dev.js +9 -0
- cndb-0.1.6/frontend-mini/config/index.js +51 -0
- cndb-0.1.6/frontend-mini/config/prod.js +9 -0
- cndb-0.1.6/frontend-mini/package.json +41 -0
- cndb-0.1.6/frontend-mini/pnpm-lock.yaml +10970 -0
- cndb-0.1.6/frontend-mini/project.config.json +14 -0
- cndb-0.1.6/frontend-mini/scripts/gen-icons.js +98 -0
- cndb-0.1.6/frontend-mini/src/api/auth.ts +46 -0
- cndb-0.1.6/frontend-mini/src/api/client.ts +113 -0
- cndb-0.1.6/frontend-mini/src/api/table.ts +99 -0
- cndb-0.1.6/frontend-mini/src/api/workspace.ts +29 -0
- cndb-0.1.6/frontend-mini/src/app.config.ts +43 -0
- cndb-0.1.6/frontend-mini/src/app.scss +42 -0
- cndb-0.1.6/frontend-mini/src/app.tsx +28 -0
- cndb-0.1.6/frontend-mini/src/assets/tab/me-active.png +0 -0
- cndb-0.1.6/frontend-mini/src/assets/tab/me.png +0 -0
- cndb-0.1.6/frontend-mini/src/assets/tab/workspace-active.png +0 -0
- cndb-0.1.6/frontend-mini/src/assets/tab/workspace.png +0 -0
- cndb-0.1.6/frontend-mini/src/components/EmptyState/index.tsx +16 -0
- cndb-0.1.6/frontend-mini/src/components/FieldRenderer/index.scss +16 -0
- cndb-0.1.6/frontend-mini/src/components/FieldRenderer/index.tsx +101 -0
- cndb-0.1.6/frontend-mini/src/components/Loading/index.tsx +12 -0
- cndb-0.1.6/frontend-mini/src/config/env.ts +12 -0
- cndb-0.1.6/frontend-mini/src/config/theme.ts +20 -0
- cndb-0.1.6/frontend-mini/src/pages/grid/[wid]/[tid]/index.scss +182 -0
- cndb-0.1.6/frontend-mini/src/pages/grid/[wid]/[tid]/index.tsx +195 -0
- cndb-0.1.6/frontend-mini/src/pages/login/index.scss +96 -0
- cndb-0.1.6/frontend-mini/src/pages/login/index.tsx +113 -0
- cndb-0.1.6/frontend-mini/src/pages/me/index.scss +121 -0
- cndb-0.1.6/frontend-mini/src/pages/me/index.tsx +90 -0
- cndb-0.1.6/frontend-mini/src/pages/record/[wid]/[tid]/[rid]/index.scss +108 -0
- cndb-0.1.6/frontend-mini/src/pages/record/[wid]/[tid]/[rid]/index.tsx +147 -0
- cndb-0.1.6/frontend-mini/src/pages/record/new/[wid]/[tid]/index.scss +66 -0
- cndb-0.1.6/frontend-mini/src/pages/record/new/[wid]/[tid]/index.tsx +93 -0
- cndb-0.1.6/frontend-mini/src/pages/tables/[wid]/index.scss +47 -0
- cndb-0.1.6/frontend-mini/src/pages/tables/[wid]/index.tsx +50 -0
- cndb-0.1.6/frontend-mini/src/pages/workspaces/index.scss +128 -0
- cndb-0.1.6/frontend-mini/src/pages/workspaces/index.tsx +110 -0
- cndb-0.1.6/frontend-mini/src/store/auth.tsx +114 -0
- cndb-0.1.6/frontend-mini/src/utils/storage.ts +43 -0
- cndb-0.1.6/frontend-mini/tsconfig.json +22 -0
- cndb-0.1.6/pyproject.toml +105 -0
- cndb-0.1.6/pyrefly.toml +5 -0
- cndb-0.1.6/pytest.ini +17 -0
- cndb-0.1.6/ruff.toml +43 -0
- cndb-0.1.6/scripts/bench_10k_rows.py +147 -0
- cndb-0.1.6/scripts/check_gitkeep.py +94 -0
- cndb-0.1.6/src/cndb/__init__.py +34 -0
- cndb-0.1.6/src/cndb/api/__init__.py +10 -0
- cndb-0.1.6/src/cndb/api/deps.py +111 -0
- cndb-0.1.6/src/cndb/app.py +163 -0
- cndb-0.1.6/src/cndb/backup.py +349 -0
- cndb-0.1.6/src/cndb/core/__init__.py +3 -0
- cndb-0.1.6/src/cndb/core/config.py +98 -0
- cndb-0.1.6/src/cndb/core/database.py +40 -0
- cndb-0.1.6/src/cndb/core/plugin_registry.py +145 -0
- cndb-0.1.6/src/cndb/core/security.py +121 -0
- cndb-0.1.6/src/cndb/models/__init__.py +11 -0
- cndb-0.1.6/src/cndb/models/base.py +69 -0
- cndb-0.1.6/src/cndb/plugins/__init__.py +14 -0
- cndb-0.1.6/src/cndb/plugins/accounts/__init__.py +1 -0
- cndb-0.1.6/src/cndb/plugins/accounts/models.py +118 -0
- cndb-0.1.6/src/cndb/plugins/accounts/plugin.py +37 -0
- cndb-0.1.6/src/cndb/plugins/accounts/routers/__init__.py +1 -0
- cndb-0.1.6/src/cndb/plugins/accounts/routers/auth.py +226 -0
- cndb-0.1.6/src/cndb/plugins/accounts/routers/preferences.py +161 -0
- cndb-0.1.6/src/cndb/plugins/accounts/schemas/__init__.py +12 -0
- cndb-0.1.6/src/cndb/plugins/accounts/schemas/auth.py +61 -0
- cndb-0.1.6/src/cndb/plugins/base.py +111 -0
- cndb-0.1.6/src/cndb/plugins/health/__init__.py +3 -0
- cndb-0.1.6/src/cndb/plugins/health/plugin.py +43 -0
- cndb-0.1.6/src/cndb/plugins/reports/__init__.py +5 -0
- cndb-0.1.6/src/cndb/plugins/reports/models.py +54 -0
- cndb-0.1.6/src/cndb/plugins/reports/plugin.py +36 -0
- cndb-0.1.6/src/cndb/plugins/reports/routers/__init__.py +7 -0
- cndb-0.1.6/src/cndb/plugins/reports/routers/reports.py +265 -0
- cndb-0.1.6/src/cndb/plugins/reports/schemas/__init__.py +88 -0
- cndb-0.1.6/src/cndb/plugins/tables/__init__.py +5 -0
- cndb-0.1.6/src/cndb/plugins/tables/access.py +215 -0
- cndb-0.1.6/src/cndb/plugins/tables/api_config_loader.py +236 -0
- cndb-0.1.6/src/cndb/plugins/tables/api_fetch.py +580 -0
- cndb-0.1.6/src/cndb/plugins/tables/audit.py +82 -0
- cndb-0.1.6/src/cndb/plugins/tables/ddl.py +363 -0
- cndb-0.1.6/src/cndb/plugins/tables/diff_reporter.py +83 -0
- cndb-0.1.6/src/cndb/plugins/tables/failed_row_exporter.py +115 -0
- cndb-0.1.6/src/cndb/plugins/tables/field_ops.py +298 -0
- cndb-0.1.6/src/cndb/plugins/tables/field_types/__init__.py +833 -0
- cndb-0.1.6/src/cndb/plugins/tables/field_types/smart_color.py +439 -0
- cndb-0.1.6/src/cndb/plugins/tables/import_tasks.py +327 -0
- cndb-0.1.6/src/cndb/plugins/tables/importer.py +248 -0
- cndb-0.1.6/src/cndb/plugins/tables/links.py +315 -0
- cndb-0.1.6/src/cndb/plugins/tables/models.py +351 -0
- cndb-0.1.6/src/cndb/plugins/tables/plugin.py +47 -0
- cndb-0.1.6/src/cndb/plugins/tables/query.py +378 -0
- cndb-0.1.6/src/cndb/plugins/tables/records.py +524 -0
- cndb-0.1.6/src/cndb/plugins/tables/routers/__init__.py +37 -0
- cndb-0.1.6/src/cndb/plugins/tables/routers/audit.py +45 -0
- cndb-0.1.6/src/cndb/plugins/tables/routers/bulk.py +439 -0
- cndb-0.1.6/src/cndb/plugins/tables/routers/comments.py +124 -0
- cndb-0.1.6/src/cndb/plugins/tables/routers/fields.py +325 -0
- cndb-0.1.6/src/cndb/plugins/tables/routers/files.py +211 -0
- cndb-0.1.6/src/cndb/plugins/tables/routers/import_api.py +307 -0
- cndb-0.1.6/src/cndb/plugins/tables/routers/import_csv.py +114 -0
- cndb-0.1.6/src/cndb/plugins/tables/routers/members.py +316 -0
- cndb-0.1.6/src/cndb/plugins/tables/routers/permissions.py +85 -0
- cndb-0.1.6/src/cndb/plugins/tables/routers/public.py +155 -0
- cndb-0.1.6/src/cndb/plugins/tables/routers/records.py +212 -0
- cndb-0.1.6/src/cndb/plugins/tables/routers/tables.py +566 -0
- cndb-0.1.6/src/cndb/plugins/tables/routers/trash.py +315 -0
- cndb-0.1.6/src/cndb/plugins/tables/routers/views.py +419 -0
- cndb-0.1.6/src/cndb/plugins/tables/row_validator.py +202 -0
- cndb-0.1.6/src/cndb/plugins/tables/schemas/__init__.py +358 -0
- cndb-0.1.6/src/cndb/plugins/tables/schemas/comments.py +57 -0
- cndb-0.1.6/src/cndb/plugins/tables/transfer.py +644 -0
- cndb-0.1.6/src/cndb/plugins/wechat_auth/__init__.py +5 -0
- cndb-0.1.6/src/cndb/plugins/wechat_auth/client.py +57 -0
- cndb-0.1.6/src/cndb/plugins/wechat_auth/models.py +54 -0
- cndb-0.1.6/src/cndb/plugins/wechat_auth/plugin.py +29 -0
- cndb-0.1.6/src/cndb/plugins/wechat_auth/routers/__init__.py +1 -0
- cndb-0.1.6/src/cndb/plugins/wechat_auth/routers/login.py +140 -0
- cndb-0.1.6/src/cndb/plugins/wechat_auth/schemas/__init__.py +8 -0
- cndb-0.1.6/src/cndb/plugins/wechat_auth/schemas/auth.py +24 -0
- cndb-0.1.6/src/cndb/plugins/workspaces/__init__.py +12 -0
- cndb-0.1.6/src/cndb/plugins/workspaces/models.py +193 -0
- cndb-0.1.6/src/cndb/plugins/workspaces/permissions.py +35 -0
- cndb-0.1.6/src/cndb/plugins/workspaces/plugin.py +35 -0
- cndb-0.1.6/src/cndb/plugins/workspaces/routers/__init__.py +3 -0
- cndb-0.1.6/src/cndb/plugins/workspaces/routers/roles.py +227 -0
- cndb-0.1.6/src/cndb/plugins/workspaces/routers/workspaces.py +748 -0
- cndb-0.1.6/src/cndb/plugins/workspaces/schemas/__init__.py +234 -0
- cndb-0.1.6/src/cndb/py.typed +0 -0
- cndb-0.1.6/src/cndb/restore.py +383 -0
- cndb-0.1.6/src/cndb/runner.py +259 -0
- cndb-0.1.6/src/cndb/schemas/__init__.py +7 -0
- cndb-0.1.6/src/cndb/seed.py +549 -0
- cndb-0.1.6/src/cndb/services/__init__.py +7 -0
- cndb-0.1.6/src/cndb/static/.gitkeep +0 -0
- cndb-0.1.6/src/cndb/static/assets/ApiImportDialog-Ck3QpBew.js +1 -0
- cndb-0.1.6/src/cndb/static/assets/ArrowLeftOutlined-CfcYJquS.js +1 -0
- cndb-0.1.6/src/cndb/static/assets/FieldManager-D13Osy69.js +13 -0
- cndb-0.1.6/src/cndb/static/assets/GridCell-DzS2y21x.js +5 -0
- cndb-0.1.6/src/cndb/static/assets/GridPage-l1RzV0gK.js +16 -0
- cndb-0.1.6/src/cndb/static/assets/HomeOutlined-BrquOt1m.js +1 -0
- cndb-0.1.6/src/cndb/static/assets/ImportExportDialog-BHPGsZAb.js +1 -0
- cndb-0.1.6/src/cndb/static/assets/PublicFormPage-q9g0sBw9.js +1 -0
- cndb-0.1.6/src/cndb/static/assets/PublicSharePage-jqSsQ7lr.js +1 -0
- cndb-0.1.6/src/cndb/static/assets/ReloadOutlined-DaNpemW9.js +1 -0
- cndb-0.1.6/src/cndb/static/assets/ReportsPage-BUNKtZsn.js +61 -0
- cndb-0.1.6/src/cndb/static/assets/ReportsPage-Bwgzgxg9.css +1 -0
- cndb-0.1.6/src/cndb/static/assets/SettingsModal-CgFxRDWi.js +1 -0
- cndb-0.1.6/src/cndb/static/assets/TrashPanel-CP37espS.js +1 -0
- cndb-0.1.6/src/cndb/static/assets/WorkspaceSettingsPage-DyCr0ZXL.js +4 -0
- cndb-0.1.6/src/cndb/static/assets/index-CLkyLhC9.js +538 -0
- cndb-0.1.6/src/cndb/static/assets/index-DPuneDdh.css +1 -0
- cndb-0.1.6/src/cndb/static/assets/index-Dvb5hg8k.js +13 -0
- cndb-0.1.6/src/cndb/static/assets/index-qBRt_nHP.js +20 -0
- cndb-0.1.6/src/cndb/static/favicon.svg +1 -0
- cndb-0.1.6/src/cndb/static/fonts/inter/inter-latin-400-normal.woff2 +0 -0
- cndb-0.1.6/src/cndb/static/fonts/inter/inter-latin-500-normal.woff2 +0 -0
- cndb-0.1.6/src/cndb/static/fonts/inter/inter-latin-600-normal.woff2 +0 -0
- cndb-0.1.6/src/cndb/static/fonts/inter/inter-latin-700-normal.woff2 +0 -0
- cndb-0.1.6/src/cndb/static/fonts/inter/inter-latin-ext-400-normal.woff2 +0 -0
- cndb-0.1.6/src/cndb/static/fonts/inter/inter-latin-ext-500-normal.woff2 +0 -0
- cndb-0.1.6/src/cndb/static/fonts/inter/inter-latin-ext-600-normal.woff2 +0 -0
- cndb-0.1.6/src/cndb/static/fonts/inter/inter-latin-ext-700-normal.woff2 +0 -0
- cndb-0.1.6/src/cndb/static/fonts/jetbrains-mono/jetbrains-mono-latin-400-normal.woff2 +0 -0
- cndb-0.1.6/src/cndb/static/fonts/jetbrains-mono/jetbrains-mono-latin-700-normal.woff2 +0 -0
- cndb-0.1.6/src/cndb/static/fonts/jetbrains-mono/jetbrains-mono-latin-ext-400-normal.woff2 +0 -0
- cndb-0.1.6/src/cndb/static/fonts/jetbrains-mono/jetbrains-mono-latin-ext-700-normal.woff2 +0 -0
- cndb-0.1.6/src/cndb/static/fonts/noto-sans-sc/noto-sans-sc-101-400-normal.woff2 +0 -0
- cndb-0.1.6/src/cndb/static/fonts/noto-sans-sc/noto-sans-sc-101-500-normal.woff2 +0 -0
- cndb-0.1.6/src/cndb/static/fonts/noto-sans-sc/noto-sans-sc-101-700-normal.woff2 +0 -0
- cndb-0.1.6/src/cndb/static/index.html +14 -0
- cndb-0.1.6/tests/__init__.py +0 -0
- cndb-0.1.6/tests/conftest.py +75 -0
- cndb-0.1.6/tests/test_access_audit.py +171 -0
- cndb-0.1.6/tests/test_accounts_plugin.py +296 -0
- cndb-0.1.6/tests/test_api_config_fetch_cov.py +347 -0
- cndb-0.1.6/tests/test_api_config_loader.py +287 -0
- cndb-0.1.6/tests/test_api_deps.py +17 -0
- cndb-0.1.6/tests/test_api_edge_cases.py +146 -0
- cndb-0.1.6/tests/test_api_fetch.py +245 -0
- cndb-0.1.6/tests/test_attachment_field.py +89 -0
- cndb-0.1.6/tests/test_backup.py +349 -0
- cndb-0.1.6/tests/test_bulk_transfer.py +607 -0
- cndb-0.1.6/tests/test_cndb_smoke.py +23 -0
- cndb-0.1.6/tests/test_collaboration.py +247 -0
- cndb-0.1.6/tests/test_comments_audit.py +240 -0
- cndb-0.1.6/tests/test_config.py +73 -0
- cndb-0.1.6/tests/test_cov_core.py +228 -0
- cndb-0.1.6/tests/test_cov_field_types.py +113 -0
- cndb-0.1.6/tests/test_cov_fields_router.py +138 -0
- cndb-0.1.6/tests/test_cov_links_ddl.py +511 -0
- cndb-0.1.6/tests/test_cov_links_internal.py +99 -0
- cndb-0.1.6/tests/test_cov_query_links.py +176 -0
- cndb-0.1.6/tests/test_cov_records_edge.py +68 -0
- cndb-0.1.6/tests/test_cov_routers_records.py +129 -0
- cndb-0.1.6/tests/test_cov_sprint.py +362 -0
- cndb-0.1.6/tests/test_cov_trash_routers.py +158 -0
- cndb-0.1.6/tests/test_coverage_patch.py +385 -0
- cndb-0.1.6/tests/test_coverage_sprint.py +494 -0
- cndb-0.1.6/tests/test_d4_trash_access_audit.py +473 -0
- cndb-0.1.6/tests/test_database.py +44 -0
- cndb-0.1.6/tests/test_edge_patch.py +192 -0
- cndb-0.1.6/tests/test_field_types.py +250 -0
- cndb-0.1.6/tests/test_fields_import.py +1063 -0
- cndb-0.1.6/tests/test_filter_sort_api.py +657 -0
- cndb-0.1.6/tests/test_framework_routes.py +39 -0
- cndb-0.1.6/tests/test_health_plugin.py +28 -0
- cndb-0.1.6/tests/test_import_api.py +333 -0
- cndb-0.1.6/tests/test_import_api_config.py +394 -0
- cndb-0.1.6/tests/test_import_csv_api.py +140 -0
- cndb-0.1.6/tests/test_import_pipeline.py +1425 -0
- cndb-0.1.6/tests/test_import_tasks.py +352 -0
- cndb-0.1.6/tests/test_links_cov_more.py +238 -0
- cndb-0.1.6/tests/test_links_e2e.py +125 -0
- cndb-0.1.6/tests/test_models.py +92 -0
- cndb-0.1.6/tests/test_permissions_api.py +137 -0
- cndb-0.1.6/tests/test_plugin_registry.py +198 -0
- cndb-0.1.6/tests/test_plugins_base.py +60 -0
- cndb-0.1.6/tests/test_query_filter.py +609 -0
- cndb-0.1.6/tests/test_reports_plugin.py +548 -0
- cndb-0.1.6/tests/test_restore.py +363 -0
- cndb-0.1.6/tests/test_roles_e2e.py +531 -0
- cndb-0.1.6/tests/test_runner.py +300 -0
- cndb-0.1.6/tests/test_security.py +36 -0
- cndb-0.1.6/tests/test_smart_color.py +195 -0
- cndb-0.1.6/tests/test_spa_fallback.py +159 -0
- cndb-0.1.6/tests/test_table_members.py +401 -0
- cndb-0.1.6/tests/test_tables_coverage.py +557 -0
- cndb-0.1.6/tests/test_tables_integration.py +783 -0
- cndb-0.1.6/tests/test_tables_plugin.py +279 -0
- cndb-0.1.6/tests/test_transfer_csv_infer.py +134 -0
- cndb-0.1.6/tests/test_user_preferences.py +236 -0
- cndb-0.1.6/tests/test_views_api.py +823 -0
- cndb-0.1.6/tests/test_wechat_auth_plugin.py +319 -0
- cndb-0.1.6/tests/test_workspaces_plugin.py +900 -0
- cndb-0.1.6/tox.ini +21 -0
- cndb-0.1.6/uv.lock +2057 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[tool.bumpversion]
|
|
2
|
+
current_version = "0.1.6"
|
|
3
|
+
commit = true
|
|
4
|
+
exclude = ["template/*"]
|
|
5
|
+
message = "chore: 更新版本 {current_version} → {new_version}"
|
|
6
|
+
tag = true
|
|
7
|
+
tag_name = "v{new_version}"
|
|
8
|
+
|
|
9
|
+
[[tool.bumpversion.files]]
|
|
10
|
+
filename = "pyproject.toml"
|
|
11
|
+
regex = true
|
|
12
|
+
search = '(version\s+=\s+)"{current_version}"'
|
|
13
|
+
replace = '\1"{new_version}"'
|
|
14
|
+
|
|
15
|
+
[[tool.bumpversion.files]]
|
|
16
|
+
filename = "src/cndb/__init__.py"
|
|
17
|
+
search = '__version__ = "{current_version}"'
|
|
18
|
+
replace = '__version__ = "{new_version}"'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changes here will be overwritten by Copier
|
|
2
|
+
_commit: v1.0.4
|
|
3
|
+
_src_path: https://gitee.com/gooker_young/coopie.git
|
|
4
|
+
author_email: gooker_young@qq.com
|
|
5
|
+
author_name: gookeryoung
|
|
6
|
+
coverage_fail_under: 95
|
|
7
|
+
description: Template for python web apps.
|
|
8
|
+
license: MIT
|
|
9
|
+
max_python_version: '3.14'
|
|
10
|
+
min_python_version: '3.13'
|
|
11
|
+
package_name: cndb
|
|
12
|
+
project_name: cndb
|
|
13
|
+
project_type: web
|
|
14
|
+
use_cicd: true
|
|
15
|
+
use_docker: true
|
|
16
|
+
use_docs: true
|
|
17
|
+
use_domestic_mirrors: true
|
|
18
|
+
use_tox: true
|
|
19
|
+
|
cndb-0.1.6/.coveragerc
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[run]
|
|
2
|
+
branch = true
|
|
3
|
+
concurrency = thread
|
|
4
|
+
omit = tests/*,src/cndb/seed.py,src/cndb/backup.py,src/cndb/restore.py,src/cndb/plugins/tables/routers/files.py
|
|
5
|
+
source = cndb
|
|
6
|
+
|
|
7
|
+
[report]
|
|
8
|
+
fail_under = 95
|
|
9
|
+
exclude_lines =
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
if __name__ == .__main__.:
|
|
12
|
+
pragma: no cover
|
|
13
|
+
raise NotImplementedError
|
|
14
|
+
show_missing = true
|
cndb-0.1.6/.dockerignore
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# 版本控制
|
|
2
|
+
.git
|
|
3
|
+
.gitignore
|
|
4
|
+
.github
|
|
5
|
+
|
|
6
|
+
# Python 缓存与构建产物
|
|
7
|
+
__pycache__
|
|
8
|
+
*.pyc
|
|
9
|
+
*.pyo
|
|
10
|
+
*.pyd
|
|
11
|
+
*.egg-info
|
|
12
|
+
*.egg
|
|
13
|
+
dist/*.tar.gz # 仅排除 sdist,保留 dist/*.whl 供 wheel 部署镜像使用
|
|
14
|
+
build
|
|
15
|
+
.eggs
|
|
16
|
+
|
|
17
|
+
# 测试与覆盖率
|
|
18
|
+
.pytest_cache
|
|
19
|
+
.coverage
|
|
20
|
+
htmlcov
|
|
21
|
+
.tox
|
|
22
|
+
coverage.xml
|
|
23
|
+
|
|
24
|
+
# 虚拟环境
|
|
25
|
+
.venv
|
|
26
|
+
venv
|
|
27
|
+
env
|
|
28
|
+
|
|
29
|
+
# 工具缓存
|
|
30
|
+
.uv-cache
|
|
31
|
+
.ruff_cache
|
|
32
|
+
.pyrefly_cache
|
|
33
|
+
.mypy_cache
|
|
34
|
+
|
|
35
|
+
# IDE 与编辑器
|
|
36
|
+
.idea
|
|
37
|
+
.vscode
|
|
38
|
+
*.swp
|
|
39
|
+
*.swo
|
|
40
|
+
|
|
41
|
+
# 文档(按需保留)
|
|
42
|
+
docs
|
|
43
|
+
|
|
44
|
+
# 系统文件
|
|
45
|
+
.DS_Store
|
|
46
|
+
Thumbs.db
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Git 行尾规范化
|
|
2
|
+
# 默认所有文本文件使用 LF 行尾(跨平台一致)
|
|
3
|
+
* text=auto eol=lf
|
|
4
|
+
|
|
5
|
+
# Windows 脚本使用 CRLF
|
|
6
|
+
*.bat text eol=crlf
|
|
7
|
+
*.cmd text eol=crlf
|
|
8
|
+
*.ps1 text eol=crlf
|
|
9
|
+
|
|
10
|
+
# 二进制文件(不做行尾转换)
|
|
11
|
+
*.png binary
|
|
12
|
+
*.jpg binary
|
|
13
|
+
*.jpeg binary
|
|
14
|
+
*.gif binary
|
|
15
|
+
*.ico binary
|
|
16
|
+
*.icns binary
|
|
17
|
+
*.pdf binary
|
|
18
|
+
*.zip binary
|
|
19
|
+
*.gz binary
|
|
20
|
+
*.tar binary
|
|
21
|
+
*.tgz binary
|
|
22
|
+
*.whl binary
|
|
23
|
+
*.egg binary
|
|
24
|
+
*.pyc binary
|
|
25
|
+
*.pyo binary
|
|
26
|
+
*.so binary
|
|
27
|
+
*.dll binary
|
|
28
|
+
*.dylib binary
|
|
29
|
+
*.qrc binary
|
|
30
|
+
*.qss binary
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, develop]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, develop]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
lint:
|
|
15
|
+
name: Lint & Typecheck
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
timeout-minutes: 10
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v5
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@v8.3.2
|
|
23
|
+
with:
|
|
24
|
+
enable-cache: true
|
|
25
|
+
cache-dependency-glob: "uv.lock"
|
|
26
|
+
|
|
27
|
+
- name: Sync dependencies
|
|
28
|
+
run: uv sync --frozen --extra lint
|
|
29
|
+
|
|
30
|
+
- name: Check .gitkeep sentinels
|
|
31
|
+
run: uv run python scripts/check_gitkeep.py
|
|
32
|
+
|
|
33
|
+
- name: Ruff check
|
|
34
|
+
run: uv run ruff check src tests
|
|
35
|
+
|
|
36
|
+
- name: Ruff format check
|
|
37
|
+
run: uv run ruff format --check src tests
|
|
38
|
+
|
|
39
|
+
- name: Pyrefly check
|
|
40
|
+
run: uv run pyrefly check
|
|
41
|
+
|
|
42
|
+
frontend-check:
|
|
43
|
+
name: Frontend Check
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
timeout-minutes: 10
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@v5
|
|
48
|
+
|
|
49
|
+
- name: Install pnpm
|
|
50
|
+
uses: pnpm/action-setup@v4
|
|
51
|
+
with:
|
|
52
|
+
version: 10
|
|
53
|
+
|
|
54
|
+
- name: Setup Node
|
|
55
|
+
uses: actions/setup-node@v4
|
|
56
|
+
with:
|
|
57
|
+
node-version: "22"
|
|
58
|
+
cache: "pnpm"
|
|
59
|
+
cache-dependency-path: frontend/pnpm-lock.yaml
|
|
60
|
+
|
|
61
|
+
- name: Install dependencies
|
|
62
|
+
run: cd frontend && pnpm install --frozen-lockfile
|
|
63
|
+
|
|
64
|
+
- name: Typecheck
|
|
65
|
+
run: cd frontend && pnpm typecheck
|
|
66
|
+
|
|
67
|
+
- name: ESLint
|
|
68
|
+
run: cd frontend && pnpm lint
|
|
69
|
+
|
|
70
|
+
test:
|
|
71
|
+
name: Test (Python 3.13 & 3.14)
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
timeout-minutes: 15
|
|
74
|
+
strategy:
|
|
75
|
+
fail-fast: false
|
|
76
|
+
matrix:
|
|
77
|
+
python-version: ["3.13", "3.14"]
|
|
78
|
+
steps:
|
|
79
|
+
- uses: actions/checkout@v5
|
|
80
|
+
|
|
81
|
+
- name: Install uv
|
|
82
|
+
uses: astral-sh/setup-uv@v8.3.2
|
|
83
|
+
with:
|
|
84
|
+
enable-cache: true
|
|
85
|
+
cache-dependency-glob: "uv.lock"
|
|
86
|
+
|
|
87
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
88
|
+
run: uv python install ${{ matrix.python-version }}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
- name: Sync dependencies
|
|
93
|
+
run: uv sync --frozen --extra test --python ${{ matrix.python-version }}
|
|
94
|
+
|
|
95
|
+
- name: Run tests
|
|
96
|
+
run: uv run pytest -m "not slow" --cov=cndb --cov-fail-under=95 --cov-report=term-missing -n auto
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ['v*.*.*']
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
id-token: write
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: release-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: false
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
release:
|
|
17
|
+
name: Build & Publish
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
environment: pypi
|
|
20
|
+
timeout-minutes: 10
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v5
|
|
23
|
+
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@v8.3.2
|
|
26
|
+
with:
|
|
27
|
+
enable-cache: true
|
|
28
|
+
cache-dependency-glob: "uv.lock"
|
|
29
|
+
|
|
30
|
+
- name: Install pnpm
|
|
31
|
+
uses: pnpm/action-setup@v4
|
|
32
|
+
with:
|
|
33
|
+
version: 10
|
|
34
|
+
|
|
35
|
+
- name: Set up Node.js
|
|
36
|
+
uses: actions/setup-node@v4
|
|
37
|
+
with:
|
|
38
|
+
node-version: '22'
|
|
39
|
+
cache: 'pnpm'
|
|
40
|
+
cache-dependency-path: frontend/pnpm-lock.yaml
|
|
41
|
+
|
|
42
|
+
- name: Build frontend
|
|
43
|
+
run: |
|
|
44
|
+
cd frontend
|
|
45
|
+
pnpm install --frozen-lockfile
|
|
46
|
+
pnpm build
|
|
47
|
+
|
|
48
|
+
- name: Check .gitkeep sentinels
|
|
49
|
+
run: python scripts/check_gitkeep.py
|
|
50
|
+
|
|
51
|
+
- name: Build distributions
|
|
52
|
+
run: uv build
|
|
53
|
+
|
|
54
|
+
- name: Publish to PyPI (OIDC)
|
|
55
|
+
run: uv publish
|
|
56
|
+
|
|
57
|
+
- name: Create GitHub Release
|
|
58
|
+
env:
|
|
59
|
+
GH_TOKEN: ${{ github.token }}
|
|
60
|
+
TAG_NAME: ${{ github.ref_name }}
|
|
61
|
+
run: |
|
|
62
|
+
gh release create "$TAG_NAME" \
|
|
63
|
+
--title "Release $TAG_NAME" \
|
|
64
|
+
--generate-notes \
|
|
65
|
+
dist/*
|
cndb-0.1.6/.gitignore
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv
|
|
11
|
+
|
|
12
|
+
# 测试与覆盖率
|
|
13
|
+
.coverage
|
|
14
|
+
.coverage.*
|
|
15
|
+
htmlcov/
|
|
16
|
+
coverage.xml
|
|
17
|
+
.tox/
|
|
18
|
+
|
|
19
|
+
# 工具缓存
|
|
20
|
+
.ruff_cache/
|
|
21
|
+
.pyrefly_cache/
|
|
22
|
+
.mypy_cache/
|
|
23
|
+
.uv-cache/
|
|
24
|
+
|
|
25
|
+
# IDE
|
|
26
|
+
.idea/
|
|
27
|
+
*_profile.html
|
|
28
|
+
|
|
29
|
+
# 环境变量与凭证(勿提交)
|
|
30
|
+
.env
|
|
31
|
+
.env.*
|
|
32
|
+
|
|
33
|
+
# Sphinx 文档构建输出
|
|
34
|
+
docs/_build/
|
|
35
|
+
.trae/
|
|
36
|
+
!.trae/ideas/*
|
|
37
|
+
*.py.bak
|
|
38
|
+
src/cndb/static/*
|
|
39
|
+
!src/cndb/static/.gitkeep
|
|
40
|
+
|
|
41
|
+
*.db
|
|
42
|
+
|
|
43
|
+
# Playwright E2E
|
|
44
|
+
frontend/.auth/
|
|
45
|
+
frontend/playwright-report/
|
|
46
|
+
frontend/test-results/
|
|
47
|
+
|
|
48
|
+
# 前端冗余 lock 文件(已用 pnpm,不再用 npm)
|
|
49
|
+
frontend/package-lock.json
|
|
50
|
+
*.bak
|
|
51
|
+
uploads
|
|
52
|
+
.trae-html-share-packages/*
|
|
53
|
+
backup-*.tar.gz
|
|
54
|
+
.pnpm-store
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# prek / pre-commit 配置
|
|
2
|
+
# See https://pre-commit.com for more information
|
|
3
|
+
repos:
|
|
4
|
+
# 本地钩子:保护关键 .gitkeep 文件(缺失会导致 hatchling force-include /
|
|
5
|
+
# Sphinx html_static_path 在 CI 上直接 FileNotFoundError)
|
|
6
|
+
- repo: local
|
|
7
|
+
hooks:
|
|
8
|
+
- id: gitkeep-check
|
|
9
|
+
name: 校验关键 .gitkeep 文件
|
|
10
|
+
entry: python scripts/check_gitkeep.py
|
|
11
|
+
language: python
|
|
12
|
+
pass_filenames: false
|
|
13
|
+
always_run: true
|
|
14
|
+
|
|
15
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
16
|
+
# Ruff 版本 - 与 pyproject.toml 保持同步
|
|
17
|
+
rev: v0.15.21
|
|
18
|
+
hooks:
|
|
19
|
+
# 运行 linter
|
|
20
|
+
- id: ruff
|
|
21
|
+
args: [--fix, --exit-non-zero-on-fix]
|
|
22
|
+
# 运行格式化
|
|
23
|
+
- id: ruff-format
|
|
24
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
25
|
+
rev: v5.0.0
|
|
26
|
+
hooks:
|
|
27
|
+
- id: check-merge-conflict
|
|
28
|
+
- id: debug-statements
|
|
29
|
+
- id: fix-byte-order-marker
|
|
30
|
+
- id: trailing-whitespace
|
|
31
|
+
args: [--markdown-linebreak-ext=md]
|
|
32
|
+
- id: end-of-file-fixer
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# ReadTheDocs 配置
|
|
2
|
+
# https://docs.readthedocs.io/en/stable/config-file/v2.html
|
|
3
|
+
version: 2
|
|
4
|
+
|
|
5
|
+
# 构建配置
|
|
6
|
+
build:
|
|
7
|
+
os: ubuntu-24.04
|
|
8
|
+
tools:
|
|
9
|
+
python: "3.13"
|
|
10
|
+
|
|
11
|
+
# Python 依赖与构建命令
|
|
12
|
+
python:
|
|
13
|
+
install:
|
|
14
|
+
- method: pip
|
|
15
|
+
path: .
|
|
16
|
+
extra_requirements:
|
|
17
|
+
- docs
|
|
18
|
+
|
|
19
|
+
# Sphinx 构建
|
|
20
|
+
sphinx:
|
|
21
|
+
configuration: docs/conf.py
|
|
22
|
+
builder: html
|
|
23
|
+
fail_on_warning: false
|
cndb-0.1.6/CHANGELOG.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
4
|
+
|
|
5
|
+
## [0.1.2] — 2026-09-11
|
|
6
|
+
|
|
7
|
+
### 新增
|
|
8
|
+
|
|
9
|
+
- **Playwright E2E 测试**:smoke(登录 → Grid → 退出)+ critical(行 CRUD 全链路),配置见 `frontend/playwright.config.ts`
|
|
10
|
+
- **生产部署定型**:多阶段 `deploy/Dockerfile`(前端构建 + uvicorn)+ `deploy/nginx.conf` 反代 + `docker-compose.yml` 生产编排(SQLite/PostgreSQL 双形态)
|
|
11
|
+
- **示例数据集**:`examples/datasets/` 5 个 CSV(学生成绩 / 电商销售 / 房价预测 / 客户流失 / 气温天气)
|
|
12
|
+
- **`.env.example`**:部署环境变量模板
|
|
13
|
+
|
|
14
|
+
### 变更
|
|
15
|
+
|
|
16
|
+
- docker-compose.yml 从开发形态更新为生产形态(nginx 入口 + app 容器 + pg profile)
|
|
17
|
+
- `.gitignore` 添加 Playwright 产物目录
|
|
18
|
+
|
|
19
|
+
## [0.1.1] — 2026-09-11
|
|
20
|
+
|
|
21
|
+
### 新增
|
|
22
|
+
|
|
23
|
+
- 前端完成 F1–F9:登录注册 / 工作区 / Grid inline 编辑 / 视图 Tab / 导入导出 / 成员管理 / 主题切换 / 关系图 / 报表 / 公开分享页
|
|
24
|
+
- SPA fallback:`app.py` 中间件自动处理前端路由回退
|
|
25
|
+
- 前端构建产物挂载到 `src/cndb/static/`,uvicorn 统一提供
|
|
26
|
+
|
|
27
|
+
### 变更
|
|
28
|
+
|
|
29
|
+
- RowResponse 类型对齐后端扁平结构(移除嵌套 values 字段)
|
|
30
|
+
|
|
31
|
+
## [0.1.0] — 2026-09-10
|
|
32
|
+
|
|
33
|
+
### 新增
|
|
34
|
+
|
|
35
|
+
- 后端 P0–P4 完成:框架基础 + 6 插件 + 95%+ 测试覆盖率
|
|
36
|
+
- 插件架构:accounts / workspaces / tables / reports / health
|
|
37
|
+
- 动态数据表:SQLAlchemy Core 运行时 DDL
|
|
38
|
+
- link 字段多对多存储与查询
|
|
39
|
+
- 审计日志 + 回收站闭环
|
|
40
|
+
- 字段类型补齐至 11 种
|
cndb-0.1.6/Dockerfile
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# CI/容器化用 Dockerfile
|
|
2
|
+
# 使用国内镜像源拉取基础镜像(如不需要可替换为官方镜像)
|
|
3
|
+
# 备选镜像源前缀:docker.1ms.run / dockerpull.com / docker.xuanyuan.me
|
|
4
|
+
FROM docker.m.daocloud.io/python:3.14-slim
|
|
5
|
+
|
|
6
|
+
# ---- 国内镜像源 ----
|
|
7
|
+
ENV PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
|
|
8
|
+
ENV PIP_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn
|
|
9
|
+
ENV UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
|
|
10
|
+
ENV UV_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn
|
|
11
|
+
|
|
12
|
+
# 环境变量:非交互 + 路径配置
|
|
13
|
+
ENV DEBIAN_FRONTEND=noninteractive \
|
|
14
|
+
LANG=C.UTF-8 \
|
|
15
|
+
LC_ALL=C.UTF-8 \
|
|
16
|
+
UV_LINK_MODE=copy \
|
|
17
|
+
UV_CACHE_DIR=/uv-cache \
|
|
18
|
+
UV_PROJECT_ENVIRONMENT=/opt/venv \
|
|
19
|
+
PATH="/opt/venv/bin:${PATH}"
|
|
20
|
+
|
|
21
|
+
# 配置 apt 国内镜像(阿里云)并安装系统依赖
|
|
22
|
+
RUN sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources \
|
|
23
|
+
&& apt-get update \
|
|
24
|
+
&& apt-get install -y --no-install-recommends \
|
|
25
|
+
ca-certificates \
|
|
26
|
+
curl \
|
|
27
|
+
git \
|
|
28
|
+
build-essential \
|
|
29
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# 安装 uv(国内镜像)
|
|
33
|
+
RUN pip install --no-cache-dir uv -i https://mirrors.aliyun.com/pypi/simple/
|
|
34
|
+
|
|
35
|
+
# 预装项目所需 Python 版本
|
|
36
|
+
RUN uv python install 3.13 3.14
|
|
37
|
+
|
|
38
|
+
# 预装项目 dev 依赖(仅复制依赖描述文件,利用 Docker 层缓存)
|
|
39
|
+
WORKDIR /workspace
|
|
40
|
+
COPY pyproject.toml tox.ini README.md ./
|
|
41
|
+
COPY src/ ./src/
|
|
42
|
+
|
|
43
|
+
# 同步依赖到 /opt/venv(CI 时直接复用)
|
|
44
|
+
RUN uv sync --frozen --no-install-project 2>/dev/null || uv sync --no-install-project
|
|
45
|
+
|
|
46
|
+
# 持久化 uv 缓存目录(CI 可挂载到宿主机加速)
|
|
47
|
+
VOLUME ["/uv-cache"]
|
|
48
|
+
|
|
49
|
+
# 默认入口
|
|
50
|
+
CMD ["/bin/bash"]
|
cndb-0.1.6/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 gookeryoung
|
|
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.
|
cndb-0.1.6/Makefile
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Makefile - cndb 项目快捷命令
|
|
2
|
+
# 运行 `make help` 查看所有可用命令
|
|
3
|
+
|
|
4
|
+
PACKAGE := cndb
|
|
5
|
+
COV_THRESHOLD := 95
|
|
6
|
+
PYTEST_JOBS := 8 # pytest-xdist 并行进程数;Windows 默认 8 避免句柄耗尽
|
|
7
|
+
|
|
8
|
+
# push / bump 默认依赖 check,可用 SKIP_CHECK=1 临时跳过(仅限紧急修复,发布场景禁止使用)
|
|
9
|
+
CHECK_DEPS := $(if $(SKIP_CHECK),,check)
|
|
10
|
+
|
|
11
|
+
.PHONY: help sync frontend-build frontend-sync frontend-lint frontend-typecheck frontend-check build b clean c test cov lint typecheck check-fast check doc tox pub bump patch minor major push e2e
|
|
12
|
+
|
|
13
|
+
help: ## 显示帮助信息
|
|
14
|
+
@uv run python -c "import sys; sys.stdout.reconfigure(encoding='utf-8', errors='replace'); import re;ms=[(m.group(1),m.group(2).strip()) for f in sys.argv[1:] for l in open(f,encoding='utf-8') if (m:=re.match(r'^([a-zA-Z][\w -]*):.*?##\s*(.*)',l))];[print(f' {n:<14} {d}') for n,d in ms]" $(MAKEFILE_LIST)
|
|
15
|
+
|
|
16
|
+
sync: ## 安装开发依赖
|
|
17
|
+
uv sync --extra dev
|
|
18
|
+
|
|
19
|
+
frontend-sync: ## 安装前端依赖(pnpm install,惰性:node_modules 已存在则跳过)
|
|
20
|
+
@uv run python -c "import sys; sys.stdout.reconfigure(encoding='utf-8', errors='replace'); import os,subprocess;\
|
|
21
|
+
print('[frontend] node_modules 已存在,跳过 install') if os.path.isdir('frontend/node_modules') else (\
|
|
22
|
+
print('[frontend] node_modules 不存在,开始 pnpm install...'),\
|
|
23
|
+
subprocess.run(['pnpm','install','--frozen-lockfile'],cwd='frontend',check=True))"
|
|
24
|
+
|
|
25
|
+
frontend-lint: frontend-sync ## 前端 ESLint 检查
|
|
26
|
+
cd frontend && pnpm lint
|
|
27
|
+
|
|
28
|
+
frontend-typecheck: frontend-sync ## 前端 TypeScript 类型检查
|
|
29
|
+
cd frontend && pnpm typecheck
|
|
30
|
+
|
|
31
|
+
frontend-check: frontend-typecheck frontend-lint ## 前端门禁(typecheck + lint)
|
|
32
|
+
|
|
33
|
+
frontend-build: frontend-sync ## 构建前端(Vite,产物输出到 src/cndb/static/)
|
|
34
|
+
cd frontend && pnpm build
|
|
35
|
+
|
|
36
|
+
build b: frontend-build ## 构建分发包 (前端 → wheel + sdist)
|
|
37
|
+
uv build
|
|
38
|
+
|
|
39
|
+
clean c: ## 清理构建产物与缓存
|
|
40
|
+
@uv run python -c "import sys; sys.stdout.reconfigure(encoding='utf-8', errors='replace'); import shutil,pathlib,glob;\
|
|
41
|
+
pts=['build','dist','wheels','*.egg-info','htmlcov','.coverage','.coverage.*','coverage.xml','docs/_build','.tox','.ruff_cache','.pyrefly_cache','.mypy_cache'];\
|
|
42
|
+
[shutil.rmtree(m,ignore_errors=True) if pathlib.Path(m).is_dir() else pathlib.Path(m).unlink(missing_ok=True) for p in pts for m in glob.glob(p)];\
|
|
43
|
+
[shutil.rmtree(d,ignore_errors=True) for base in ('src','tests') for d in pathlib.Path(base).rglob('__pycache__')];\
|
|
44
|
+
[f.unlink(missing_ok=True) for base in ('src','tests') for f in pathlib.Path(base).rglob('*') if f.suffix in ('.pyc','.pyo')]"
|
|
45
|
+
|
|
46
|
+
test: ## 运行测试(不含覆盖率)
|
|
47
|
+
uv run pytest -m "not slow" -n $(PYTEST_JOBS)
|
|
48
|
+
|
|
49
|
+
cov: ## 运行测试并生成 HTML 覆盖率报告
|
|
50
|
+
uv run pytest --cov --cov-report=term --cov-fail-under=$(COV_THRESHOLD) --cov-report=html -n $(PYTEST_JOBS)
|
|
51
|
+
@uv run python -c "import sys; sys.stdout.reconfigure(encoding='utf-8', errors='replace'); print('Coverage report: htmlcov/index.html')"
|
|
52
|
+
|
|
53
|
+
e2e: frontend-sync ## 前端 E2E 测试(Playwright;需后端已启动)
|
|
54
|
+
cd frontend && pnpm e2e
|
|
55
|
+
|
|
56
|
+
gitkeep-check: ## 校验关键 .gitkeep 文件(缺失会导致 CI/打包失败)
|
|
57
|
+
uv run python scripts/check_gitkeep.py
|
|
58
|
+
|
|
59
|
+
lint: ## 代码风格检查 (ruff, 与 CI 对齐仅扫 src + tests)
|
|
60
|
+
uv run ruff check src tests
|
|
61
|
+
uv run ruff format --check src tests
|
|
62
|
+
|
|
63
|
+
typecheck: ## 类型检查 (pyrefly)
|
|
64
|
+
uv run pyrefly check
|
|
65
|
+
|
|
66
|
+
check-fast: gitkeep-check lint typecheck frontend-check ## 轻量门禁(不含覆盖率,适合日常快速验证)
|
|
67
|
+
|
|
68
|
+
check: check-fast cov ## 运行全套门禁 (gitkeep + lint + typecheck + frontend-check + cov)
|
|
69
|
+
|
|
70
|
+
doc: ## 构建 Sphinx 文档
|
|
71
|
+
uv run sphinx-build -b html docs docs/_build/html
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
tox: ## 多版本测试 (tox)
|
|
75
|
+
uvx tox -p auto
|
|
76
|
+
|
|
77
|
+
BUMP_PART := $(filter-out bump,$(MAKECMDGOALS))
|
|
78
|
+
|
|
79
|
+
bump: $(CHECK_DEPS) ## 版本号 bump (默认 patch,用法: make bump [minor|major])
|
|
80
|
+
@uvx bump-my-version bump $(if $(BUMP_PART),$(firstword $(BUMP_PART)),patch) --tag
|
|
81
|
+
|
|
82
|
+
patch minor major:
|
|
83
|
+
@:
|
|
84
|
+
|
|
85
|
+
pub: ## 推送到pypi
|
|
86
|
+
uvx twine upload ./dist/**
|
|
87
|
+
|
|
88
|
+
push: $(CHECK_DEPS) ## 推送代码到所有远程仓库
|
|
89
|
+
@uv run python -c "import sys; sys.stdout.reconfigure(encoding='utf-8', errors='replace'); import subprocess as sp; [print(f'\u63a8\u9001 {r}...',flush=True) or (sp.run(['git','push',r],check=True) and sp.run(['git','push',r,'--tags'],check=True)) for r in sp.check_output(['git','remote'],text=True).split()]"
|
|
90
|
+
|