Skip to content
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

ENH: Add inplace volumes result and schema #894

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

mferrera
Copy link
Collaborator

@mferrera mferrera commented Dec 5, 2024

Resolves #877

This will need refinement and discussion, but here is something to discuss.

  • Suggests a module interface from _products
    • When FMU products are exported they can import the VERSION and SCHEMA to use:
    •  data:
         product:
           type: ...
           # All schema-able products have this; not every product is schema-able (e.g. roff files)
           file_schema:
             version: {fmu.dataio._products.inplace_volumes.VERSION}  # Or schema_version? Not needed?
             url: {fmu.dataio._products.inplace_volumes.SCHEMA} 
    • This should give consumers approximately what they need for data consistency guarantees
  • The bad: most things are optional. Currently a valid product can look like:
    • ZONE,REGION,BULK_TOTAL,PORV_TOTAL
    • This isn't very useful -- it is a poor data contract to make (and the last two may need to be optional too?)
  • This doesn't yet set-up the deployment of the schema, a way to generate them etc
    • We should have a discussion about how products and their versions are organized, relative to each-other and generally in the URL
    • This means the update_schema script in tools/ needs to be extended
    • The script that installs the schema files on the Radix app will need to be updated too

Will take documentation separately since things in here are likely to shift a bit.

@mferrera mferrera force-pushed the model-inplace-vol-payload branch from 7b70148 to 3aae06f Compare December 5, 2024 13:53
@mferrera mferrera self-assigned this Dec 5, 2024
@mferrera mferrera force-pushed the model-inplace-vol-payload branch 2 times, most recently from b08706d to 59a63dd Compare December 5, 2024 14:04
@mferrera mferrera marked this pull request as ready for review December 5, 2024 14:16
@mferrera
Copy link
Collaborator Author

Now depends on #903

@mferrera mferrera force-pushed the model-inplace-vol-payload branch 2 times, most recently from 80254e5 to 4e5e4b6 Compare December 17, 2024 06:32
Copy link
Collaborator

@tnatt tnatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :) Just have one comment regarding some columns that can be set to non-optional.

src/fmu/dataio/_products/inplace_volumes.py Outdated Show resolved Hide resolved
src/fmu/dataio/_products/inplace_volumes.py Outdated Show resolved Hide resolved
@mferrera mferrera force-pushed the model-inplace-vol-payload branch from 4e5e4b6 to 0802e39 Compare December 18, 2024 09:29
@mferrera
Copy link
Collaborator Author

I made #928 as well; this is probably more simply handled after iterating on #926 -- we could look at implementing a static method that returns required fields.

@mferrera mferrera merged commit 7011ef0 into equinor:main Dec 18, 2024
15 checks passed
@mferrera mferrera deleted the model-inplace-vol-payload branch December 18, 2024 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inplace volumes: Create Pydantic model for payload/result
2 participants