InvenioRDM Alpha 14 (December Release)

InvenioRDM Alpha 14 (December Release)

We’re excited to announce the InvenioRDM Alpha 14 (December release)!

What’s new?

Vocabularies support

The focus of the December release was to add support for linking bibliographic records with authority records such as subjects, grants, licenses, languages and more.

This includes:

  • Auto-complete on deposit fields
  • Facet searches based on vocabulary values
  • Support for internationalization on deposit, on facets, etc.
  • REST APIs for vocabularies
  • Linking of records in the backend.

Deposit form auto-completion

The most visible way to see the vocabularies in action is via the deposit form fields.

The below components were added in the deposit form and they support vocabulary autocompletion:

Languages

You can see the autocomplete search help:

And an example of i18n support, when the instance is in Turkish:

Licenses (preview)

We have added support for both standard and custom licenses. Note that, we were not able to fully complete this work, and there are known bugs in the license widget. Most notable you’ll see:

  • Search field does not allow spaces.
  • Link not working.
  • UX issues such as too long page.
  • Descriptions for licenses not available.



Subjects (preview)

The subjects field auto-complete from a subjects vocabulary that can host multiple different vocabularies at the same time.

The current version is not yet connected with the API, thus it has some demonstration values instead. Only the values you see in the image below can be selected. Don’t save a record with subjects yet either.


Invenio v3.4

Thanks to the hard work of the December Invenio sprint, Invenio v3.4 was released (see more here). The release of Invenio v3.4 was an important step for InvenioRDM. We now depend on stable releases of Semantic UI.

Partial save and error reporting

This release includes support for partial validation on draft creation. It also displays partial saves in the uploads page, for example with “No title” if the title was not included in the draft.

For example, creating an empty draft will tell you precisely what is missing at the top, along with pointers per field (see title at the bottom of the image).

The former error space will update to good (green) once you save a draft that is publication-ready. The publish button will then be enabled.

Install

Upgrade your invenio-cli to the new release: pip install --upgrade invenio-cli

$ invenio-cli init rdm
$ cd my-site
$ invenio-cli packages lock --pre
$ invenio-cli install --pre
$ invenio-cli services setup
$ pipenv run invenio vocabularies import languages licenses
$ invenio-cli run

Feedback

As always, we welcome your feedback. When you provide feedback on Discourse your message should be pre-populated with the classic template (bugs, what worked well, what didn’t work well, wishes for documentation).

Here is the template to give feedback if it’s not automated:

## Bugs

(note, that there's known issues in this release for license and subjects field)

## What worked well

## What didn't work well

## Wishes for documentation

Take care and stay safe!

Bugs

I was not able to run this command:
pipenv run invenio vocabularies import languages licenses

[invenio@invtest08 december-rdm-release]$ pipenv run invenio vocabularies import languages licenses

Usage: invenio [OPTIONS] COMMAND [ARGS]...

Try 'invenio --help' for help.

Error: No such command 'vocabularies'.

I could see the option vocabularies when looking at the options of invenio via

pipenv run invenio --help

Listing the invenio packages version I have:

invenio                     3.4.0a8

You should be using invenio 3.4…

So first, make sure you have invenio-cli 0.20.0 (upgrade to it if need be: pip install --upgrade invenio-cli). If you are creating an instance from scratch, then just following the steps with the new version of invenio-cli should work. If you are upgrading an instance, update your instance’s Pipfile by making sure it has the same versions as the Pipfile here: cookiecutter-invenio-rdm/{{cookiecutter.project_shortname}}/Pipfile at master · inveniosoftware/cookiecutter-invenio-rdm · GitHub .

Then re-install your dependencies - pipenv install or pipenv --rm followed by invenio-cli install --pre --development (I do the latter :man_shrugging: ).

@cfgamboa did you run the containerized or the local installation? if the containerized it needs to be run inside the container like this https://inveniordm.docs.cern.ch/preview/#running-invenio-commands.

In any case Invenio 3.4 does not contain the vocabularies module, it comes from invenio-rdm-records. So there is something missing… Could you share the Pipfile and the Pipfile.lock?

Hi

Updating the Invenio-cli client did the trick
[invenio@invtest08 december-rdm-release]$ invenio-cli --version
invenio-cli, version 0.20.0
In a new install I was able to run the invenio vocabularies command

[invenio@invtest08 december-rdm-release]$ pipenv run invenio vocabularies import languages licenses
[2021-01-12 10:09:53,288] WARNING in ext: JSONSCHEMAS_HOST is set to localhost
[2021-01-12 10:09:57,501] WARNING in ext: JSONSCHEMAS_HOST is set to localhost
creating vocabularies...
creating vocabulary type languages...
created 240 vocabulary items successfully
creating vocabulary type licenses...
created 448 vocabulary items successfully
vocabularies created

So probably upgrading the Invenio-cli command should be added to the list of commands to be used on this release.

Another question is this ‘JSONSCHEMAS_HOST’, if this is a relevant configuration parameter probably is included in the documentation, I have not have the chance to look into it.

WARNING in ext: JSONSCHEMAS_HOST is set to localhost
creating vocabularies...

I will resume the installation and report later if needed, thank you!

Ah perhaps we haven’t been cleared throughout: every monthly release is through an update to invenio-cli. Next month, you will also have to upgrade invenio-cli to 0.21.0 and so on. I’ll pay attention to this so that we communicate it correctly everytime.

yeah… I think the warnings are deceptive, but perhaps to someone else they are useful. I wouldn’t worry about them in general. It is a sign that we need to mask them however…

In any case, here, having JSONSCHEMAS_HOST set to localhost is good and it is what a new instance will set by default. If you had an already existing instance (like I did), you would need to set it in your invenio.cfg - otherwise vocabulary import crashes. I don’t know much about this setting but @ppanero knows better the story behind it.

@cfgamboa @fenekku the JSONSCHEMAS_HOST is needed now for vocabularies linked records to work correctly. It should be done properly (without you having to worry about it) in the next release.

Thank you for the explanation @ppanero

it appears that on this release there are two virtualenv location created:
drwxrwxr-x 5 invenio invenio 87 Jan 12 12:17 invenio-3iceBxKT
drwxrwxr-x 8 invenio invenio 119 Jan 12 12:28 december-release-rdm-f_1EYDwU

If I call the shell it will use the invenio-XXX one:

(invenio) [invenio@invtest08 invenio-venv]$ invenio-cli shell
Shell for /opt/invenio/invenio-venv/invenio-3iceBxKT already activated.
No action taken to avoid nested environments.

Any ideas?

No changes were introduced in this release to the way virtualenvs are created. invenio-cli creates a single virtualenv in the new directory created by invenio-cli init rdm. Perhaps there was already a previous virtualenv existing. Note that invenio-cli may be installed (and typically is) in a different virtualenv. Because we use pipenv under the hood, any pipenv settings in the environment may affect virtualenv creation too.