Python code for generating MODA (MOdelling DAta) and CHADA (CHAracterisation DAta) workflow diagrams and tables using plantuml, with machine-readable, enhanced design based on bespoke themes.
The main documentation for mochada_kit is here: https://mammos-project.github.io/mochada_kit
1. Generate MODA and/or CHADA workflow diagrams with bespoke themes, making them machine readable.
The diagram below is a legend for a CHADA workflow, showing the types of the elements. The plantuml code used to produce this diagram is below on the right. After a command signalling the start of the code, we load one of the bespoke themes. This allows us to apply a "stereotype" to each element, giving it a colour according to its type. Each theme has different colours for the various elements (see section 4. below for the available colour schemes).
- The text to be displayed in an element is defined between a colon and a semicolon e.g. :User Case;
- The type of the element is specified by applying a stereotype between two sets of angled brackets e.g. <<user_case>>
- This allows the code to be machine readable: the text of each element can be easily associated with the type of element and connected to the antecedent and descendant elements.
Below is an example of a CHADA workflow diagram for EBSD in the SEM and the code used to produce the diagram is shown on the right. Note that the definition of the element can be split over multiple lines.
We can group techniques in order to provide a clear overview of more complex cases e.g. for SEM-EDX-EBSD:
2. Generate CHADA tables from a single json or yaml file, with bespoke themes, and optionally hyperlinking different tables
3. Extract and display metadata from an HDF5 file as an easy-to-read diagram with optional bespoke highlighting
4. Choose from the available colour schemes and stereotypes or define your own
Please see the detailed guides to installation and setup in the documentation.
-
please refer to the examples for detailed guides on how to use mochada_kit.
-
to get an idea of what the workflow diagrams, tables and json diagrams look like, please have a look at the .svg images in
mochada_kit/gallery
. You can open .svg files in any browser. The plantuml (puml) code on which they are based is available inmochada_kit/gallery/puml_code
. -
the detailed examples in the documentation are also provided as jupyter notebooks in
mochada_kit/examples
and as Python scripts inmochada_kit/examples/python_scripts
. Here is a short description of each example:
Example | Description |
---|---|
make_workflow_diagram.ipynb |
basic introduction to making workflow diagrams |
using_hyperlinks_in_workflow_digarams.ipynb |
how to use hyperlinks to link several diagrams or to link to an external resource |
make_CHADA_tables_from_json_or_yaml.ipynb |
how to use plantuml to generate CHADA tables from a single json or yaml file |
json_diagram_from_hdf5_metadata.ipynb |
extract metadata from an hdf5 file and plot it as a json diagram with plantuml with optional bespoke highlighting |
generating_mochada_themes.ipynb |
how to make MOCHADA themes with different colour schemes |
CHADA_and_MODA_legend_all_themes.ipynb |
put a legend for MODA and CHADA elements for all the different themes in one plot for comparison |
CHADA_legend_all_themes.ipynb |
put a legend for CHADA elements for all the different themes in one plot for comparison |
MODA_legend_all_themes.ipynb |
put a legend for MODA elements for all the different themes in one plot for comparison |
mochada_kit can be cited according to this guide.
This package is being developed as part of the EU project: MaMMoS