### Example ColumnSettings YAML Configuration Source: https://linkml.io/schemasheets/datamodel/ColumnSettings Demonstrates how to configure column settings using a YAML block beneath a column header. This example shows the basic structure for defining a class. ```yaml > class ``` -------------------------------- ### Install Schemasheets via Pip Source: https://linkml.io/schemasheets/install Install the Schemasheets package using pip. This is the standard method for installing Python packages. ```bash pip install schemasheets ``` -------------------------------- ### Verify Schemasheets Installation Source: https://linkml.io/schemasheets/install Check if the Schemasheets installation was successful by running the --help command. This displays the command-line usage 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://linkml.io/schemasheets/intro/export Run this command to display the complete help information for the `linkml2sheets` utility, outlining all available options and usage patterns. ```bash linkml2sheets --help ``` -------------------------------- ### Run Schemasheets using Docker Source: https://linkml.io/schemasheets/install Execute Schemasheets commands within a Docker container. This is useful for environments where direct installation is not preferred or possible. Mount the current directory to access files within the container. ```bash docker run -v $PWD:/work -w /work -ti linkml/schemasheets sheets2linkml --help ``` -------------------------------- ### Generate Project from Sheets Source: https://linkml.io/schemasheets/intro/converting Use this command to generate project artifacts like JSON schema and SHACL, as well as a website, from TSV files in the src folder. Assumes your schema is arranged as a set of sheets. ```bash sheets2project -d . src/*.tsv ``` -------------------------------- ### Convert LinkML Schema to Multiple Schemasheets Source: https://linkml.io/schemasheets/intro/export This command converts a LinkML schema into multiple schemasheet files located in a specified directory. Input schemasheets define the structure and columns for the output files. ```bash linkml2sheets -s schema.yaml -d sheets/ ``` -------------------------------- ### Overwrite Existing Schemasheets Source: https://linkml.io/schemasheets/intro/export When converting to multiple schemasheets and the output directory is the same as the input, use the `--overwrite` flag to explicitly allow overwriting existing files. This prevents accidental data loss. ```bash linkml2sheets -s schema.yaml -d sheets/ --overwrite ``` -------------------------------- ### Convert LinkML Schema to Single Schemasheet Source: https://linkml.io/schemasheets/intro/export Use this command to convert a LinkML schema (YAML) into a single schemasheet (TSV). Output can be directed to a file using the `--output` option or to standard output if omitted. ```bash linkml2sheets -s schema.yaml -o output.tsv ``` -------------------------------- ### Convert Schemasheet Formats using sheets2linkml and linkml2sheets Source: https://linkml.io/schemasheets/intro/export This sequence of commands demonstrates converting between two different schemasheet specifications. First, `sheets2linkml` converts a custom schemasheet (schema1.tsv) to a LinkML schema (schema1.yaml). Then, `linkml2sheets` converts this LinkML schema into a different schemasheet format (schema2_full.tsv). ```bash sheets2linkml schema1.tsv > schema1.yaml linkml2sheets -s schema1.yaml schema2.tsv > schema2_full.tsv ``` -------------------------------- ### Generate LinkML Schema from Sheets Source: https://linkml.io/schemasheets/intro/converting Use this command to generate only the LinkML YAML schema from your TSV files. Specify the output file name with -o. ```bash sheets2linkml -o my.yaml src/*.tsv ``` -------------------------------- ### Convert Google Sheets to LinkML Schema Source: https://linkml.io/schemasheets/howto/google-sheets Use the sheets2linkml command with the --gsheet-id option to specify a Google Sheet ID. Each subsequent argument is treated as a sheet name within that document. This automatically downloads and transforms the specified sheets into a LinkML schema. Note: This method may fail with float, decimal, or boolean data types due to a Google Sheets API bug. ```bash sheets2linkml --gsheet-id 1wVoaiFg47aT9YWNeRfTZ8tYHN8s8PAuDx5i2HUcDpvQ personinfo types prefixes -o personinfo.yaml ``` -------------------------------- ### Convert TSV to LinkML Source: https://linkml.io/schemasheets/intro/basics Use the `sheets2linkml` command-line tool to convert a TSV schema file into a LinkML schema. Ensure the TSV file is in your current directory. ```bash sheets2linkml personinfo.tsv ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.