Materials-Data-Science-and-Informatics / iridium

Python library for convenient access to Invenio RDM through its public REST API.
MIT License
2 stars 2 forks source link
invenio python

Iridium

Project status Test Coverage Docs

The metal Iridium is used to refine and enhance metal alloys. Similarly, this package provides an enhanced Python coating around the InvenioRDM APIs.

It provides:

Currently only the Vocabulary and Draft/Record APIs are supported.

Other APIs (such as Communities and Requests APIs) might follow when there is interest and the REST APIs are stabilized.

Compatibility

This package supports the officially supported Python versions, i.e. >=3.7.

Concerning the version of InvenioRDM, we currently do not give any commitment beyond supporting the latest official release (i.e. currently v8).

If the InvenioRDM REST APIs at some point get a structured versioning and change policy, i.e. it becomes possible to

we might reconsider and start committing to support active InvenioRDM LTS releases.

Getting Started

As a user, you can install this package just as any other package into your current Python environment using

$ pip install git+https://github.com/Materials-Data-Science-and-Informatics/iridium.git

As usual, it is highly recommended that you use a virtual environment to ensure isolation of dependencies between unrelated projects (or use poetry as described further below, which automatically takes care of this).

If you installed iridium successfully, you are probably interested in the high-level API. Read the tutorial to learn how to use it.

It is not advised to use the low-level API directly, unless you are an InvenioRDM expert. The low-level API documentation is minimal and located here.

Development

This project uses Poetry for dependency management, so you will need to have poetry installed in order to contribute.

Then you can run the following lines to setup the project and install the package:

$ git clone https://github.com/Materials-Data-Science-and-Informatics/iridium.git
$ cd iridium
$ poetry install

Run pre-commit install (see https://pre-commit.com) after cloning. This enables pre-commit to enforce the required linting hooks.

Run pytest (see https://docs.pytest.org) before merging your changes to make sure you did not break anything. To check coverage, use pytest --cov.

Note: Running the tests requires a recent and functioning InvenioRDM instance that you have access to.

To generate local documentation (as the one linked above), run pdoc -o docs iridium (see https://pdoc.dev).

Acknowledgements

HMC Logo    FZJ Logo


This project was developed at the Institute for Materials Data Science and Informatics (IAS-9) of the Jülich Research Center and funded by the Helmholtz Metadata Collaboration (HMC), an incubator-platform of the Helmholtz Association within the framework of the Information and Data Science strategic initiative.