Skip to content

Issue #1169 automatic submission#1

Open
kuchtiak-ufal wants to merge 16 commits intomainfrom
issue_#1169_automatic_submission
Open

Issue #1169 automatic submission#1
kuchtiak-ufal wants to merge 16 commits intomainfrom
issue_#1169_automatic_submission

Conversation

@kuchtiak-ufal
Copy link
Copy Markdown
Collaborator

@kuchtiak-ufal kuchtiak-ufal commented Nov 25, 2025

Python library for Automatic Ingestion of Submission Data.

See the README file.

@kuchtiak-ufal
Copy link
Copy Markdown
Collaborator Author

Created a library for Ingestion of Submission data in:
https://github.com/ufal/clarin-submission-python/tree/issue_%231169_automatic_submission

Pull Request: #1

@matyaskopp
Copy link
Copy Markdown
Member

Some fields (local.contact.person, local.sponsor) expect multivalue entries separated by semicolons.
The splitting into fields is done on the frontend side. Without opening the web interface (and catching the test PATCH request), it is impossible to guess the expected format of the value when filling the metadata.csv file.
Would it be possible to extend the CSV template with some sort of documentation?

@kuchtiak-ufal
Copy link
Copy Markdown
Collaborator Author

Some fields (local.contact.person, local.sponsor) expect multivalue entries separated by semicolons.
The splitting into fields is done on the frontend side. Without opening the web interface (and catching the test PATCH request), it is impossible to guess the expected format of the value when filling the metadata.csv file.
Would it be possible to extend the CSV template with some sort of documentation?

Good comment @matyaskopp

Yes, will try to improve this. I agree.

@matyaskopp
Copy link
Copy Markdown
Member

I tried to extend metadata.csv with some missing values that were reported by the API:

{'message': 'error.validation.license.notgranted', 'paths': ['/sections/license']}, 
{'message': 'error.validation.clarin-license.notgranted', 'paths': ['/sections/clarin-license']}

Script is processing correctly only the values that are part of the array in DSpace, like:

{'op': 'add', 'path': '/sections/traditionalpageone/dc.type', 'value': [{'value': 'corpus'}]}

But when I want to add a scalar like:

__section__,license
granted,true

it produces

{'op': 'add', 'path': '/sections/license/granted', 'value': [{'value': 'true'}]}

which raises an API error

{"timestamp":"2025-12-18T14:33:58.054+00:00","status":500,"error":"Internal Server Error","message":"An exception has occurred","path":"/repository/server/api/submission/workspaceitems/5955"}

The correct transformation is

{"op":"add","path":"/sections/license/granted","value":"true"}

@kuchtiak-ufal
Copy link
Copy Markdown
Collaborator Author

Thanks @matyaskopp for testing.
License metadata are missing in template, and I haven't tested those yet.

Updated README.md file with the latest changes regarding submission-template file.
@kuchtiak-ufal
Copy link
Copy Markdown
Collaborator Author

Regarding fields like (local.contact.person or local.sponsor).

The template now contains the format of those fields.
Example:

local.contact.person[required=true repeatable=true type=complex format=<givenname:text;surname:text;email:text;affiliation:text>],
local.sponsor[repeatable=true type=complex format=<type:enum(N/A|euFunds|ownFunds|nationalFunds|Other);code:text;orgname:text;projname:text>],

This particularly mean local.contact.person and local.sponsor are both complex fields consisting of 4 values separated by semicolon:
Example:

local.contact.person[...],John;Lizard;john.lizard@email.com;Institute of Foreign Languages
local.sponsor[...],nationalFunds;1122;UFAL;Project X

See also the updated README file.

@kuchtiak-ufal
Copy link
Copy Markdown
Collaborator Author

kuchtiak-ufal commented Jan 7, 2026

Also fixed the errors reated to "/sections/license" and "/sections/clarin-license"

{'message': 'error.validation.license.notgranted', 'paths': ['/sections/license']}, 
{'message': 'error.validation.clarin-license.notgranted', 'paths': ['/sections/clarin-license']}

Both of these sections are now included in submission template file, including list of all available licenses.

See the updated README file.

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.

2 participants