flowchart
parquet[/"Parquet data<br>[PARQUET-PATH]"/]
read_parquet["read_parquet()"]
output_opt["Output path<br>[--output]"]
output[/"Python script<br>[File]"/]
data[("DataFrame<br>(Tidy)")]
extract_resource_metadata("extract_resource_metadata()")
metadata[("ResourceProperties<br>(extracted)")]
parquet --> read_parquet
read_parquet --> data
data --> extract_resource_metadata
extract_resource_metadata --> metadata
output_opt --> write_metadata["write_resource_metadata()"]
metadata --> write_metadata
write_metadata --> output
Python interface
This document describes the design of the Python functions forming the CLI and the library layer, as well as tracking implementation status.
We use symbols to indicate the status of implementation (see table below). For planned or in-progress work, we might include signatures, docstrings, and pseudocode to clarify the design. Once the interface is implemented, these are replaced by links to the reference documentation.
| Status | Description |
|---|---|
| Interface that has been implemented. | |
| Interface that is currently being worked on. | |
| Interface that is planned, but isn’t being worked on currently. |
CLI functions
extract_metadata()
extract_metadata() has two arguments: parquet_path and output_path. The parquet_path argument is the path to a Parquet file in, e.g. the staging/ directory, and the output_path argument is the path to the Python script that will have the ResourceProperties() dataclass filled in with the extracted metadata.