rovidh 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.
- rovidh-0.1.0/.github/workflows/ci.yml +60 -0
- rovidh-0.1.0/.github/workflows/docs.yml +66 -0
- rovidh-0.1.0/.github/workflows/publish.yml +85 -0
- rovidh-0.1.0/.gitignore +223 -0
- rovidh-0.1.0/LICENSE.md +8 -0
- rovidh-0.1.0/PKG-INFO +222 -0
- rovidh-0.1.0/README.md +206 -0
- rovidh-0.1.0/docs/commands.md +106 -0
- rovidh-0.1.0/docs/configuration.md +42 -0
- rovidh-0.1.0/docs/development.md +47 -0
- rovidh-0.1.0/docs/index.md +39 -0
- rovidh-0.1.0/docs/installation.md +34 -0
- rovidh-0.1.0/mkdocs.yml +19 -0
- rovidh-0.1.0/openapi.json +1 -0
- rovidh-0.1.0/pyproject.toml +40 -0
- rovidh-0.1.0/src/rovidh/__init__.py +17 -0
- rovidh-0.1.0/src/rovidh/admin.py +28 -0
- rovidh-0.1.0/src/rovidh/api.py +25 -0
- rovidh-0.1.0/src/rovidh/config.py +63 -0
- rovidh-0.1.0/src/rovidh/system.py +38 -0
- rovidh-0.1.0/src/rovidh/upload.py +111 -0
- rovidh-0.1.0/src/rovidh/validation.py +17 -0
- rovidh-0.1.0/tests/conftest.py +36 -0
- rovidh-0.1.0/tests/test_api.py +90 -0
- rovidh-0.1.0/tests/test_system.py +140 -0
- rovidh-0.1.0/tests/test_upload_openapi.py +184 -0
- rovidh-0.1.0/tests/test_validation.py +43 -0
- rovidh-0.1.0/uv.lock +903 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
tests:
|
|
15
|
+
name: Tests
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Check out repository
|
|
20
|
+
uses: actions/checkout@v6
|
|
21
|
+
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v6
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.11"
|
|
26
|
+
|
|
27
|
+
- name: Set up uv
|
|
28
|
+
uses: astral-sh/setup-uv@v8
|
|
29
|
+
with:
|
|
30
|
+
enable-cache: true
|
|
31
|
+
|
|
32
|
+
- name: Install dependencies
|
|
33
|
+
run: uv sync --frozen --dev
|
|
34
|
+
|
|
35
|
+
- name: Run tests
|
|
36
|
+
run: uv run --frozen pytest
|
|
37
|
+
|
|
38
|
+
docs:
|
|
39
|
+
name: Docs build
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
|
|
42
|
+
steps:
|
|
43
|
+
- name: Check out repository
|
|
44
|
+
uses: actions/checkout@v6
|
|
45
|
+
|
|
46
|
+
- name: Set up Python
|
|
47
|
+
uses: actions/setup-python@v6
|
|
48
|
+
with:
|
|
49
|
+
python-version: "3.11"
|
|
50
|
+
|
|
51
|
+
- name: Set up uv
|
|
52
|
+
uses: astral-sh/setup-uv@v8
|
|
53
|
+
with:
|
|
54
|
+
enable-cache: true
|
|
55
|
+
|
|
56
|
+
- name: Install dependencies
|
|
57
|
+
run: uv sync --frozen --dev
|
|
58
|
+
|
|
59
|
+
- name: Build documentation
|
|
60
|
+
run: uv run --frozen mkdocs build --strict
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: Deploy Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: pages
|
|
14
|
+
cancel-in-progress: false
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build:
|
|
18
|
+
name: Build MkDocs
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Check out repository
|
|
23
|
+
uses: actions/checkout@v6
|
|
24
|
+
|
|
25
|
+
- name: Set up Python
|
|
26
|
+
uses: actions/setup-python@v6
|
|
27
|
+
with:
|
|
28
|
+
python-version: "3.11"
|
|
29
|
+
|
|
30
|
+
- name: Set up uv
|
|
31
|
+
uses: astral-sh/setup-uv@v8
|
|
32
|
+
with:
|
|
33
|
+
enable-cache: true
|
|
34
|
+
|
|
35
|
+
- name: Install dependencies
|
|
36
|
+
run: uv sync --frozen --dev
|
|
37
|
+
|
|
38
|
+
- name: Configure GitHub Pages
|
|
39
|
+
uses: actions/configure-pages@v5
|
|
40
|
+
|
|
41
|
+
- name: Build documentation
|
|
42
|
+
run: uv run --frozen mkdocs build --strict
|
|
43
|
+
|
|
44
|
+
- name: Upload Pages artifact
|
|
45
|
+
uses: actions/upload-pages-artifact@v5
|
|
46
|
+
with:
|
|
47
|
+
path: site
|
|
48
|
+
|
|
49
|
+
deploy:
|
|
50
|
+
name: Deploy GitHub Pages
|
|
51
|
+
needs: build
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
if: github.ref == 'refs/heads/main'
|
|
54
|
+
|
|
55
|
+
permissions:
|
|
56
|
+
pages: write
|
|
57
|
+
id-token: write
|
|
58
|
+
|
|
59
|
+
environment:
|
|
60
|
+
name: github-pages
|
|
61
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
62
|
+
|
|
63
|
+
steps:
|
|
64
|
+
- name: Deploy to GitHub Pages
|
|
65
|
+
id: deployment
|
|
66
|
+
uses: actions/deploy-pages@v5
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
name: Publish PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
tests:
|
|
14
|
+
name: Tests
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Check out repository
|
|
19
|
+
uses: actions/checkout@v6
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v6
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.11"
|
|
25
|
+
|
|
26
|
+
- name: Set up uv
|
|
27
|
+
uses: astral-sh/setup-uv@v8
|
|
28
|
+
with:
|
|
29
|
+
enable-cache: true
|
|
30
|
+
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: uv sync --frozen --dev
|
|
33
|
+
|
|
34
|
+
- name: Run tests
|
|
35
|
+
run: uv run --frozen pytest
|
|
36
|
+
|
|
37
|
+
build:
|
|
38
|
+
name: Build package
|
|
39
|
+
needs: tests
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
|
|
42
|
+
steps:
|
|
43
|
+
- name: Check out repository
|
|
44
|
+
uses: actions/checkout@v6
|
|
45
|
+
|
|
46
|
+
- name: Set up Python
|
|
47
|
+
uses: actions/setup-python@v6
|
|
48
|
+
with:
|
|
49
|
+
python-version: "3.11"
|
|
50
|
+
|
|
51
|
+
- name: Set up uv
|
|
52
|
+
uses: astral-sh/setup-uv@v8
|
|
53
|
+
with:
|
|
54
|
+
enable-cache: true
|
|
55
|
+
|
|
56
|
+
- name: Build distributions
|
|
57
|
+
run: uv build
|
|
58
|
+
|
|
59
|
+
- name: Upload distributions
|
|
60
|
+
uses: actions/upload-artifact@v7
|
|
61
|
+
with:
|
|
62
|
+
name: python-distributions
|
|
63
|
+
path: dist/
|
|
64
|
+
|
|
65
|
+
publish:
|
|
66
|
+
name: Publish package
|
|
67
|
+
needs: build
|
|
68
|
+
runs-on: ubuntu-latest
|
|
69
|
+
|
|
70
|
+
permissions:
|
|
71
|
+
id-token: write
|
|
72
|
+
|
|
73
|
+
environment:
|
|
74
|
+
name: pypi
|
|
75
|
+
url: https://pypi.org/p/rovidh
|
|
76
|
+
|
|
77
|
+
steps:
|
|
78
|
+
- name: Download distributions
|
|
79
|
+
uses: actions/download-artifact@v7
|
|
80
|
+
with:
|
|
81
|
+
name: python-distributions
|
|
82
|
+
path: dist/
|
|
83
|
+
|
|
84
|
+
- name: Publish distributions to PyPI
|
|
85
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
rovidh-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# IDE settings
|
|
2
|
+
.idea/
|
|
3
|
+
.vscode/
|
|
4
|
+
o# Byte-compiled / optimized / DLL files
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[codz]
|
|
7
|
+
*$py.class
|
|
8
|
+
|
|
9
|
+
# C extensions
|
|
10
|
+
*.so
|
|
11
|
+
|
|
12
|
+
# Distribution / packaging
|
|
13
|
+
.Python
|
|
14
|
+
build/
|
|
15
|
+
develop-eggs/
|
|
16
|
+
dist/
|
|
17
|
+
downloads/
|
|
18
|
+
eggs/
|
|
19
|
+
.eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
wheels/
|
|
26
|
+
share/python-wheels/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
.installed.cfg
|
|
29
|
+
*.egg
|
|
30
|
+
MANIFEST
|
|
31
|
+
|
|
32
|
+
# PyInstaller
|
|
33
|
+
# Usually these files are written by a python script from a template
|
|
34
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
35
|
+
*.manifest
|
|
36
|
+
*.spec
|
|
37
|
+
|
|
38
|
+
# Installer logs
|
|
39
|
+
pip-log.txt
|
|
40
|
+
pip-delete-this-directory.txt
|
|
41
|
+
|
|
42
|
+
# Unit test / coverage reports
|
|
43
|
+
htmlcov/
|
|
44
|
+
.tox/
|
|
45
|
+
.nox/
|
|
46
|
+
.coverage
|
|
47
|
+
.coverage.*
|
|
48
|
+
.cache
|
|
49
|
+
nosetests.xml
|
|
50
|
+
coverage.xml
|
|
51
|
+
*.cover
|
|
52
|
+
*.py.cover
|
|
53
|
+
*.lcov
|
|
54
|
+
.hypothesis/
|
|
55
|
+
.pytest_cache/
|
|
56
|
+
cover/
|
|
57
|
+
|
|
58
|
+
# Translations
|
|
59
|
+
*.mo
|
|
60
|
+
*.pot
|
|
61
|
+
|
|
62
|
+
# Django stuff:
|
|
63
|
+
*.log
|
|
64
|
+
local_settings.py
|
|
65
|
+
db.sqlite3
|
|
66
|
+
db.sqlite3-journal
|
|
67
|
+
|
|
68
|
+
# Flask stuff:
|
|
69
|
+
instance/
|
|
70
|
+
.webassets-cache
|
|
71
|
+
|
|
72
|
+
# Scrapy stuff:
|
|
73
|
+
.scrapy
|
|
74
|
+
|
|
75
|
+
# Sphinx documentation
|
|
76
|
+
docs/_build/
|
|
77
|
+
|
|
78
|
+
# PyBuilder
|
|
79
|
+
.pybuilder/
|
|
80
|
+
target/
|
|
81
|
+
|
|
82
|
+
# Jupyter Notebook
|
|
83
|
+
.ipynb_checkpoints
|
|
84
|
+
|
|
85
|
+
# IPython
|
|
86
|
+
profile_default/
|
|
87
|
+
ipython_config.py
|
|
88
|
+
|
|
89
|
+
# pyenv
|
|
90
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
91
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
92
|
+
# .python-version
|
|
93
|
+
|
|
94
|
+
# pipenv
|
|
95
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
96
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
97
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
98
|
+
# install all needed dependencies.
|
|
99
|
+
# Pipfile.lock
|
|
100
|
+
|
|
101
|
+
# UV
|
|
102
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
103
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
104
|
+
# commonly ignored for libraries.
|
|
105
|
+
# uv.lock
|
|
106
|
+
|
|
107
|
+
# poetry
|
|
108
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
109
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
110
|
+
# commonly ignored for libraries.
|
|
111
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
112
|
+
# poetry.lock
|
|
113
|
+
# poetry.toml
|
|
114
|
+
|
|
115
|
+
# pdm
|
|
116
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
117
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
118
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
119
|
+
# pdm.lock
|
|
120
|
+
# pdm.toml
|
|
121
|
+
.pdm-python
|
|
122
|
+
.pdm-build/
|
|
123
|
+
|
|
124
|
+
# pixi
|
|
125
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
126
|
+
# pixi.lock
|
|
127
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
128
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
129
|
+
.pixi/*
|
|
130
|
+
!.pixi/config.toml
|
|
131
|
+
|
|
132
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
133
|
+
__pypackages__/
|
|
134
|
+
|
|
135
|
+
# Celery stuff
|
|
136
|
+
celerybeat-schedule*
|
|
137
|
+
celerybeat.pid
|
|
138
|
+
|
|
139
|
+
# Redis
|
|
140
|
+
*.rdb
|
|
141
|
+
*.aof
|
|
142
|
+
*.pid
|
|
143
|
+
|
|
144
|
+
# RabbitMQ
|
|
145
|
+
mnesia/
|
|
146
|
+
rabbitmq/
|
|
147
|
+
rabbitmq-data/
|
|
148
|
+
|
|
149
|
+
# ActiveMQ
|
|
150
|
+
activemq-data/
|
|
151
|
+
|
|
152
|
+
# SageMath parsed files
|
|
153
|
+
*.sage.py
|
|
154
|
+
|
|
155
|
+
# Environments
|
|
156
|
+
.env
|
|
157
|
+
.envrc
|
|
158
|
+
.venv
|
|
159
|
+
env/
|
|
160
|
+
venv/
|
|
161
|
+
ENV/
|
|
162
|
+
env.bak/
|
|
163
|
+
venv.bak/
|
|
164
|
+
|
|
165
|
+
# Spyder project settings
|
|
166
|
+
.spyderproject
|
|
167
|
+
.spyproject
|
|
168
|
+
|
|
169
|
+
# Rope project settings
|
|
170
|
+
.ropeproject
|
|
171
|
+
|
|
172
|
+
# mkdocs documentation
|
|
173
|
+
/site
|
|
174
|
+
|
|
175
|
+
# mypy
|
|
176
|
+
.mypy_cache/
|
|
177
|
+
.dmypy.json
|
|
178
|
+
dmypy.json
|
|
179
|
+
|
|
180
|
+
# Pyre type checker
|
|
181
|
+
.pyre/
|
|
182
|
+
|
|
183
|
+
# pytype static type analyzer
|
|
184
|
+
.pytype/
|
|
185
|
+
|
|
186
|
+
# Cython debug symbols
|
|
187
|
+
cython_debug/
|
|
188
|
+
|
|
189
|
+
# PyCharm
|
|
190
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
191
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
192
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
193
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
194
|
+
# .idea/
|
|
195
|
+
|
|
196
|
+
# Abstra
|
|
197
|
+
# Abstra is an AI-powered process automation framework.
|
|
198
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
199
|
+
# Learn more at https://abstra.io/docs
|
|
200
|
+
.abstra/
|
|
201
|
+
|
|
202
|
+
# Visual Studio Code
|
|
203
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
204
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
205
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
206
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
207
|
+
# .vscode/
|
|
208
|
+
# Temporary file for partial code execution
|
|
209
|
+
tempCodeRunnerFile.py
|
|
210
|
+
|
|
211
|
+
# Ruff stuff:
|
|
212
|
+
.ruff_cache/
|
|
213
|
+
|
|
214
|
+
# PyPI configuration file
|
|
215
|
+
.pypirc
|
|
216
|
+
|
|
217
|
+
# Marimo
|
|
218
|
+
marimo/_static/
|
|
219
|
+
marimo/_lsp/
|
|
220
|
+
__marimo__/
|
|
221
|
+
|
|
222
|
+
# Streamlit
|
|
223
|
+
.streamlit/secrets.toml
|
rovidh-0.1.0/LICENSE.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Copyright 2026 ORNL
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
8
|
+
|
rovidh-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rovidh
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: ROVI Data Hub Vendor Agent
|
|
5
|
+
Author-email: "Grant, Josh" <grantjn@ornl.gov>, "Broughton, Mitchell" <broxsonmr@ornl.gov>, "Srikanth, Allu" <allus@ornl.gov>
|
|
6
|
+
License-File: LICENSE.md
|
|
7
|
+
Requires-Python: >=3.11
|
|
8
|
+
Requires-Dist: click>=8.3.1
|
|
9
|
+
Requires-Dist: dotenv>=0.9.9
|
|
10
|
+
Requires-Dist: pydanclick
|
|
11
|
+
Requires-Dist: pydantic-settings>=2.12.0
|
|
12
|
+
Requires-Dist: pydantic>=2.12.5
|
|
13
|
+
Requires-Dist: requests-toolbelt>=1.0.0
|
|
14
|
+
Requires-Dist: requests>=2.32.5
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# ROVI Data Hub Vendor CLI
|
|
18
|
+
|
|
19
|
+
Command-line client for vendor and system operations against the ROVI Data Hub API.
|
|
20
|
+
|
|
21
|
+
Full documentation is available in the MkDocs source under `docs/`.
|
|
22
|
+
|
|
23
|
+
The CLI lets you:
|
|
24
|
+
- manage vendor API tokens (admin operations),
|
|
25
|
+
- create/renew/delete system JWTs,
|
|
26
|
+
- upload metadata, files, ONNX models, and Grafana dashboards to ingestion endpoints,
|
|
27
|
+
- inspect active configuration loaded from environment files.
|
|
28
|
+
|
|
29
|
+
## Requirements
|
|
30
|
+
|
|
31
|
+
- Python 3.11+
|
|
32
|
+
- `uv` (recommended) or another Python environment manager
|
|
33
|
+
- network access to the ROVI Data Hub API
|
|
34
|
+
|
|
35
|
+
## Install
|
|
36
|
+
|
|
37
|
+
### Option 1: with `uv` (recommended)
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
uv sync
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Run commands with:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
uv run rovidh --help
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Option 2: with `pip`
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
python -m venv .venv
|
|
53
|
+
source .venv/bin/activate
|
|
54
|
+
pip install -e .
|
|
55
|
+
rovidh --help
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Configuration
|
|
59
|
+
|
|
60
|
+
The app uses environment-based configuration and looks for values in this order (if present):
|
|
61
|
+
- `config/.env.default`
|
|
62
|
+
- `.env.default`
|
|
63
|
+
- `config.env`
|
|
64
|
+
- `.env`
|
|
65
|
+
|
|
66
|
+
You can also pass values directly via CLI options.
|
|
67
|
+
|
|
68
|
+
### Common variables
|
|
69
|
+
|
|
70
|
+
| Variable | Required For | Description |
|
|
71
|
+
|---|---|---|
|
|
72
|
+
| `ROVI_API` | all commands | Base API endpoint (default: `https://rovidatahub.ornl.gov/api`) |
|
|
73
|
+
| `VERIFY_SSL` | all commands | SSL verification toggle (`true`/`false`) |
|
|
74
|
+
| `ADMIN_KEY` | `admin` commands | Admin access token |
|
|
75
|
+
| `VENDOR_NAME` | `admin` commands | Vendor name for token operations |
|
|
76
|
+
| `VENDOR_ID` | `system` commands | Vendor identifier |
|
|
77
|
+
| `VENDOR_KEY` | `system` commands | Vendor key used as `access-token` header |
|
|
78
|
+
| `SYSTEM_NAME` | `system` commands | System name |
|
|
79
|
+
| `SYSTEM_JWT` | `system` + `upload` commands | System JWT bearer token |
|
|
80
|
+
|
|
81
|
+
Example `.env`:
|
|
82
|
+
|
|
83
|
+
```dotenv
|
|
84
|
+
ROVI_API=https://rovidatahub.ornl.gov/api
|
|
85
|
+
VERIFY_SSL=true
|
|
86
|
+
|
|
87
|
+
ADMIN_KEY=...
|
|
88
|
+
VENDOR_NAME=example-vendor
|
|
89
|
+
|
|
90
|
+
VENDOR_ID=...
|
|
91
|
+
VENDOR_KEY=...
|
|
92
|
+
SYSTEM_NAME=test-system
|
|
93
|
+
SYSTEM_JWT=...
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Command Groups
|
|
97
|
+
|
|
98
|
+
Top-level help:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
uv run rovidh --help
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### `config`
|
|
105
|
+
|
|
106
|
+
Show active resolved config:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
uv run rovidh config show
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### `admin`
|
|
113
|
+
|
|
114
|
+
Create vendor token:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
uv run rovidh admin new
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Delete vendor token:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
uv run rovidh admin delete
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### `system`
|
|
127
|
+
|
|
128
|
+
Create system JWT (also saves `SYSTEM_NAME`, `VENDOR_ID`, and `SYSTEM_JWT` into `.env`):
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
uv run rovidh system new
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Renew current system JWT (updates `SYSTEM_JWT` in `.env`):
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
uv run rovidh system renew
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Delete system JWT:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
uv run rovidh system delete
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### `upload`
|
|
147
|
+
|
|
148
|
+
Upload metadata JSON file:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
uv run rovidh upload metadata ./metadata.json
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Upload single data file:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
uv run rovidh upload file ./payload.json
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Upload ONNX model:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
uv run rovidh upload model ./model.onnx
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Upload Grafana dashboard JSON:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
uv run rovidh upload dashboard ./dashboard.json
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Upload multiple files:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
uv run rovidh upload files ./a.json ./b.json ./c.json
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Upload all files in a directory:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
uv run rovidh upload directory ./batch
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## API Endpoints Used
|
|
185
|
+
|
|
186
|
+
The CLI calls these API paths relative to `ROVI_API`:
|
|
187
|
+
|
|
188
|
+
- `POST create_token/{vendor_name}`
|
|
189
|
+
- `POST delete_token/{vendor_name}`
|
|
190
|
+
- `POST create_jwt/{vendor_id}/{system_name}`
|
|
191
|
+
- `POST renew_jwt`
|
|
192
|
+
- `POST delete_jwt/{vendor_id}/{system_name}`
|
|
193
|
+
- `POST upload-metadata/`
|
|
194
|
+
- `POST upload-file/`
|
|
195
|
+
- `POST upload-model/`
|
|
196
|
+
- `POST upload-dashboard/`
|
|
197
|
+
- `POST upload-batch/`
|
|
198
|
+
|
|
199
|
+
## Development
|
|
200
|
+
|
|
201
|
+
Install editable dependencies and run commands through `uv`:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
uv sync
|
|
205
|
+
uv run rovidh --help
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Run tests:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
uv run pytest
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Upload tests read `openapi.json` from the repository root when it is present.
|
|
215
|
+
That file is local-only and is not required to be committed; OpenAPI-backed
|
|
216
|
+
tests skip with a clear message if the file is absent.
|
|
217
|
+
|
|
218
|
+
## Security Notes
|
|
219
|
+
|
|
220
|
+
- Do not commit `.env` with live credentials.
|
|
221
|
+
- Rotate `ADMIN_KEY`, vendor keys, and JWTs regularly.
|
|
222
|
+
- Keep `VERIFY_SSL=true` except in controlled local testing.
|