Skip to content

Commit

Permalink
ENH: Add pydantic meta schema (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
janbjorge authored Jan 25, 2024
1 parent 624d693 commit e5fa542
Show file tree
Hide file tree
Showing 15 changed files with 1,624 additions and 29 deletions.
3 changes: 2 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[mypy]
plugins = pydantic.mypy
disallow_untyped_defs = True
exclude = ^((tests|docs|examples|build)/|conftest.py?)
exclude = ^((tests|docs|examples|build|tools)/|conftest.py?)
extra_checks = True
ignore_missing_imports = True
python_version = 3.8
Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dependencies = [
"numpy",
"pandas",
"pyarrow",
"pydantic>=2.5.0",
"PyYAML",
"xtgeo>=2.16",
]
Expand Down Expand Up @@ -81,10 +82,6 @@ write_to = "src/fmu/dataio/version.py"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--verbose"
log_cli = "False"
log_cli_format = "%(levelname)8s (%(relativeCreated)6.0fms) %(filename)44s [%(funcName)40s()] %(lineno)4d >> %(message)s"
log_cli_level = "INFO"
testpaths = "tests"
markers = ["integration: marks a test as an integration test"]
xfail_strict = true
Expand Down
2 changes: 2 additions & 0 deletions radixconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/equinor/radix-operator/release/json-schema/radixapplication.json
# Only works if the redhat yaml ext. in vs-code is installed.
apiVersion: radix.equinor.com/v1
kind: RadixApplication
metadata:
Expand Down
6 changes: 6 additions & 0 deletions src/fmu/dataio/datastructure/meta/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from .meta import Root, dump

__all__ = [
"dump",
"Root",
]
8 changes: 8 additions & 0 deletions src/fmu/dataio/datastructure/meta/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from __future__ import annotations

import json

from . import dump

if __name__ == "__main__":
print(json.dumps(dump(), indent=2))
Loading

0 comments on commit e5fa542

Please sign in to comment.