Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ark: get rid of archetype #928

Merged
merged 1 commit into from
Jun 29, 2023
Merged

ark: get rid of archetype #928

merged 1 commit into from
Jun 29, 2023

Conversation

jma
Copy link
Contributor

@jma jma commented Apr 26, 2023

  • Adds a Ark NAAN configuration into organisation.
  • Disallows Ark NAAN configuration modification for non super user.
  • Mints an ark identifier if the document organisation contains a NAAN.
  • Removes legacy code.
  • Closes ARK persistent identifiers: activate storage, display and redirection #652.
  • Adds the cli to create an ARK in existing documents.
  • Removes unused file.
  • Adds document Dublin Core export format.
  • Moves ark in identifiedBy.
  • Uses dumpers to enrich indexed documents.
  • Adds dublin core as export format.
  • Closes Activate search by identifier [2] #669.
  • Adds the full URI version of the ARK on the search result API.
  • Sets the application configurations for the test to allow the use of
    multiple docker-compose files.
  • Uses angular 14.
  • Solves safety, need to move to Flask 2.
  • Fixes json-ld context value.
  • Adds multiple identifiers for dublin core.
  • Uses ARK URI for @id and identifier field in json-ld.
  • Fixes some tests.

Co-Authored-by: Johnny Mariéthoz Johnny.Mariethoz@rero.ch

Why are you opening this PR?

  • US 652

How to test?

  • Create a document for the unifr.
  • Login with the super admin.
  • Add a NAAN configuration for the unifr organisation.
  • Create new document for the unifr.
  • Check the présence of the ark in the document detailed view and check the redirection.
  • Redo the process with a validated deposit.
  • Login with an organisation admin, the NANN configuration should not be present in the org editor.
  • Let me know once you did some tests, I want to test the script to add missing ark in documents.
  • You can test the dublin core export by adding a &format=dc on the document API.
  • Check identifiers:
    • in the public document detailed view (permalink, code source for scholar, code source for json-ld)
    • in the dublin core export format (oaipmh and REST API)

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?
  • Extracted translations?

@jma jma force-pushed the maj-new-ark branch 4 times, most recently from c249358 to 4ea30a8 Compare April 27, 2023 05:55
@jma jma changed the title in progress ark: git rid of archetype Apr 27, 2023
@jma jma force-pushed the maj-new-ark branch 5 times, most recently from 0fc271b to 2945a54 Compare May 3, 2023 10:26
@jma jma marked this pull request as ready for review May 3, 2023 12:20
@jma jma requested review from rerowep and PascalRepond May 3, 2023 12:20
@jma jma changed the title ark: git rid of archetype ark: get rid of archetype May 4, 2023
"""Create an ark identifier in the document of the given organisation."""
organisation = OrganisationRecord.get_record_by_pid(organisation_pid)
if not organisation:
click.secho('Organisation does not exists.', fg='red')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"does not exist"

raise click.Abort()
if not organisation.get('arkNAAN'):
click.secho(
'NAAN configuration does not exists for the given organisation.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"does not exist"

Copy link
Collaborator

@mmo mmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested changes:

  • In the organisation schema: adjust the arkNaan field label: "Ark Name Assigning Authority Number (NAAN)" (instead of simply "Ark Name Assigning Authority Number").
  • In the organisation's detailed view: add missing fields:
    • serverName
    • allowedIps
    • arkNaan
    • platformName
  • In the document schema: change the ark field content in order to make it an actionable URL (cf. How do I cite or advertise an ARK?); example:
    • "ark": "https://n2t.net/ark:/9999897987/ffk3515",
    • instead of "ark": "ark:/9999897987/ffk3515",.
    • add the full version into the identifiedBy.uri field.

Nice to have:

  • In the document schema: move the ark identifier field to inside the identifiedBy section (as with all the other document identifiers).
  • Side development: copy all identifiedBy values to a new field identifiers at the root of the document, so that they become searchable. See also issue Activate search by identifier [2] #669.
  • Return the metadata of the record, in Dublin Core format, when a ? is added to the end of an ARK. This is called the "inflection" mechanism and is considered a best practise (althoigh it was not included in the US specification).
  • REP/12.06: Problem in the display of the organisation editor ERROR TypeError: this.formControl.value is null
    image
  • MAJ/15.06: An admin of a shared organisation cannot save in the organisation editor: "A server error occurs" (bad gateway)
  • REP/27.06: Public (global) intrface: The detailed document view doesn't display the organisation field correctly.
  • REP/27.06: Identifier type is still "bf:Iark", should be "ark".
  • REP/27.06: In the data, there is an additional property ("identifiedBy.uri") that is not in the jsonschema. Moreover "uri" can also be a value of "identifiedBy.type" which is confusing.
    • REP: OK.

@jma jma force-pushed the maj-new-ark branch 9 times, most recently from d426383 to a552580 Compare June 1, 2023 11:21
@@ -700,6 +696,7 @@
"bf:Doi",
"bf:Ean",
"bf:Gtin14Number",
"bf:Iark",
Copy link
Contributor

@PascalRepond PascalRepond Jun 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not find bf:Iark in the bibframe vocabulary. I would change this to simply ark or use the existing type uri.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mmo
Copy link
Collaborator

mmo commented Jun 14, 2023

  • Problem: when admins try to save the organisation editor, an error occurs. JS console: ERROR TypeError: this.formControl.value is null

"gtin14number": {
"type": "keyword"
},
"iark": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ark*

@jma jma force-pushed the maj-new-ark branch 4 times, most recently from 6b05b9f to 11a73ca Compare June 28, 2023 07:11
@jma jma requested review from PascalRepond and mmo June 28, 2023 07:14
@jma jma force-pushed the maj-new-ark branch 4 times, most recently from 94d6097 to 1c27cea Compare June 28, 2023 09:46
@jma jma force-pushed the maj-new-ark branch 3 times, most recently from 2065502 to ee6bb0d Compare June 29, 2023 12:12
* Adds a Ark NAAN configuration into organisation.
* Disallows Ark NAAN configuration modification for non super user.
* Mints an ark identifier if the document organisation contains a NAAN.
* Removes legacy code.
* Closes rero#652.
* Adds the cli to create an ARK in existing documents.
* Removes unused file.
* Adds document Dublin Core export format.
* Moves ark in identifiedBy.
* Uses dumpers to enrich indexed documents.
* Adds dublin core as export format.
* Closes rero#669.
* Adds the full URI version of the ARK on the search result API.
* Sets the application configurations for the test to allow the use of
  multiple docker-compose files.
* Uses angular 14.
* Solves safety, need to move to Flask 2.
* Fixes json-ld context value.
* Adds multiple identifiers for dublin core.
* Uses ARK URI for `@id` and `identifier` field in json-ld.
* Fixes some tests.
* Makes all fields searchable for documents index.

Co-Authored-by: Johnny Mariéthoz <Johnny.Mariethoz@rero.ch>
@jma jma merged commit 8bbb16d into rero:staging Jun 29, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Activate search by identifier [2] ARK persistent identifiers: activate storage, display and redirection
5 participants