### ColumnSettings YAML Configuration Example Source: https://github.com/linkml/schemasheets/blob/main/docs/datamodel/ColumnSettings.md Demonstrates how to configure column settings using a YAML block beneath a column header. This example shows a basic class declaration. ```yaml > class ``` -------------------------------- ### Install Schemasheets Source: https://github.com/linkml/schemasheets/blob/main/README.md Install the Schemasheets package using pip. This command is typically run in a terminal or command prompt. ```bash pip install schemasheets ``` -------------------------------- ### Verify Schemasheets Installation Source: https://github.com/linkml/schemasheets/blob/main/docs/install.md Test the installation by running the `sheets2linkml` command with the `--help` flag to display its usage information and options. ```bash sheets2linkml --help Usage: sheets2linkml [OPTIONS] [TSV_FILES]... Convert schemasheets to a LinkML schema Example: sheets2linkml my_schema/*tsv --output my_schema.yaml If your sheets are stored as google sheets, then you can pass in --gsheet-id to give the base sheet. In this case arguments should be the names of individual tabs Example: sheets2linkml --gsheet-id 1wVoaiFg47aT9YWNeRfTZ8tYHN8s8PAuDx5i2HUcDpvQ personinfo types -o my_schema.yaml Options: -o, --output FILENAME output file -n, --name TEXT name of the schema --unique-slots / --no-unique-slots All slots are treated as unique and top level and do not belong to the specified class [default: False] --repair / --no-repair Auto-repair schema [default: True] --gsheet-id TEXT Google sheets ID. If this is specified then the arguments MUST be sheet names -v, --verbose --help Show this message and exit. ``` -------------------------------- ### Get Help for linkml2sheets Source: https://github.com/linkml/schemasheets/blob/main/docs/intro/export.md Run this command to display complete help information for the linkml2sheets utility, outlining all available options and usage scenarios. ```bash linkml2sheets --help ``` -------------------------------- ### ColumnSettings: Curie Prefix Example Source: https://github.com/linkml/schemasheets/blob/main/docs/datamodel/ColumnSettings.md Illustrates how to use the 'curie_prefix' attribute to prepend a CURIE prefix to column values. This is useful for columns that map to URIs or CURIEs. ```yaml exact_mapping: curie_prefix: dcterms ``` -------------------------------- ### Convert Between Schemasheet Formats Source: https://github.com/linkml/schemasheets/blob/main/docs/intro/export.md Uses sheets2linkml and linkml2sheets to map one schemasheet format to another. This example converts schema1.tsv to the format expected by schema2.tsv. ```bash sheets2linkml schema1.tsv > schema1.yaml linkml2sheets -s schema1.yaml schema2.tsv > schema2_full.tsv ``` -------------------------------- ### Run Schemasheets via Docker Source: https://github.com/linkml/schemasheets/blob/main/docs/install.md Execute the `sheets2linkml` command within a Docker container. This method is useful if you prefer to use Docker or avoid direct Python installation. ```bash docker run -v $PWD:/work -w /work -ti linkml/schemasheets sheets2linkml --help ``` -------------------------------- ### Generate Project Artifacts from Schemasheets Source: https://github.com/linkml/schemasheets/blob/main/docs/intro/converting.md Use this command to generate individual folders for JSON schema, SHACL, and a website from your TSV schemasheet files. Place your TSV files in the 'src' folder. ```bash sheets2project -d . src/*.tsv ``` -------------------------------- ### Convert LinkML Schema to Schemasheets (Multi-sheet) Source: https://github.com/linkml/schemasheets/blob/main/docs/intro/export.md Converts a LinkML schema to multiple schemasheet TSV files within a specified directory. Use the --overwrite flag if the output directory is the same as the input. ```bash linkml2sheets -s schema.yaml sheets/*tsv --directory output ``` -------------------------------- ### Convert LinkML Schema to Schemasheet (Single-sheet) Source: https://github.com/linkml/schemasheets/blob/main/docs/intro/export.md Converts a LinkML schema to a single schemasheet TSV file. Output is directed to stdout by default, or to a specified file using the --output option. ```bash linkml2sheets -s schema.yaml single_sheet.tsv -o output.tsv ``` -------------------------------- ### Convert Google Sheet to LinkML Schema Source: https://github.com/linkml/schemasheets/blob/main/README.md Convert a Google Sheet to a LinkML schema YAML file. Specify the Google Sheet ID and the relevant tab names. The output file is named 'personinfo.yaml'. ```bash sheets2linkml --gsheet-id 1wVoaiFg47aT9YWNeRfTZ8tYHN8s8PAuDx5i2HUcDpvQ personinfo types prefixes -o personinfo.yaml ``` -------------------------------- ### Generate LinkML YAML from Schemasheets Source: https://github.com/linkml/schemasheets/blob/main/docs/intro/converting.md Use this command to generate only LinkML YAML files from your TSV schemasheet files. Specify the output file name with the -o flag. ```bash sheets2linkml -o my.yaml src/*.tsv ``` -------------------------------- ### Convert Schemasheet to LinkML Schema Source: https://github.com/linkml/schemasheets/blob/main/docs/intro/export.md Converts one or more schemasheet TSV files into a LinkML schema in YAML format. The output is directed to stdout. ```bash sheets2linkml schema1.tsv > schema1.yaml ``` -------------------------------- ### Convert TSV to LinkML Schema Source: https://github.com/linkml/schemasheets/blob/main/README.md Convert a local TSV file to a LinkML schema YAML file. First, download the TSV file, then use the sheets2linkml command with the TSV file as input. ```bash wget https://raw.githubusercontent.com/linkml/schemasheets/main/tests/input/personinfo.tsv sheets2linkml personinfo.tsv -o personinfo.yaml ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.