Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: ✏️ indicate which functions aren't done #1017

Merged
merged 4 commits into from
Jan 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions docs/design/interface/python-functions.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function.](images/core/create-resource-properties.svg){#fig-create-resource-prop
fig-alt="A Plant UML schematic of the detailed code flow within the `create_resource_properties()` function."}
:::

::: {.callout-note collapse="true"}
::: {.callout-warning collapse="true"}
### `write_resource_data_to_raw(path, data_path)`

Copy the file from `data_path` over into the resource location given by
Expand All @@ -160,7 +160,7 @@ function.](images/core/write-resource-data-to-raw.svg){#fig-write-resource-data-
fig-alt="A Plant UML schematic of the detailed code flow within the `write_resource_data_to_raw()` function."}
:::

::: {.callout-note collapse="true"}
::: {.callout-warning collapse="true"}
### `write_resource_parquet(raw_files, path)`

This function takes the files provided by `raw_files` and merges them
Expand All @@ -170,7 +170,7 @@ and `path_resource_raw_files()` for the `raw_files` argument. Outputs
the path object of the created file.
:::

::: {.callout-note collapse="true"}
::: {.callout-warning collapse="true"}
### `edit_resource_properties(path, properties)`

Edit the properties of a resource in a package. The `properties`
Expand All @@ -181,7 +181,7 @@ correct path location. Outputs a JSON object only; use
`datapackage.json` file.
:::

::: {.callout-note collapse="true"}
::: {.callout-warning collapse="true"}
### `delete_resource_raw_file(path, confirm)`

Use this to delete a raw file in the `raw/` folder of a resource. This
Expand All @@ -194,7 +194,7 @@ to the function argument as confirmation. This is done to prevent
accidental deletion. Outputs `true` if the deletion was successful.
:::

::: {.callout-note collapse="true"}
::: {.callout-warning collapse="true"}
### `delete_resource_data(path, confirm)`

Delete all data (Parquet) and raw data of a specific
Expand All @@ -207,7 +207,7 @@ confirmation. This is done to prevent accidental deletion. Outputs
properties/metadata for the resource.
:::

::: {.callout-note collapse="true"}
::: {.callout-warning collapse="true"}
### `delete_resource_properties(path, confirm)`

Deletes all properties for a resource within the `datapackage.json`
Expand Down Expand Up @@ -235,7 +235,7 @@ function.](images/core/write-resource-properties.svg){#fig-write-resource-proper
fig-alt="A Plant UML schematic of the detailed code flow within the `write_resource_properties()` function."}
:::

::: {.callout-note collapse="true"}
::: {.callout-warning collapse="true"}
### `extract_resource_properties(path, data_path)`

This takes the data found at the `data_path` location and creates a JSON
Expand Down Expand Up @@ -332,26 +332,27 @@ outputs a `PackageProperties` object.

## Helper functions

::: {.callout-note collapse="true"}
### `list_files(path)`
::: {.callout-warning collapse="true"}
### `pretty_json(json)`

List all files in a directory. Outputs a list of path objects.
Create a prettier, human readable version of a JSON object.
:::

::: {.callout-note collapse="true"}
### `pretty_json(json)`
::: {.callout-warning collapse="true"}
### `write_text(text, path)`

Create a prettier, human readable version of a JSON object.
Writes a text string to a file at the given path. Outputs the path
object of the created file.
:::

## Observational unit level functions
## Observational unit functions

Observational unit is the level of detail on the entity (e.g. human,
animal, event) that the data was collected on. An example would be: A
person in a research study who came to the clinic in May 2024 to have
their blood collected and to fill out a survey.

::: {.callout-note collapse="true"}
::: {.callout-warning collapse="true"}
### `delete_participant_data()`

TODO.
Expand Down