From 52ffd21e461f267165374e4c8d1641edcaf7e0b7 Mon Sep 17 00:00:00 2001 From: ncerutti Date: Wed, 1 May 2024 17:38:42 +0100 Subject: [PATCH] check correct sidebar --- src/sections/ODS-tools.rst | 11 ++++- src/sections/odtf.rst | 90 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 src/sections/odtf.rst diff --git a/src/sections/ODS-tools.rst b/src/sections/ODS-tools.rst index ad59de3..947a8dc 100644 --- a/src/sections/ODS-tools.rst +++ b/src/sections/ODS-tools.rst @@ -114,7 +114,16 @@ Example : | ODS Tools can also be used to transform location and account data from other formats to OED and vice versa, -depenting on the mapping files provided. For more information on this, see `here `_. +depenting on the mapping files provided. For more information on this, see here: :doc:`../sections/odtf`. + +Example : + +| +.. code-block:: python + + ods_tools transform --config-file configuration.yaml +| + .. note:: See ``ods_tools convert --help`` and ``ods_tools transform --help`` for more options. diff --git a/src/sections/odtf.rst b/src/sections/odtf.rst new file mode 100644 index 0000000..2606e08 --- /dev/null +++ b/src/sections/odtf.rst @@ -0,0 +1,90 @@ +Data transformations in ODS-tools +========= + +On this page: +------------- + +* :ref:`intro_ODTF` +* :ref:`inputs` +* :ref:`use` +* :ref:`validation` + +---- + +.. _intro_ODTF: + +Introduction +************ + + +The `transform` command is used to convert data from one format to another (e.g., from the AIR Cede format to OED). Note that it will convert from a specific version of the source format to a specific version of the target format, for example from AIR Cede 10.0.0 to OED 3.0.2. + + +---- + +.. _inputs: + +Inputs +************ + + + +For a transformation to run, the necessary input files should be present. +The input files you will need to run a transformation are: + +Configuration file + +It should include... + +For example, [link to odtf/example/config.yaml] + + +Input data + +The input data should be in the format that you want to transform from. For example, if you want to transform data from AIR Cede to OED, the input data should be in the AIR Cede format. +File type supported: +.csv + + +Mapping file + +A mapping file is + +For example, [link to odtf/data/mapping/mapping_to_select.yaml] + +---- + +.. _use: + +Command line usage +************ + + +Command line usage.. + + ods_tools transform [-h] --config-file CONFIG_FILE [-v LOGGING_LEVEL] [--nocheck NOCHECK] + +Transform data format to/from OED. + +options: + -h, --help show this help message and exit + + --config-file CONFIG_FILE + Path to the config file + + -v LOGGING_LEVEL, --logging-level LOGGING_LEVEL + logging level (debug:10, info:20, warning:30, error:40, critical:50) + + --nocheck NOCHECK if True, OED file will not be checked after transformation + + +---- + +.. _validation: + +Validation +************ + + +Validation is performed after a conversion to make sure that the output file is valid with respect to specific rules. +The validation rules are defined in the validation, see for example [link to odtf/data/validation/validate_oed.yaml]. \ No newline at end of file