inveniosoftware / invenio-cli

CLI module for Invenio
https://invenio-cli.readthedocs.io
MIT License
10 stars 43 forks source link

invenio-cli: introduce require_version decorator #328

Open zzacharo opened 1 year ago

zzacharo commented 1 year ago

Currently, invenio-cli is not binded to any rdm/ils version. That means, that every release with breaking change cannot be done in a safe manner.

Proposal

Investigate how to add a require_version() decorator that can be used to mark individual methods and require a minimum version of an rdm/ils project in order to run. In case the condition is not met, we can control a raise=True/False based on our needs.

See how to get the information about the version e.g for custom-fields https://github.com/inveniosoftware/invenio-cli/blob/master/invenio_cli/commands/services.py#L187