Skip to content

Commit

Permalink
Toggle button and improve setup for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrivenaes authored Jul 2, 2021
1 parent dff2522 commit 8f5b726
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 31 deletions.
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@
"sphinx.ext.mathjax",
"sphinx.ext.autodoc",
"sphinx_autodoc_typehints",
"sphinx_togglebutton",
]

togglebutton_hint = "YAML file: "

apidoc_module_dir = "../src/fmu/dataio"
apidoc_output_dir = "apiref"
apidoc_excluded_paths = ["tests"]
Expand All @@ -47,7 +50,7 @@
# General information about the project.
project = "fmu.dataio"
current_year = date.today().year
copyright = "Equinor 2019 - " + str(current_year) + f" (XTGeo release {release})"
copyright = "Equinor " + str(current_year) + f" (fmu-dataio release {release})"


# Sort members by input order in classes
Expand Down
56 changes: 33 additions & 23 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ can comment it out in your code.
The global variables used here
------------------------------

Here are the relevant sections in the global variables (output) file:
Here are the relevant sections in the global variables (output) file (press plus to
expand):

.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/fmuconfig/output/global_variables.yml
:language: yaml
.. toggle::

.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/fmuconfig/output/global_variables.yml
:language: yaml

|
Exporting fault polygons
------------------------
Expand All @@ -33,12 +36,14 @@ Python script
.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/rms/bin/export_faultpolygons.py
:language: python

Resulting metadata for TopVolantis polygons
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Press + to see generated YAML file.

.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/share/results/polygons/.topvolantis--faultlines.pol.yml
:language: yaml
.. toggle::

.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/share/results/polygons/.topvolantis--faultlines.pol.yml
:language: yaml

|
Exporting average maps from grid properties
-------------------------------------------
Expand All @@ -50,12 +55,14 @@ Python script
:language: python


Resulting metadata for Therys average porosity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Press + to see generated YAML file for metadata.

.. toggle::

.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/share/results/maps/.therys--average_porosity.gri.yml
:language: yaml
.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/share/results/maps/.therys--average_porosity.gri.yml
:language: yaml

|
Exporting 3D grids with properties
----------------------------------
Expand All @@ -66,18 +73,20 @@ Python script
.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/any/bin/export_grid3d.py
:language: python

Resulting metadata for grid geometry
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Press + to see generated YAML file for metadata.


.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/share/results/grids/.geogrid.roff.yml
:language: yaml
.. toggle::

Resulting metadata for facies property
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/share/results/grids/.geogrid.roff.yml
:language: yaml

.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/share/results/grids/.geogrid--facies.roff.yml
:language: yaml
.. toggle::

.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/share/results/grids/.geogrid--facies.roff.yml
:language: yaml

|
Exporting volume tables RMS or file
-----------------------------------
Expand All @@ -88,8 +97,9 @@ Python script
.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/any/bin/export_volumetables.py
:language: python

Resulting metadata for volume table
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. toggle::

.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/share/results/tables/.geogrid--volumes.csv.yml
:language: yaml

.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/share/results/tables/.geogrid--volumes.csv.yml
:language: yaml
|
10 changes: 3 additions & 7 deletions docs/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ Static and dynamic metadata
---------------------------

Metadata are in general "additional data about the data". For instance a pure surface
export file (e.g. irpa binary) will have information about data itself (like
export file (e.g. irap binary) will have information about data itself (like
values in the map, and bounding box) but the file have no idea of which FMU run it
belongs to, or which field it comes from.

For an export some of the metadata are _static_, which mean that it will note change for
For an export some of the metadata are *static*, which mean that it will note change for
a run. Typical static metadata are field, country and coordinate system information

Other metadata are dynamic, i.e. they will vary per item which is exported. For
Expand All @@ -27,11 +27,7 @@ Basicly it works like this in a FMU run:
* Dynamic metadata must be provided in the export






Prepare fmu-config
------------------

For some
Text to comes
1 change: 1 addition & 0 deletions requirements/requirements_docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ sphinx-rtd-theme
autoapi
sphinx-autodoc-typehints
sphinxcontrib-apidoc
sphinx-togglebutton

0 comments on commit 8f5b726

Please sign in to comment.