-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refine examples/
for versioned schemas
#1010
Comments
It is possible to generate a new example directory for every schema version, and store those examples forever. Is this something we want to do? |
What I was thinking so far was to create a folder structure like this /examples
schemas/
templates/
0.8.0/
0.8.1/
.
.
.
1.0.0/ where the folder /templates
case_template.yml
aggregated_surface_depth_template.yml
surface_depth.yml
(etc..) Then We should maybe delete some of the schema example folders after some time, but I guess that is not something we need to decide on yet. Not sure where to place the files from |
One way I had thought of doing this is to have a script (or set of scripts) that generates metadata per content type. So basically do a full export_data = ExportData(..)
...export()... And do this for several (in the long run, all) content types. fmu-dataio/src/fmu/dataio/_models/fmu_results/enums.py Lines 28 to 57 in 6c66f57
Then, when Then we can always keeps our testing and examples up-to-date with the latest version of the schema/models. For the documentation build we may have to see if we can do something clever like have a symlink "latest" in examples/ that points to the most recent version, and see if docs can read into the symlink and build examples in from there. Maybe we should have a sync? There's a fair bit going on here, but it's important for the longevity of the current testing regime we have which will start breaking down when we bump versions |
There are a few ways we need to improve
examples/
as we move into versioned schemas. Files in this directory are used both in tests and in documentation.examples/0.8.0
contains metadata examples that are manually updatedfmu-dataio/tests/conftest.py
Lines 448 to 456 in 5aedcfb
fmu-dataio/tests/utils.py
Lines 45 to 49 in 5aedcfb
examples/s/d/nn
contains a mocked Ert ensemble that runs scripts and generates metadatafmu-dataio/tests/test_integration/conftest.py
Lines 78 to 83 in 5aedcfb
fmu-dataio/docs/src/examples.rst
Lines 31 to 40 in 5aedcfb
fmu-dataio/.readthedocs.yml
Line 9 in 5aedcfb
fmu-dataio/.github/workflows/fmudataio-documention.yml
Line 28 in 5aedcfb
We should combine these two things into a simpler, cohesive, but comprehensive way of managing documentation, examples, and testing altogether.
It's possible that this should be part of the
update-schemas
script.The text was updated successfully, but these errors were encountered: