Metadata.yaml files for all sources of COL. Each folder (named by the current alias or key if missing) contains the following files:
{key}-metadata.yaml
: the current metadata of the latest version imported into ChecklistBank{key}-patch.yaml
(optional): the patch if it exists
The latest.yaml file can be edited in any plain text editor like TextMate on a Max or Notepad++ on Windows. We recommend Visual Studio Code though, because it can validate the YAML to our JSON schema and provide editing suggestions. It is freely available for both Mac & Windows.
Based on https://dev.to/brpaz/how-to-create-your-own-auto-completion-for-json-and-yaml-files-on-vs-code-with-the-help-of-json-schema-k1i and https://scottaddie.com/2016/08/02/community-driven-json-schemas-in-visual-studio-2015/
In order to validate the yaml files we need to tell VS Code where our JSON schema is. This can be done on the VS Code Settings page. Make sure you have the YAML Extension installed before continuing.
Then, go to Code/File -> Preferences -> Settings (or use the Command Pallete) to open the settings page and search for yaml. Open the settings for the YAML extension and search for "Yaml: Schemas" and click "Edit in settings.json".
The "settings.json" file will open. If it doesn´t exist yet, you will have to create it.
Copy the following yaml and suggest settings to your VSCode settings. This will enable validation and auto suggestion for COL metadata for the -latest.yaml
, -patch.yaml
and metadata.yaml
files:
{
"yaml.schemas": {
"https://raw.githubusercontent.com/CatalogueOfLife/coldp/master/metadata.json": ["*-metadata.yaml", "*-patch.yaml", "metadata.yaml"],
},
"yaml.disableAdditionalProperties": true,
"yaml.validate": true,
"files.associations": {
"*.yaml": "yaml"
},
"javascript.suggest.names": false,
"editor.suggest.showWords": false,
"security.workspace.trust.untrustedFiles": "open",
}
Save the file and reload VS Code to finish the process.
If everything worked as expected, when we create a new metadata.yaml file and press CTRL + Space, VS Code should then display the suggestions based on the schema we created for this file type. Note that, it could take some seconds for VS Code to index the schema in the first time.
- organisation address
- organisation should usually be the university whereas if it's an institute, museum or survey of the university, that should be the department. If there's more than one department, it should just be comma separted with smallest unit to largest.
- split agents if they contain multiple names
- issued date is ISO date 1999; 1999-01; 1999-01-21
You can also check the validity of the YAML files here by uploading or copy pasting your YAML file: https://data.dev.catalogueoflife.org/tools/metadata-validator