These tools convert the MITI schema between 3 different formats:
yaml
. The reference YAML specification, designed to be validated with Cerberus.flatfields
. A specification based on a flat table of fields.frictionless
. A Frictionless Data data package schema.
The translation is not perfect, as the schema languages are not equivalent.
The top level of this repository comprises a Python package, which is the standard structure for a Python source repository. To install from source, after git clone
and cd mititools
:
pip install .
mititools generate --source-dir path-to-yaml/
This creates:
flatfields/fields.tsv
flatfields/tables.tsv
frictionless/datapackage.json
cv/*
controlled vocabulary tablesexample_fd_package/
A snapshot of the most recently generated version of artifacts 1-4 are committed as part of this repository. Item 5 is not.
Frictionless Data (FD) is an extensive and modular system of high-level data management tools, with consistent bindings in Python, JavaScript, and the bash command-line.
frictionless validate example_fd_package/datapackage.json
Output:
# -----
# valid: biospecimen.tsv
# -----
# -----
# valid: cell.tsv
# -----
...
frictionless describe example_fd_package/cell.tsv
Output:
# --------
# metadata: example_fd_package/cell.tsv
# --------
dialect:
delimiter: "\t"
encoding: utf-8
format: tsv
hashing: md5
name: cell
path: example_fd_package/cell.tsv
profile: tabular-data-resource
schema:
fields:
- name: data_file_id
type: any
- name: filename
type: any
- name: file_format
type: any
- name: parent_id
type: any
- name: software_and_version
type: any
- name: commit_sha
type: any
- name: comment
type: any
- name: header_size
type: any
- name: object_classes_included
type: any
- name: object_classes_description
type: any
- name: fov_size_x
type: any
- name: fov_size_y
type: any
- name: pyramid
type: any
- name: z_stack
type: any
- name: t_series
type: any
- name: type
type: any
- name: physical_size_x
type: any
- name: physical_size_xunit
type: any
- name: physical_size_y
type: any
- name: physical_size_yunit
type: any
- name: physical_size_z
type: any
- name: physical_size_zunit
type: any
- name: cell_state_level
type: any
scheme: file