cuvis-ai-schemas 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 (49) hide show
  1. cuvis_ai_schemas-0.1.0/.githooks/pre-commit +38 -0
  2. cuvis_ai_schemas-0.1.0/.githooks/pre-push +54 -0
  3. cuvis_ai_schemas-0.1.0/.gitignore +208 -0
  4. cuvis_ai_schemas-0.1.0/CHANGELOG.md +68 -0
  5. cuvis_ai_schemas-0.1.0/LICENSE +190 -0
  6. cuvis_ai_schemas-0.1.0/PKG-INFO +111 -0
  7. cuvis_ai_schemas-0.1.0/README.md +66 -0
  8. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/__init__.py +5 -0
  9. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/discovery/__init__.py +6 -0
  10. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/enums/__init__.py +5 -0
  11. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/enums/types.py +30 -0
  12. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/execution/__init__.py +12 -0
  13. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/execution/context.py +41 -0
  14. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/execution/monitoring.py +83 -0
  15. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/extensions/__init__.py +3 -0
  16. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/extensions/ui/__init__.py +8 -0
  17. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/extensions/ui/port_display.py +159 -0
  18. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/grpc/__init__.py +3 -0
  19. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/grpc/v1/__init__.py +11 -0
  20. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/grpc/v1/cuvis_ai_pb2.py +240 -0
  21. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/grpc/v1/cuvis_ai_pb2.pyi +1046 -0
  22. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/grpc/v1/cuvis_ai_pb2_grpc.py +1290 -0
  23. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/pipeline/__init__.py +17 -0
  24. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/pipeline/config.py +238 -0
  25. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/pipeline/ports.py +48 -0
  26. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/plugin/__init__.py +6 -0
  27. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/plugin/config.py +118 -0
  28. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/plugin/manifest.py +95 -0
  29. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/training/__init__.py +40 -0
  30. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/training/callbacks.py +137 -0
  31. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/training/config.py +135 -0
  32. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/training/data.py +73 -0
  33. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/training/optimizer.py +94 -0
  34. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/training/run.py +198 -0
  35. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/training/scheduler.py +69 -0
  36. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas/training/trainer.py +40 -0
  37. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas.egg-info/PKG-INFO +111 -0
  38. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas.egg-info/SOURCES.txt +47 -0
  39. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas.egg-info/dependency_links.txt +1 -0
  40. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas.egg-info/requires.txt +30 -0
  41. cuvis_ai_schemas-0.1.0/cuvis_ai_schemas.egg-info/top_level.txt +1 -0
  42. cuvis_ai_schemas-0.1.0/proto/cuvis_ai/grpc/v1/cuvis_ai.proto +604 -0
  43. cuvis_ai_schemas-0.1.0/pyproject.toml +180 -0
  44. cuvis_ai_schemas-0.1.0/setup.cfg +4 -0
  45. cuvis_ai_schemas-0.1.0/tests/test_imports.py +109 -0
  46. cuvis_ai_schemas-0.1.0/tests/test_pipeline.py +80 -0
  47. cuvis_ai_schemas-0.1.0/tests/test_plugin.py +80 -0
  48. cuvis_ai_schemas-0.1.0/tests/test_training.py +82 -0
  49. cuvis_ai_schemas-0.1.0/uv.lock +1490 -0
@@ -0,0 +1,38 @@
1
+ #!/bin/bash
2
+ # Pre-commit hook: Fast quality checks (linting + formatting)
3
+ # Skip with: git commit --no-verify
4
+
5
+ set -e
6
+
7
+ echo "Running pre-commit checks..."
8
+
9
+ # Get list of tracked files before running checks
10
+ TRACKED_FILES=$(git diff --name-only --cached)
11
+
12
+ # Run Ruff formatting first
13
+ echo "→ Running Ruff formatting..."
14
+ if ! uv run ruff format .; then
15
+ echo "✗ Ruff formatting failed. Please fix the errors and try again."
16
+ exit 1
17
+ fi
18
+
19
+ # Run Ruff linting with auto-fix (on formatted code)
20
+ echo "→ Running Ruff linting (with auto-fix)..."
21
+ if ! uv run ruff check . --fix; then
22
+ echo "✗ Ruff linting failed. Please fix the errors and try again."
23
+ exit 1
24
+ fi
25
+
26
+ # Auto-stage any files that were modified by Ruff
27
+ # Only re-stage files that were originally staged
28
+ if [ -n "$TRACKED_FILES" ]; then
29
+ echo "→ Auto-staging formatted files..."
30
+ echo "$TRACKED_FILES" | while read -r file; do
31
+ if [ -f "$file" ]; then
32
+ git add "$file"
33
+ fi
34
+ done
35
+ fi
36
+
37
+ echo "✓ Pre-commit checks passed!"
38
+ exit 0
@@ -0,0 +1,54 @@
1
+ #!/bin/bash
2
+ # Pre-push hook: Comprehensive quality checks (linting + formatting + docstrings + tests)
3
+ # Skip with: git push --no-verify
4
+
5
+ set -e
6
+
7
+ echo "Running pre-push checks..."
8
+
9
+ # Sync dev dependencies first
10
+ echo "→ Syncing dev dependencies..."
11
+ if ! uv sync --all-extras --dev; then
12
+ echo "✗ Dev dependency sync failed. Please check your environment."
13
+ exit 1
14
+ fi
15
+
16
+ # Run Ruff formatting first
17
+ echo "→ Running Ruff formatting..."
18
+ if ! uv run ruff format .; then
19
+ echo "✗ Ruff formatting failed. Please fix the errors and try again."
20
+ exit 1
21
+ fi
22
+
23
+ # Run Ruff linting with auto-fix (on formatted code)
24
+ echo "→ Running Ruff linting (with auto-fix)..."
25
+ if ! uv run ruff check . --fix; then
26
+ echo "✗ Ruff linting failed. Please fix the errors and try again."
27
+ exit 1
28
+ fi
29
+
30
+ # Check docstring coverage (configured in pyproject.toml)
31
+ echo "→ Checking docstring coverage..."
32
+ if ! uv run interrogate cuvis_ai_schemas/; then
33
+ echo ""
34
+ echo "✗ Docstring coverage check failed!"
35
+ echo " See configuration in pyproject.toml [tool.interrogate]"
36
+ echo ""
37
+ echo " To see detailed missing docstrings:"
38
+ echo " interrogate -vv cuvis_ai_schemas/"
39
+ echo ""
40
+ echo " To skip this check (not recommended):"
41
+ echo " git push --no-verify"
42
+ echo ""
43
+ exit 1
44
+ fi
45
+
46
+ # Run pytest with non-GPU tests
47
+ echo "→ Running pytest (excluding GPU tests)..."
48
+ if ! uv run python -m pytest tests/ -v --tb=line -m "not slow and not gpu"; then
49
+ echo "✗ Tests failed. Please fix the failing tests and try again."
50
+ exit 1
51
+ fi
52
+
53
+ echo "✓ All pre-push checks passed!"
54
+ exit 0
@@ -0,0 +1,208 @@
1
+ _build
2
+
3
+ # Created by https://www.toptal.com/developers/gitignore/api/python
4
+ # Edit at https://www.toptal.com/developers/gitignore?templates=python
5
+
6
+ ### Python ###
7
+ # Byte-compiled / optimized / DLL files
8
+ __pycache__/
9
+ *.py[cod]
10
+ *$py.class
11
+
12
+ # C extensions
13
+ *.so
14
+
15
+ # Distribution / packaging
16
+ .Python
17
+ build/
18
+ develop-eggs/
19
+ dist/
20
+ downloads/
21
+ eggs/
22
+ .eggs/
23
+ lib/
24
+ lib64/
25
+ parts/
26
+ sdist/
27
+ var/
28
+ wheels/
29
+ share/python-wheels/
30
+ *.egg-info/
31
+ .installed.cfg
32
+ *.egg
33
+ MANIFEST
34
+
35
+ # PyInstaller
36
+ # Usually these files are written by a python script from a template
37
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
38
+ *.manifest
39
+ *.spec
40
+
41
+ # Installer logs
42
+ pip-log.txt
43
+ pip-delete-this-directory.txt
44
+
45
+ # Unit test / coverage reports
46
+ htmlcov/
47
+ .tox/
48
+ .nox/
49
+ .coverage
50
+ .coverage.*
51
+ .cache
52
+ nosetests.xml
53
+ coverage.xml
54
+ *.cover
55
+ *.py,cover
56
+ .hypothesis/
57
+ .pytest_cache/
58
+ cover/
59
+
60
+ # Translations
61
+ *.mo
62
+ *.pot
63
+
64
+ # Django stuff:
65
+ *.log
66
+ local_settings.py
67
+ db.sqlite3
68
+ db.sqlite3-journal
69
+
70
+ # Flask stuff:
71
+ instance/
72
+ .webassets-cache
73
+
74
+ # Scrapy stuff:
75
+ .scrapy
76
+
77
+ # Sphinx documentation
78
+ docs/_build/
79
+
80
+ # PyBuilder
81
+ .pybuilder/
82
+ target/
83
+
84
+ # Jupyter Notebook
85
+ .ipynb_checkpoints
86
+
87
+ # IPython
88
+ profile_default/
89
+ ipython_config.py
90
+
91
+ # pyenv
92
+ # For a library or package, you might want to ignore these files since the code is
93
+ # intended to run in multiple environments; otherwise, check them in:
94
+ # .python-version
95
+
96
+ # pipenv
97
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
98
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
99
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
100
+ # install all needed dependencies.
101
+ #Pipfile.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+
110
+ # pdm
111
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112
+ #pdm.lock
113
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114
+ # in version control.
115
+ # https://pdm.fming.dev/#use-with-ide
116
+ .pdm.toml
117
+
118
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
119
+ __pypackages__/
120
+
121
+ # Celery stuff
122
+ celerybeat-schedule
123
+ celerybeat.pid
124
+
125
+ # SageMath parsed files
126
+ *.sage.py
127
+
128
+ # Environments
129
+ .env
130
+ .venv
131
+ env/
132
+ venv/
133
+ ENV/
134
+ env.bak/
135
+ venv.bak/
136
+
137
+ # Spyder project settings
138
+ .spyderproject
139
+ .spyproject
140
+
141
+ # Rope project settings
142
+ .ropeproject
143
+
144
+ # mkdocs documentation
145
+ /site
146
+
147
+ # mypy
148
+ .mypy_cache/
149
+ .dmypy.json
150
+ dmypy.json
151
+
152
+ # Pyre type checker
153
+ .pyre/
154
+
155
+ # pytype static type analyzer
156
+ .pytype/
157
+
158
+ # Cython debug symbols
159
+ cython_debug/
160
+
161
+ # PyCharm
162
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
163
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
164
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
165
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
166
+ #.idea/
167
+
168
+ ### Python Patch ###
169
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
170
+ poetry.toml
171
+
172
+ # ruff
173
+ .ruff_cache/
174
+
175
+ # LSP config files
176
+ pyrightconfig.json
177
+
178
+ # End of https://www.toptal.com/developers/gitignore/api/python
179
+ /docs/_autosummary
180
+ .history/
181
+ /data/
182
+ docs_dev/
183
+ /outputs/
184
+ /wandb/
185
+ lightning_logs/
186
+ .vscode/
187
+
188
+ /tools/*csv.py
189
+ >>>>>>> 0517224 (updated dataset.py, added band selection strategies and adaclip implementation with examples and tests)
190
+ /examples//outputs/
191
+ cuvis_ai/outputs/
192
+ /tools/*csv.py
193
+ runs/
194
+ test_outputs/
195
+ tensorboard/
196
+ .clinerules
197
+ experiments/
198
+ *.pt
199
+ /.venv-adaclip-test/
200
+ !configs/pipeline/channel_selector.pt
201
+ configs/**/*.png
202
+ .claude/
203
+ *.code-workspace
204
+
205
+ # Logs
206
+ *.log
207
+ .history/
208
+ .ru
@@ -0,0 +1,68 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.0] - 2026-02-04
9
+
10
+ ### Added
11
+ - Initial release of cuvis-ai-schemas package
12
+ - Core schema definitions extracted from cuvis-ai-core and cuvis-ai-ui
13
+ - Pipeline structure schemas (PipelineConfig, NodeConfig, ConnectionConfig, PortSpec)
14
+ - Plugin system schemas (PluginManifest, GitPluginConfig, LocalPluginConfig)
15
+ - Training configuration schemas (TrainingConfig, DataConfig, OptimizerConfig, etc.)
16
+ - Execution context schemas (Context, ExecutionStage, Artifact, Metric)
17
+ - Discovery/metadata schemas (NodeInfo, PluginInfo, PipelineInfo)
18
+ - gRPC proto definitions and generated Python stubs
19
+ - Type conversion helpers for proto/Python interop
20
+ - UI extensions for port display (PortDisplaySpec, DTYPE_COLORS)
21
+ - Optional dependencies structure (proto, torch, numpy, lightning, full)
22
+ - Comprehensive test suite
23
+ - Development tools (ruff, pytest, mypy configuration)
24
+ - Git hooks for pre-commit validation
25
+ - Complete documentation (README, API docs)
26
+
27
+ ### Features
28
+ - Lightweight core dependencies (pydantic + pyyaml only)
29
+ - Optional extras for specific features
30
+ - Full Pydantic validation for all schemas
31
+ - JSON and YAML serialization support
32
+ - Proto serialization for gRPC communication
33
+ - Field aliases for backward compatibility
34
+ - Type-safe schema definitions
35
+ - UV package manager support
36
+ - PyTorch CUDA index configuration
37
+
38
+ ### Schema Reconciliation
39
+ - Unified PipelineConfig from core and UI implementations
40
+ - Reconciled PortSpec with UI color extensions
41
+ - Centralized proto definitions (single source of truth)
42
+ - Consistent serialization patterns across all schemas
43
+
44
+ ### Documentation
45
+ - Installation guide with examples
46
+ - Usage examples for all schema categories
47
+ - Development setup instructions
48
+ - Architecture overview
49
+ - Ecosystem integration guide
50
+ - Migration guide for consumers
51
+
52
+ ## [Unreleased]
53
+
54
+ ### Planned
55
+ - Additional schema validators
56
+ - Performance optimizations
57
+ - Extended documentation
58
+ - More usage examples
59
+
60
+ ---
61
+
62
+ **Legend:**
63
+ - `Added`: New features
64
+ - `Changed`: Changes in existing functionality
65
+ - `Deprecated`: Soon-to-be removed features
66
+ - `Removed`: Removed features
67
+ - `Fixed`: Bug fixes
68
+ - `Security`: Security fixes
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 Cubert GmbH
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
@@ -0,0 +1,111 @@
1
+ Metadata-Version: 2.4
2
+ Name: cuvis-ai-schemas
3
+ Version: 0.1.0
4
+ Summary: Lightweight schema definitions for cuvis-ai ecosystem
5
+ Author-email: "Cubert GmbH, Ulm, Germany" <SDK@cubert-gmbh.com>
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://www.cubert-hyperspectral.com/
8
+ Project-URL: Repository, https://github.com/cubert-hyperspectral/cuvis-ai-schemas
9
+ Project-URL: Documentation, https://cubert-hyperspectral.github.io/cuvis-ai-schemas/
10
+ Project-URL: Issues, https://github.com/cubert-hyperspectral/cuvis-ai-schemas/issues
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Topic :: Scientific/Engineering
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Requires-Python: <3.12,>=3.11
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: pydantic<3.0.0,>=2.0.0
21
+ Requires-Dist: pyyaml>=6.0
22
+ Provides-Extra: proto
23
+ Requires-Dist: grpcio>=1.56.0; extra == "proto"
24
+ Requires-Dist: protobuf>=4.25.0; extra == "proto"
25
+ Requires-Dist: grpcio-tools>=1.56.0; extra == "proto"
26
+ Provides-Extra: torch
27
+ Requires-Dist: torch>=2.0.0; extra == "torch"
28
+ Requires-Dist: torchvision; extra == "torch"
29
+ Provides-Extra: numpy
30
+ Requires-Dist: numpy>=1.21.0; extra == "numpy"
31
+ Provides-Extra: lightning
32
+ Requires-Dist: pytorch-lightning>=2.0.0; extra == "lightning"
33
+ Provides-Extra: full
34
+ Requires-Dist: cuvis-ai-schemas[lightning,numpy,proto,torch]; extra == "full"
35
+ Provides-Extra: dev
36
+ Requires-Dist: ruff; extra == "dev"
37
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
38
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
39
+ Requires-Dist: mypy>=1.8.0; extra == "dev"
40
+ Requires-Dist: types-protobuf; extra == "dev"
41
+ Requires-Dist: types-grpcio; extra == "dev"
42
+ Requires-Dist: types-PyYAML; extra == "dev"
43
+ Requires-Dist: interrogate>=1.7.0; extra == "dev"
44
+ Dynamic: license-file
45
+
46
+ # cuvis-ai-schemas
47
+
48
+ Lightweight schema definitions for the cuvis-ai ecosystem.
49
+
50
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
51
+ [![Python](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/)
52
+
53
+ ## Overview
54
+
55
+ `cuvis-ai-schemas` is a centralized, dependency-light package of schema definitions used across the cuvis-ai ecosystem. It enables type-safe communication between services without heavy runtime requirements.
56
+
57
+ Key points:
58
+ - Minimal deps (pydantic + pyyaml)
59
+ - Full Pydantic validation
60
+ - Optional extras for proto, torch, numpy, lightning
61
+
62
+ ## Installation
63
+
64
+ ```bash
65
+ uv add cuvis-ai-schemas
66
+ uv add "cuvis-ai-schemas[proto]"
67
+ uv add "cuvis-ai-schemas[full]"
68
+ ```
69
+
70
+ Extras:
71
+ - `proto`: gRPC and protobuf support
72
+ - `torch`: PyTorch dtype handling (validation only)
73
+ - `numpy`: NumPy array support
74
+ - `lightning`: PyTorch Lightning training configs
75
+ - `full`: All features
76
+ - `dev`: Development dependencies
77
+
78
+ ## Usage
79
+
80
+ ```python
81
+ from cuvis_ai_schemas.pipeline import PipelineConfig, NodeConfig
82
+
83
+ pipeline = PipelineConfig(
84
+ nodes=[NodeConfig(id="node_1", class_name="DataLoader", params={"batch_size": 32})],
85
+ connections=[],
86
+ )
87
+
88
+ pipeline_json = pipeline.to_json()
89
+ pipeline = PipelineConfig.from_json(pipeline_json)
90
+ ```
91
+
92
+ ## Development
93
+
94
+ ```bash
95
+ uv sync --extra dev
96
+ uv run pytest tests/ -v
97
+ uv run ruff check cuvis_ai_schemas/ tests/
98
+ uv run ruff format cuvis_ai_schemas/ tests/
99
+ uv run mypy cuvis_ai_schemas/
100
+ ```
101
+
102
+ ## Contributing
103
+
104
+ Contributions are welcome. Please:
105
+ 1. Ensure tests pass
106
+ 2. Run ruff format and ruff check
107
+ 3. Keep type hints and update docs as needed
108
+
109
+ ## License
110
+
111
+ Licensed under the Apache License 2.0. See [LICENSE](LICENSE) for details.