scitex-db 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. scitex_db-0.1.0/.github/workflows/cla.yml +33 -0
  2. scitex_db-0.1.0/.github/workflows/publish-pypi.yml +27 -0
  3. scitex_db-0.1.0/.github/workflows/test.yml +27 -0
  4. scitex_db-0.1.0/.gitignore +21 -0
  5. scitex_db-0.1.0/CLA.md +80 -0
  6. scitex_db-0.1.0/CONTRIBUTING.md +69 -0
  7. scitex_db-0.1.0/LICENSE +661 -0
  8. scitex_db-0.1.0/PKG-INFO +203 -0
  9. scitex_db-0.1.0/README.md +159 -0
  10. scitex_db-0.1.0/pyproject.toml +93 -0
  11. scitex_db-0.1.0/src/scitex_db/README.md +281 -0
  12. scitex_db-0.1.0/src/scitex_db/_BaseMixins/_BaseBackupMixin.py +30 -0
  13. scitex_db-0.1.0/src/scitex_db/_BaseMixins/_BaseBatchMixin.py +31 -0
  14. scitex_db-0.1.0/src/scitex_db/_BaseMixins/_BaseBlobMixin.py +81 -0
  15. scitex_db-0.1.0/src/scitex_db/_BaseMixins/_BaseConnectionMixin.py +43 -0
  16. scitex_db-0.1.0/src/scitex_db/_BaseMixins/_BaseImportExportMixin.py +39 -0
  17. scitex_db-0.1.0/src/scitex_db/_BaseMixins/_BaseIndexMixin.py +29 -0
  18. scitex_db-0.1.0/src/scitex_db/_BaseMixins/_BaseMaintenanceMixin.py +33 -0
  19. scitex_db-0.1.0/src/scitex_db/_BaseMixins/_BaseQueryMixin.py +52 -0
  20. scitex_db-0.1.0/src/scitex_db/_BaseMixins/_BaseRowMixin.py +32 -0
  21. scitex_db-0.1.0/src/scitex_db/_BaseMixins/_BaseSchemaMixin.py +44 -0
  22. scitex_db-0.1.0/src/scitex_db/_BaseMixins/_BaseTableMixin.py +66 -0
  23. scitex_db-0.1.0/src/scitex_db/_BaseMixins/_BaseTransactionMixin.py +52 -0
  24. scitex_db-0.1.0/src/scitex_db/_BaseMixins/__init__.py +30 -0
  25. scitex_db-0.1.0/src/scitex_db/__init__.py +41 -0
  26. scitex_db-0.1.0/src/scitex_db/__main__.py +75 -0
  27. scitex_db-0.1.0/src/scitex_db/_check_health.py +381 -0
  28. scitex_db-0.1.0/src/scitex_db/_delete_duplicates.py +36 -0
  29. scitex_db-0.1.0/src/scitex_db/_inspect.py +384 -0
  30. scitex_db-0.1.0/src/scitex_db/_inspect_optimized.py +301 -0
  31. scitex_db-0.1.0/src/scitex_db/_postgresql/_PostgreSQL.py +126 -0
  32. scitex_db-0.1.0/src/scitex_db/_postgresql/_PostgreSQLMixins/_BackupMixin.py +166 -0
  33. scitex_db-0.1.0/src/scitex_db/_postgresql/_PostgreSQLMixins/_BatchMixin.py +82 -0
  34. scitex_db-0.1.0/src/scitex_db/_postgresql/_PostgreSQLMixins/_BlobMixin.py +231 -0
  35. scitex_db-0.1.0/src/scitex_db/_postgresql/_PostgreSQLMixins/_ConnectionMixin.py +92 -0
  36. scitex_db-0.1.0/src/scitex_db/_postgresql/_PostgreSQLMixins/_ImportExportMixin.py +59 -0
  37. scitex_db-0.1.0/src/scitex_db/_postgresql/_PostgreSQLMixins/_IndexMixin.py +64 -0
  38. scitex_db-0.1.0/src/scitex_db/_postgresql/_PostgreSQLMixins/_MaintenanceMixin.py +175 -0
  39. scitex_db-0.1.0/src/scitex_db/_postgresql/_PostgreSQLMixins/_QueryMixin.py +108 -0
  40. scitex_db-0.1.0/src/scitex_db/_postgresql/_PostgreSQLMixins/_RowMixin.py +75 -0
  41. scitex_db-0.1.0/src/scitex_db/_postgresql/_PostgreSQLMixins/_SchemaMixin.py +126 -0
  42. scitex_db-0.1.0/src/scitex_db/_postgresql/_PostgreSQLMixins/_TableMixin.py +176 -0
  43. scitex_db-0.1.0/src/scitex_db/_postgresql/_PostgreSQLMixins/_TransactionMixin.py +57 -0
  44. scitex_db-0.1.0/src/scitex_db/_postgresql/_PostgreSQLMixins/__init__.py +34 -0
  45. scitex_db-0.1.0/src/scitex_db/_postgresql/__init__.py +6 -0
  46. scitex_db-0.1.0/src/scitex_db/_sqlite3/README.md +191 -0
  47. scitex_db-0.1.0/src/scitex_db/_sqlite3/README_v01.md +126 -0
  48. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3.py +210 -0
  49. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/_ArrayMixin.py +581 -0
  50. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/_ArrayMixin_v01-need-_hash-col.py +517 -0
  51. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/_BatchMixin.py +243 -0
  52. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/_BlobMixin.py +281 -0
  53. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/_ColumnMixin.py +548 -0
  54. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/_ColumnMixin_v01-indentation-issues.py +583 -0
  55. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/_ConnectionMixin.py +124 -0
  56. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/_GitMixin.py +583 -0
  57. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/_ImportExportMixin.py +80 -0
  58. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/_IndexMixin.py +32 -0
  59. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/_MaintenanceMixin.py +177 -0
  60. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/_QueryMixin.py +110 -0
  61. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/_RowMixin.py +115 -0
  62. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/_TableMixin.py +229 -0
  63. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/_TransactionMixin.py +71 -0
  64. scitex_db-0.1.0/src/scitex_db/_sqlite3/_SQLite3Mixins/__init__.py +42 -0
  65. scitex_db-0.1.0/src/scitex_db/_sqlite3/__init__.py +7 -0
  66. scitex_db-0.1.0/src/scitex_db/_sqlite3/_delete_duplicates.py +274 -0
  67. scitex_db-0.1.0/src/scitex_db/_utils.py +28 -0
@@ -0,0 +1,33 @@
1
+ name: CLA Assistant
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_target:
7
+ types: [opened, closed, synchronize]
8
+
9
+ permissions:
10
+ actions: write
11
+ contents: write
12
+ pull-requests: write
13
+ statuses: write
14
+
15
+ jobs:
16
+ CLAssistant:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: CLA Assistant
20
+ uses: contributor-assistant/github-action@v2.6.1
21
+ env:
22
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23
+ PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
24
+ with:
25
+ path-to-signatures: "signatures/cla.json"
26
+ path-to-document: "https://github.com/ywatanabe1989/scitex-db/blob/main/CLA.md"
27
+ branch: "cla-signatures"
28
+ allowlist: bot*,ywatanabe1989
29
+ custom-allsigned-prcomment: |
30
+ Thank you for signing the SciTeX CLA. Your contribution can now be reviewed.
31
+ custom-notsigned-prcomment: |
32
+ Please sign the [SciTeX CLA](https://github.com/ywatanabe1989/scitex-db/blob/main/CLA.md) before your contribution can be merged.
33
+ Comment `I have read and agree to the SciTeX CLA.` to sign.
@@ -0,0 +1,27 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ environment:
12
+ name: pypi
13
+ url: https://pypi.org/p/scitex-db
14
+ permissions:
15
+ id-token: write
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.12"
22
+ - name: Install build tools
23
+ run: pip install build
24
+ - name: Build distribution
25
+ run: python -m build
26
+ - name: Publish to PyPI
27
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,27 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main, develop]
6
+ pull_request:
7
+ branches: [main, develop]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - name: Set up Python ${{ matrix.python-version }}
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: ${{ matrix.python-version }}
21
+ - name: Install dependencies
22
+ run: |
23
+ python -m pip install --upgrade pip
24
+ pip install -e ".[dev]"
25
+ pip install pytest pytest-cov
26
+ - name: Run tests
27
+ run: pytest tests/
@@ -0,0 +1,21 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.so
5
+ .Python
6
+ build/
7
+ develop-eggs/
8
+ dist/
9
+ downloads/
10
+ eggs/
11
+ .eggs/
12
+ lib/
13
+ lib64/
14
+ parts/
15
+ sdist/
16
+ var/
17
+ wheels/
18
+ *.egg-info/
19
+ .installed.cfg
20
+ *.egg
21
+ MANIFEST
scitex_db-0.1.0/CLA.md ADDED
@@ -0,0 +1,80 @@
1
+ # SciTeX Contributor License Agreement (CLA)
2
+
3
+ Version 1.0 — Effective 2026-03-12
4
+
5
+ ## Purpose
6
+
7
+ SciTeX is licensed under AGPL-3.0 and follows a dual-licensing model:
8
+
9
+ - **Researchers and individuals**: Free forever under AGPL-3.0.
10
+ - **Enterprises and institutions**: Commercial license available upon request.
11
+
12
+ To maintain the ability to offer dual licensing and ensure the long-term
13
+ sustainability of the project, we ask contributors to sign this CLA before
14
+ their first contribution is merged.
15
+
16
+ ## Agreement
17
+
18
+ By submitting a pull request or other contribution to any SciTeX repository,
19
+ you agree to the following terms:
20
+
21
+ ### 1. You retain copyright
22
+
23
+ You retain full copyright ownership of your contributions.
24
+
25
+ ### 2. You grant a broad license to the project
26
+
27
+ You grant Yusuke Watanabe, and any successor entity operating the SciTeX
28
+ project (the "Project Lead"), a perpetual, worldwide, non-exclusive,
29
+ royalty-free, irrevocable license to:
30
+
31
+ - Use, reproduce, modify, and distribute your contributions.
32
+ - Sublicense your contributions under alternative licenses, including
33
+ dual-licensing for institutional and commercial use, for the purpose of
34
+ sustaining the SciTeX project.
35
+
36
+ ### 3. You confirm originality
37
+
38
+ You confirm that:
39
+
40
+ - Your contributions are your original work.
41
+ - You have the legal right to grant the above license.
42
+ - Your contributions do not infringe on third-party rights.
43
+
44
+ If any portion is based on existing work, you have disclosed the source and
45
+ confirmed its license is compatible with AGPL-3.0.
46
+
47
+ ### 4. No obligation
48
+
49
+ This agreement does not create any obligation for the Project Lead to use,
50
+ merge, or maintain your contributions.
51
+
52
+ ## How to sign
53
+
54
+ When you open your first pull request, the CLA Assistant bot will ask you to
55
+ sign electronically. This is a one-time process per contributor.
56
+
57
+ Alternatively, you may sign by adding the following statement to your pull
58
+ request description:
59
+
60
+ > I have read and agree to the [SciTeX CLA](CLA.md).
61
+
62
+ ## Why a CLA?
63
+
64
+ SciTeX aims to be free for researchers forever. A CLA ensures the project can:
65
+
66
+ - Offer institutional/campus licenses to universities and companies.
67
+ - Change licenses if needed to protect the community (e.g., against
68
+ proprietary forks).
69
+ - Provide legal clarity for institutions adopting SciTeX.
70
+
71
+ Revenue from commercial licensing accrues to the Project Lead and is used to
72
+ sustain the SciTeX project.
73
+
74
+ This is the same approach used by MongoDB, Elasticsearch, and many other
75
+ successful open-source projects with dual-licensing models.
76
+
77
+ ## Questions
78
+
79
+ If you have questions about this CLA, please open an issue or contact
80
+ ywatanabe@scitex.ai.
@@ -0,0 +1,69 @@
1
+ # Contributing to SciTeX
2
+
3
+ Thank you for your interest in contributing to SciTeX. This guide covers the
4
+ process for reporting issues, suggesting features, and submitting code.
5
+
6
+ ## Contributor License Agreement
7
+
8
+ Before your first contribution can be merged, you must agree to the
9
+ [SciTeX CLA](CLA.md). This is a one-time process. The CLA ensures that:
10
+
11
+ - You retain copyright of your work.
12
+ - The project can continue to offer dual licensing (free for researchers,
13
+ commercial for enterprises).
14
+
15
+ See [CLA.md](CLA.md) for full details.
16
+
17
+ ## Reporting Issues
18
+
19
+ - Search [existing issues](https://github.com/ywatanabe1989/scitex-db/issues)
20
+ before opening a new one.
21
+ - Include a minimal reproducible example when reporting bugs.
22
+ - Specify your Python version, OS, and `scitex-db` version.
23
+
24
+ ## Development Setup
25
+
26
+ ```bash
27
+ git clone git@github.com:ywatanabe1989/scitex-db.git
28
+ cd scitex-db
29
+ pip install -e ".[dev]"
30
+ ```
31
+
32
+ ## Branch Workflow
33
+
34
+ - `main` — stable releases only. Do not push directly.
35
+ - `develop` — integration branch. PRs target here.
36
+ - Feature branches — create from `develop`, name as `feature/<description>`.
37
+
38
+ ```bash
39
+ git checkout develop
40
+ git checkout -b feature/my-change
41
+ # ... make changes ...
42
+ git push origin feature/my-change
43
+ # Open PR targeting develop
44
+ ```
45
+
46
+ ## Code Style
47
+
48
+ - Follow existing conventions in the codebase.
49
+ - Use `_` prefix for internal/private modules and functions.
50
+ - Keep files under 512 lines.
51
+ - Run tests before submitting:
52
+
53
+ ```bash
54
+ pytest tests/ -x -q
55
+ ```
56
+
57
+ ## Pull Request Process
58
+
59
+ 1. Ensure your branch is up to date with `develop`.
60
+ 2. Write tests for new functionality.
61
+ 3. Run the test suite and confirm all tests pass.
62
+ 4. Open a PR targeting `develop` with a clear description.
63
+ 5. The CLA bot will check your CLA status on your first PR.
64
+
65
+ ## License
66
+
67
+ By contributing, you agree to the terms of the [CLA](CLA.md), which includes
68
+ licensing under AGPL-3.0 (see [LICENSE](LICENSE)) and the dual-licensing
69
+ provisions described therein.