Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
8eeddea
update project metadata and deps
tasansal Apr 29, 2025
293a714
update project metadata and deps
tasansal Apr 29, 2025
faacbaa
add schemas
tasansal Apr 29, 2025
1a1e743
Relocate quickstart notebook to tutorials directory
tasansal Apr 29, 2025
3c8ea4d
update docs dependencies
tasansal Apr 29, 2025
53ecaa9
add new docs
tasansal Apr 29, 2025
da09c4b
remove incorrect exclude
tasansal Apr 29, 2025
0d59c95
remove duplicate doc directive
tasansal Apr 29, 2025
793f3f1
fix creation notebook
tasansal Apr 29, 2025
0e64e09
Add basic unit test for v1 dataset schema validation
tasansal Apr 29, 2025
a1a312e
update lockfile
tasansal Apr 30, 2025
dfe7751
fix broken creation nb
tasansal May 7, 2025
f6b2c34
update lockfile
tasansal May 7, 2025
dbec58e
lint v1 files
tasansal May 7, 2025
ecb69d6
update lock file
tasansal May 27, 2025
9dd9fbc
schema_v1-dataset_builder-add_dimension
dmitriyrepin Jun 24, 2025
5816f83
V1 schema review (#553)
BrianMichell Jun 26, 2025
f88531e
Merge remote-tracking branch 'upstream/v1' into v1
dmitriyrepin Jun 26, 2025
1358f95
First take on add_dimension(), add_coordinate(), add_variable()
dmitriyrepin Jun 27, 2025
e5261cb
Finished add_dimension, add_coordinate, add_variable
dmitriyrepin Jun 28, 2025
95c01d8
Work on build
dmitriyrepin Jun 30, 2025
f391e23
Merge branch 'main' into v1
tasansal Jul 1, 2025
46f82f0
Generalize _to_dictionary()
dmitriyrepin Jul 1, 2025
0dc7cc8
build
dmitriyrepin Jul 1, 2025
fe4af2b
[v1] Update dependencies to latest (#567)
tasansal Jul 2, 2025
79863ac
Dataset Build - pass one
dmitriyrepin Jul 2, 2025
ec480f1
Merge the latest TGSAI/mdio-python:v1 branch
dmitriyrepin Jul 2, 2025
4062a77
unpin zarr because breaking bug fixed (#569)
tasansal Jul 7, 2025
fa81ea2
Merge branch 'v1' into v1
tasansal Jul 7, 2025
4b2b163
Revert .container changes
dmitriyrepin Jul 7, 2025
c532c3b
PR review: remove DEVELOPER_NOTES.md
dmitriyrepin Jul 7, 2025
08798cd
PR Review: add_coordinate() should accept only data_type: ScalarType
dmitriyrepin Jul 7, 2025
e8febe4
PR review: add_variable() data_type remove default
dmitriyrepin Jul 7, 2025
0a4be3f
RE review: do not add dimension variable
dmitriyrepin Jul 8, 2025
7b25d6b
PR Review: get api version from the package version
dmitriyrepin Jul 8, 2025
7ca3ed8
PR Review: remove add_dimension_coordinate
dmitriyrepin Jul 9, 2025
4d1ec9c
PR Review: add_coordinate() remove data_type default value
dmitriyrepin Jul 9, 2025
99fcf43
PR Review: improve unit tests by extracting common functionality in v…
dmitriyrepin Jul 9, 2025
0778fdd
Remove the Dockerfile changes. They are not supposed to be a part of …
dmitriyrepin Jul 9, 2025
7e74567
PR Review: run ruff
dmitriyrepin Jul 9, 2025
0aaa5f6
PR Review: fix pre-commit errors
dmitriyrepin Jul 10, 2025
1904dee
remove some noqa overrides
tasansal Jul 10, 2025
90d31a1
Implement MDIO Dataset builder to create in-memory instance of schema…
dmitriyrepin Jul 10, 2025
4c7c833
Writing XArray / Zarr
dmitriyrepin Jul 10, 2025
4b39ffa
gitignore
dmitriyrepin Jul 10, 2025
e772a4f
Merge remote-tracking branch 'upstream/v1' into v1
dmitriyrepin Jul 11, 2025
cea7308
to_zarr() fix compression
dmitriyrepin Jul 11, 2025
850135e
Fix precommit issues
dmitriyrepin Jul 11, 2025
82f1960
Use only make_campos_3d_acceptance_dataset
dmitriyrepin Jul 11, 2025
b5ee31e
PR Review: address the review comments
dmitriyrepin Jul 14, 2025
7b3ba70
Update _get_fill_value for StructuredType
dmitriyrepin Jul 14, 2025
a4ff4a9
Fix fill type issue for the Structured Types
dmitriyrepin Jul 16, 2025
81bfa76
Improve code coverage
dmitriyrepin Jul 16, 2025
0447659
Fix spelling
dmitriyrepin Jul 17, 2025
d08e2c4
Revert "Fix spelling"
dmitriyrepin Jul 17, 2025
657d2cf
extend per-file ignores for PLR2004 and remove noqa overrides in spec…
tasansal Jul 17, 2025
bfab1d7
Refactor tests: clarify Zarr-related test names, fix type hints, and …
tasansal Jul 17, 2025
9a033de
merge main into v1
tasansal Jul 17, 2025
5878e97
MDIO v1 Templates and Template Registry (#573)
dmitriyrepin Jul 22, 2025
aaf8fc6
Merge branch 'main' into v1
tasansal Aug 6, 2025
bc35bdf
update deps
tasansal Aug 6, 2025
3b62d8f
Merge branch 'main' into v1
tasansal Aug 6, 2025
aae5f51
Merge branch 'main' into v1
tasansal Aug 6, 2025
d21278c
address issues with VS Code dev containers (see issue 559) (#576)
dmitriyrepin Aug 7, 2025
d3a7da2
segy_to_mdio_v1 (#577)
dmitriyrepin Aug 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add basic unit test for v1 dataset schema validation
  • Loading branch information
tasansal committed May 27, 2025
commit 0e64e09d4e9aabb303aa3270c5caa174e82d916d
54 changes: 54 additions & 0 deletions tests/unit/test_schema.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
"""Test the schema for the v1 dataset."""

from mdio.schemas.v1 import Dataset as V1Dataset


TEST_SCHEMA = {
"metadata": {
"name": "test_dataset",
"api_version": "1.0.0",
"created_on": "2023-01-01T00:00:00Z",
},
"variables": [
{
"name": "actual_variable",
"data_type": "float32",
"dimensions": ["dim0", "dim1"],
"compressor": {"name": "blosc", "level": 3},
"coordinates": ["coord"],
"metadata": {
"chunk_grid": {
"name": "regular",
"configuration": {"chunk_shape": [10, 20]},
},
},
},
{
"name": "coord",
"data_type": "float32",
"dimensions": ["dim0", "dim1"],
"metadata": {
"chunk_grid": {
"name": "regular",
"configuration": {"chunk_shape": [10, 20]},
},
"units_v1": {"length": "m"},
},
},
{
"name": "dim0",
"data_type": "int32",
"dimensions": [{"name": "dim0", "size": 100}],
},
{
"name": "dim1",
"data_type": "int32",
"dimensions": [{"name": "dim1", "size": 200}],
},
],
}


def test_dataset_schema_validation():
"""Test that the dataset schema validates correctly."""
V1Dataset.model_validate(TEST_SCHEMA)