Skip to main content

"Provides API for PURE."

Project description

https://github.com/tu-graz-library/invenio-rdm-pure/workflows/CI/badge.svg https://coveralls.io/repos/github/tu-graz-library/invenio-rdm-pure/badge.svg https://img.shields.io/github/tag/fair-data-austria/invenio-rdm-pure.svg https://img.shields.io/pypi/dm/invenio-rdm-pure.svg https://img.shields.io/github/license/fair-data-austria/invenio-rdm-pure.svg https://readthedocs.org/projects/invenio-rdm-pure/badge/?version=latest https://img.shields.io/badge/code%20style-black-000000.svg

Invenio module that adds TUGraz Pure integration.

Further documentation is available on https://invenio-rdm-pure.readthedocs.io/

— — — —

CLI - SCHEDULED TASKS

Changes: Gets from Pure ‘changes’ endpoint all records that have been created / updated / deleted on a certain date and modifies accordingly the relative RDM records.

Owner: Gets from Pure all the records belonging to a certain user and modifies/create RDM records accordingly. Takes in input two attributes: –identifier: with possible values ‘externalid’ or ‘orcid’ –identifierValue: with the ‘externalid’ or ‘orcid’ of the user

Pure_import: Get records from RDM and creates with this data an XML file suitable to be imported into Pure, which will be available at the URL …/pure_import. The RDM records are filtered in two ways: - Records that have a value in the field extensions/tug:uuid have been imported from Pure, therefore will be ignored. See _check_uuid method in invenio_rdm_pure/source/pure/import_records.py - All records created before the date of the import will be ignored. See _check_date method in invenio_rdm_pure/source/pure/import_records.py

Group_split: When a group in Pure (organisationalUnit) splits in two, the same process needs to take place also in RDM. Therefore, the following steps: - Create new groups - Add users belonging to old group into the new groups - Remove users from old group - Delete old group - Modify RDM records belonging to the old group It takes as input parameters

Group_merge: It is the opposite process as compared to group_split. In this case, two groups in Pure (organisationalUnit) merge into one following the next steps: - Create new group - Remove users from old groups - Add users to new group - Delete old groups - Modify RDM records belonging to the old groups

Logs: Removes all old log files from invenio_rdm_pure/reports. The number of days that these files will be kept is specified in invenio_rdm_pure/setup.py days_keep_log variable.

Pages: Gets records from Pure ‘research-outputs’ endpoint by page and submit them to RDM. Takes in input three attributes: – pageStart: initial page of import – pageEnd: last page of import – pageSize: size of imported pages

— — — —

CLI - NOT SCHEDULED TASKS

Testing: Performs testing related to: - RDM records creation and deletion; - RDM user creation, role assignment, role removal, user deactivation;

Delete: Deletes all records listed (by recid) in invenio_rdm_pure/data/to_delete.txt

Uuid: Adds to RDM all records listed (by uuid) in invenio_rdm_pure/data/to_transmit.txt

— — — —

DATA DIRECTORY

Invenio_rdm_pure/data/

all_rdm_records.txt: all records that will be added to RDM will be listed in this file, adding for each record Pure uuid and RDM recid.

successful_changes.txt: holds the list of dates in which a successful changes task was performed.

user_ids_match.txt: when running owners task, a match between externalId and RDM user id is done. This information will be store in this file following the order: RDM user id – Pure uuid – External id

— — — —

VIEWS

https://127.0.0.1:5000/pure_import Returns an XML file containing RDM records formatted for Pure import

https://127.0.0.1:5000/database_uri Creates in invenio_rdm_pure/data_setup/ the necessary files for database interaction

https://127.0.0.1:5000/user_import_records • Gets the externalId of the logged-in user • Gets from Pure all records belonging to the given externalId • Checks if these records are already in RDM; if not, they will be added Note: this is a temporary way to trigger this task. It was necessary to trigger through the browser in order to get the user externalId. When celery scheduled tasks will be running there will be no need any more of this view.

Changes

Version v1.4.0 (release 2025-05-22)

  • jobs: add job for marking in pure

Version v1.3.0 (release 2025-04-29)

  • setup: add python3.13 support

  • tasks: add logger messages

  • fix: config variable naming

  • jobs: add jobs

  • wip: type hints improvements

Version v1.2.0 (release 2025-01-24)

  • model: add size to get more records

  • chore: update ruff configuration

  • api: add methods to get publisher and journal

Version v1.1.0 (release 2025-01-09)

  • fix: permission

Version v1.0.0 (release 2025-01-07)

  • setup: update ruff configuration

  • global: remove username and password usage

  • cli: improve output

  • cli: add command list

  • cli: add command sync

  • global: refactore to service approach

  • setup: migrate to ruff

Version v0.1.2 (release 2023-01-16)

  • fix: missing exports

Version v0.1.1 (release 2023-01-11)

  • setup: remove translation config

Version v0.1.0 (release 2023-01-11)

Version 0.1.0 (released TBD)

  • Initial public release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

invenio_pure-1.4.0.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

invenio_pure-1.4.0-py2.py3-none-any.whl (18.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file invenio_pure-1.4.0.tar.gz.

File metadata

  • Download URL: invenio_pure-1.4.0.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for invenio_pure-1.4.0.tar.gz
Algorithm Hash digest
SHA256 15c1d9e55127bd6390d25fab7cdc66f984493c109157093579d9429587281757
MD5 53ce76edce921939ed067a2e43996267
BLAKE2b-256 4cde86c68f247349167daf46fa61fa984cbc469fed9b35065ea0af37fd1dbd21

See more details on using hashes here.

File details

Details for the file invenio_pure-1.4.0-py2.py3-none-any.whl.

File metadata

  • Download URL: invenio_pure-1.4.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for invenio_pure-1.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9d07eaba60a5a0671b08ade33c55533b696b093e729dbdeced1de20fa187904a
MD5 11313cc3ca59995ec1d6972d39dc26a4
BLAKE2b-256 194a980f3acc4f8a9071bfde002c51e3e3066fdc3f374d3418ade2cd05e3a79b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page