https://github.com/rdmorganiser/rdmo-plugins-ror
https://github.com/rdmorganiser/rdmo-plugins-ror
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rdmorganiser/rdmo-plugins-ror
- Owner: rdmorganiser
- License: apache-2.0
- Created: 2025-01-12T11:40:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-16T11:46:34.000Z (10 months ago)
- Last Synced: 2025-08-16T13:44:56.417Z (10 months ago)
- Language: Python
- Size: 20.5 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
rdmo-plugins-ror
================
This plugin implements dynamic option set, that queries the expanded-search endpoint of the [ROR API](https://ror.readme.io/docs/rest-api).
Setup
-----
Install the plugin in your RDMO virtual environment using pip (directly from GitHub):
```bash
pip install git+https://github.com/rdmorganiser/rdmo-plugins-ror
```
Add the `rdmo_ror` app to `INSTALLED_APPS` and the plugin to `OPTIONSET_PROVIDERS` in `config/settings/local.py`:
```python
INSTALLED_APPS += ['rdmo_ror']
...
OPTIONSET_PROVIDERS += [
('ror', _('ROR Provider'), 'rdmo_ror.providers.RorProvider')
]
```
The option set provider should now be selectable for option sets in your RDMO installation. For a minimal example catalog, see the files in `xml`.
If a selection of a ROR ID should update other fields, you can add a `ROR_PROVIDER_MAP` in your settings, e.g.:
```python
ROR_PROVIDER_MAP = [
{
'ror': 'https://rdmorganiser.github.io/terms/domain/project/partner/ror',
'alias': 'https://rdmorganiser.github.io/terms/domain/project/partner/id',
'acronym': 'https://rdmorganiser.github.io/terms/domain/project/partner/id',
'name': 'https://rdmorganiser.github.io/terms/domain/project/partner/name',
}
]
```
In this case, a change to the identifier of a partner (`https://rdmorganiser.github.io/terms/domain/project/partner/ror`) will update their name (`https://rdmorganiser.github.io/terms/domain/project/partner/name`) automatically. `ROR_PROVIDER_MAP` is a list of mappings, since multiple ROR ID could be used and should update different other values.
While not required, you can add a custom `User-Agent` to your requests so that the provider can perform statistical analyses and, if you add an email address, might contact you. This can be done by adding the following to your settings.
```python
ROR_PROVIDER_HEADERS = {
'User-Agent': 'rdmo.example.com/1.0 (mail@rdmo.example.com) rdmo-plugins-ror/1.0'
}
```