validibot-shared 0.4.0__tar.gz → 0.4.2__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 (23) hide show
  1. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/PKG-INFO +25 -13
  2. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/README.md +21 -9
  3. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/pyproject.toml +3 -3
  4. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/.gitignore +0 -0
  5. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/LICENSE +0 -0
  6. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/NOTICE +0 -0
  7. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/tests/__init__.py +0 -0
  8. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/tests/test_energyplus_envelopes.py +0 -0
  9. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/tests/test_energyplus_models.py +0 -0
  10. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/tests/test_fmu_envelopes.py +0 -0
  11. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/tests/test_fmu_models.py +0 -0
  12. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/tests/test_package_init.py +0 -0
  13. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/tests/test_validations_envelopes.py +0 -0
  14. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/validibot_shared/__init__.py +0 -0
  15. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/validibot_shared/energyplus/__init__.py +0 -0
  16. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/validibot_shared/energyplus/envelopes.py +0 -0
  17. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/validibot_shared/energyplus/models.py +0 -0
  18. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/validibot_shared/fmu/__init__.py +0 -0
  19. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/validibot_shared/fmu/envelopes.py +0 -0
  20. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/validibot_shared/fmu/models.py +0 -0
  21. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/validibot_shared/py.typed +0 -0
  22. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/validibot_shared/validations/__init__.py +0 -0
  23. {validibot_shared-0.4.0 → validibot_shared-0.4.2}/validibot_shared/validations/envelopes.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: validibot-shared
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: Shared library for data interchange between Validibot and validator containers
5
5
  Project-URL: Homepage, https://validibot.com
6
6
  Project-URL: Documentation, https://docs.validibot.com
@@ -24,10 +24,10 @@ Classifier: Programming Language :: Python :: 3.13
24
24
  Classifier: Topic :: Scientific/Engineering
25
25
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
26
  Requires-Python: >=3.10
27
- Requires-Dist: pydantic>=2.8.0
27
+ Requires-Dist: pydantic==2.12.3
28
28
  Provides-Extra: dev
29
- Requires-Dist: pytest>=8.3.0; extra == 'dev'
30
- Requires-Dist: ruff>=0.8.0; extra == 'dev'
29
+ Requires-Dist: pytest==9.0.2; extra == 'dev'
30
+ Requires-Dist: ruff==0.14.8; extra == 'dev'
31
31
  Description-Content-Type: text/markdown
32
32
 
33
33
  <div align="center">
@@ -212,18 +212,32 @@ validibot_shared/
212
212
  ```python
213
213
  from validibot_shared.energyplus import EnergyPlusInputEnvelope, EnergyPlusInputs
214
214
  from validibot_shared.validations.envelopes import (
215
+ ExecutionContext,
215
216
  InputFileItem,
217
+ OrganizationInfo,
218
+ SupportedMimeType,
216
219
  ValidatorInfo,
217
- ExecutionContext,
220
+ ValidatorType,
221
+ WorkflowInfo,
218
222
  )
219
223
 
220
224
  envelope = EnergyPlusInputEnvelope(
221
225
  run_id="run-123",
222
- validator=ValidatorInfo(id="v1", type="energyplus", version="24.2.0"),
226
+ validator=ValidatorInfo(
227
+ id="v1",
228
+ type=ValidatorType.ENERGYPLUS,
229
+ version="24.2.0",
230
+ ),
231
+ org=OrganizationInfo(id="org-123", name="Example Org"),
232
+ workflow=WorkflowInfo(
233
+ id="workflow-456",
234
+ step_id="step-789",
235
+ step_name="EnergyPlus Simulation",
236
+ ),
223
237
  input_files=[
224
238
  InputFileItem(
225
239
  name="model.idf",
226
- mime_type="application/vnd.energyplus.idf",
240
+ mime_type=SupportedMimeType.ENERGYPLUS_IDF,
227
241
  role="primary-model",
228
242
  uri="gs://bucket/model.idf",
229
243
  ),
@@ -243,15 +257,16 @@ json_payload = envelope.model_dump_json()
243
257
 
244
258
  ```python
245
259
  from validibot_shared.energyplus import EnergyPlusOutputEnvelope
260
+ from validibot_shared.validations.envelopes import ValidationStatus
246
261
 
247
262
  # Parse JSON response from validator
248
263
  envelope = EnergyPlusOutputEnvelope.model_validate_json(response_json)
249
264
 
250
265
  # Check status
251
- if envelope.status == "success":
266
+ if envelope.status == ValidationStatus.SUCCESS:
252
267
  # Access typed outputs with full autocomplete
253
268
  if envelope.outputs and envelope.outputs.metrics:
254
- print(f"EUI: {envelope.outputs.metrics.eui_kbtu_per_sqft} kBtu/sqft")
269
+ print(f"EUI: {envelope.outputs.metrics.site_eui_kwh_m2} kWh/")
255
270
 
256
271
  # Iterate over validation messages
257
272
  for message in envelope.messages:
@@ -401,13 +416,10 @@ cd validibot-shared
401
416
  uv sync --extra dev
402
417
 
403
418
  # Run tests
404
- uv run pytest
419
+ uv run python -m pytest
405
420
 
406
421
  # Run linter
407
422
  uv run ruff check .
408
-
409
- # Run type checker
410
- uv run mypy src/
411
423
  ```
412
424
 
413
425
  ## Trademarks
@@ -180,18 +180,32 @@ validibot_shared/
180
180
  ```python
181
181
  from validibot_shared.energyplus import EnergyPlusInputEnvelope, EnergyPlusInputs
182
182
  from validibot_shared.validations.envelopes import (
183
+ ExecutionContext,
183
184
  InputFileItem,
185
+ OrganizationInfo,
186
+ SupportedMimeType,
184
187
  ValidatorInfo,
185
- ExecutionContext,
188
+ ValidatorType,
189
+ WorkflowInfo,
186
190
  )
187
191
 
188
192
  envelope = EnergyPlusInputEnvelope(
189
193
  run_id="run-123",
190
- validator=ValidatorInfo(id="v1", type="energyplus", version="24.2.0"),
194
+ validator=ValidatorInfo(
195
+ id="v1",
196
+ type=ValidatorType.ENERGYPLUS,
197
+ version="24.2.0",
198
+ ),
199
+ org=OrganizationInfo(id="org-123", name="Example Org"),
200
+ workflow=WorkflowInfo(
201
+ id="workflow-456",
202
+ step_id="step-789",
203
+ step_name="EnergyPlus Simulation",
204
+ ),
191
205
  input_files=[
192
206
  InputFileItem(
193
207
  name="model.idf",
194
- mime_type="application/vnd.energyplus.idf",
208
+ mime_type=SupportedMimeType.ENERGYPLUS_IDF,
195
209
  role="primary-model",
196
210
  uri="gs://bucket/model.idf",
197
211
  ),
@@ -211,15 +225,16 @@ json_payload = envelope.model_dump_json()
211
225
 
212
226
  ```python
213
227
  from validibot_shared.energyplus import EnergyPlusOutputEnvelope
228
+ from validibot_shared.validations.envelopes import ValidationStatus
214
229
 
215
230
  # Parse JSON response from validator
216
231
  envelope = EnergyPlusOutputEnvelope.model_validate_json(response_json)
217
232
 
218
233
  # Check status
219
- if envelope.status == "success":
234
+ if envelope.status == ValidationStatus.SUCCESS:
220
235
  # Access typed outputs with full autocomplete
221
236
  if envelope.outputs and envelope.outputs.metrics:
222
- print(f"EUI: {envelope.outputs.metrics.eui_kbtu_per_sqft} kBtu/sqft")
237
+ print(f"EUI: {envelope.outputs.metrics.site_eui_kwh_m2} kWh/")
223
238
 
224
239
  # Iterate over validation messages
225
240
  for message in envelope.messages:
@@ -369,13 +384,10 @@ cd validibot-shared
369
384
  uv sync --extra dev
370
385
 
371
386
  # Run tests
372
- uv run pytest
387
+ uv run python -m pytest
373
388
 
374
389
  # Run linter
375
390
  uv run ruff check .
376
-
377
- # Run type checker
378
- uv run mypy src/
379
391
  ```
380
392
 
381
393
  ## Trademarks
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "validibot-shared"
7
- version = "0.4.0"
7
+ version = "0.4.2"
8
8
  description = "Shared library for data interchange between Validibot and validator containers"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -32,10 +32,10 @@ classifiers = [
32
32
  "Topic :: Software Development :: Libraries :: Python Modules",
33
33
  "Topic :: Scientific/Engineering",
34
34
  ]
35
- dependencies = ["pydantic>=2.8.0"]
35
+ dependencies = ["pydantic==2.12.3"]
36
36
 
37
37
  [project.optional-dependencies]
38
- dev = ["pytest>=8.3.0", "ruff>=0.8.0"]
38
+ dev = ["pytest==9.0.2", "ruff==0.14.8"]
39
39
 
40
40
  [project.urls]
41
41
  Homepage = "https://validibot.com"