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.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.1.0.tar.gz (24.4 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.1.0-py2.py3-none-any.whl (16.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file invenio-pure-1.1.0.tar.gz.

File metadata

  • Download URL: invenio-pure-1.1.0.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.11

File hashes

Hashes for invenio-pure-1.1.0.tar.gz
Algorithm Hash digest
SHA256 0534c7b373096983d327e06dfeafdad028e0dd17aa5022f482cb5874c5b3e0cb
MD5 d0ec0037a51d6d54a4dcbcae54f3f182
BLAKE2b-256 c46e14a9e0e7539a4d6ac8120cf31c60e7d835d8ee9bae85e765444202e22d3b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: invenio_pure-1.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.11

File hashes

Hashes for invenio_pure-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1e1fb74fb4b2e9513c9ea719c9b5566d87470f6088964e1ab425b8664cbb599c
MD5 bf23e3e79fba40ca79db587c0fa6ac10
BLAKE2b-256 8b5e6916a94af9edb14775afb69d7be641b4946cfc135d6c552e87e533750bb5

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