Skip to content

Commit

Permalink
affiliations: update import example
Browse files Browse the repository at this point in the history
* Update affiliations documentation to reflect InvenioRDM v12
* Highlight the introduction of the new format in v12
* add the new update fixture command
  • Loading branch information
Samk13 authored and fenekku committed May 24, 2024
1 parent 26c5ea8 commit c80b554
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion docs/customize/vocabularies/affiliations.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ affiliations:
data-file: vocabularies/affiliations_ror.yaml
```
The `affiliations_ror.yaml` file can be downloaded from [here](https://github.com/inveniosoftware/cookiecutter-invenio-rdm/raw/master/%7B%7Bcookiecutter.project_shortname%7D%7D/app_data/vocabularies/affiliations_ror.yaml).

Afterwards you will need to import the affiliations. To do so, run the following command
Expand All @@ -43,3 +42,22 @@ invenio rdm-records fixtures
This means that once they are created, modifying the file and re-running the above
command will have no effect. So make sure you have the correct configuration before
running the `fixtures` command.

_Introduced in InvenioRDM v12_

From V12 onwards, the previous method has been simplified. You can now enable affiliations directly by specifying the data file in `app_data/vocabularies.yaml`:

```yaml
affiliations:
pid-type: aff
data-file: vocabularies/affiliations_ror.yaml
```

To update the fixtures with the new dataset, run the following command:

```bash
invenio rdm-records add-to-fixture affiliations
```

!!! warning "Note"
This command will not delete existing vocabulary entries.

0 comments on commit c80b554

Please sign in to comment.