generated from MITLibraries/python-cli-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Why these changes are being introduced: * Support deposits requested by Scholarly Communications and Collections Strategy (SCCS). How this addresses that need: * Create SCCS workflow and metadata mapping JSON file * Move DemoWorkflow metadata mapping JSON file * Make 'delimiter' and 'language' optional configs * Omit null and empty string configs from metadata mapping JSON files * Change Workflow.email_recipients to list[str] * Clean up Workflow and SimpleCSV fixtures * Rename DemoWorkflow -> Demo Side effects of this change: * None Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/IN-1098
- Loading branch information
1 parent
b015028
commit b510322
Showing
9 changed files
with
109 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
from dsc.workflows.base.simple_csv import SimpleCSV | ||
|
||
|
||
class DemoWorkflow(SimpleCSV): | ||
class Demo(SimpleCSV): | ||
|
||
workflow_name: str = "demo" | ||
submission_system: str = "DSpace@MIT" | ||
metadata_mapping_path: str = "tests/fixtures/demo_metadata_mapping.json" | ||
metadata_mapping_path: str = "dsc/workflows/metadata_mapping/demo.json" |
45 changes: 15 additions & 30 deletions
45
tests/fixtures/demo_metadata_mapping.json → dsc/workflows/metadata_mapping/demo.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,47 @@ | ||
{ | ||
"item_identifier": { | ||
"source_field_name": "item_identifier", | ||
"language": null, | ||
"delimiter": "" | ||
"required": true | ||
}, | ||
"dc.title": { | ||
"source_field_name": "dc.title", | ||
"language": "en_US", | ||
"required": true | ||
}, | ||
"dc.publisher": { | ||
"source_field_name": "dc.publisher", | ||
"language": "en_US", | ||
"delimiter": "" | ||
"language": "en_US" | ||
}, | ||
"dc.eprint.version": { | ||
"source_field_name": "dc.eprint.version", | ||
"language": "en_US", | ||
"delimiter": "" | ||
"language": "en_US" | ||
}, | ||
"dc.type": { | ||
"source_field_name": "dc.type", | ||
"language": "en_US", | ||
"delimiter": "" | ||
"language": "en_US" | ||
}, | ||
"dc.source": { | ||
"source_field_name": "dc.source", | ||
"language": "en_US", | ||
"delimiter": "" | ||
"language": "en_US" | ||
}, | ||
"dc.contributor.author": { | ||
"source_field_name": "dc.contributor.author", | ||
"language": "en_US", | ||
"delimiter": "|" | ||
}, | ||
"dc.relation.isversionof": { | ||
"source_field_name": "dc.relation.isversionof", | ||
"language": "", | ||
"delimiter": "" | ||
}, | ||
"dc.title": { | ||
"source_field_name": "dc.title", | ||
"language": "en_US", | ||
"delimiter": "" | ||
"source_field_name": "dc.relation.isversionof" | ||
}, | ||
"dc.relation.journal": { | ||
"source_field_name": "dc.relation.journal", | ||
"language": "", | ||
"delimiter": "" | ||
"source_field_name": "dc.relation.journal" | ||
}, | ||
"dc.identifier.issn": { | ||
"source_field_name": "dc.identifier.issn", | ||
"language": "", | ||
"delimiter": "" | ||
"source_field_name": "dc.identifier.issn" | ||
}, | ||
"dc.date.issued": { | ||
"source_field_name": "dc.date.issued", | ||
"language": "", | ||
"delimiter": "" | ||
"source_field_name": "dc.date.issued" | ||
}, | ||
"dc.rights.uri": { | ||
"source_field_name": "dc.rights.uri", | ||
"language": "", | ||
"delimiter": "" | ||
"source_field_name": "dc.rights.uri" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"item_identifier": { | ||
"source_field_name": "item_identifier", | ||
"required": true | ||
}, | ||
"dc.title": { | ||
"source_field_name": "dc.title", | ||
"language": "en_US", | ||
"required": true | ||
}, | ||
"dc.publisher": { | ||
"source_field_name": "dc.publisher", | ||
"language": "en_US" | ||
}, | ||
"dc.identifier.mitlicense": { | ||
"source_field_name": "dc.identifier.mitlicense", | ||
"language": "en_US" | ||
}, | ||
"dc.eprint.version": { | ||
"source_field_name": "dc.eprint.version", | ||
"language": "en_US" | ||
}, | ||
"dc.type": { | ||
"source_field_name": "dc.type", | ||
"language": "en_US" | ||
}, | ||
"dc.source": { | ||
"source_field_name": "dc.source", | ||
"language": "en_US" | ||
}, | ||
"dc.contributor.author": { | ||
"source_field_name": "dc.contributor.author", | ||
"language": "en_US", | ||
"delimiter": "|" | ||
}, | ||
"dc.relation.isversionof": { | ||
"source_field_name": "dc.relation.isversionof" | ||
}, | ||
"dc.relation.journal": { | ||
"source_field_name": "dc.relation.journal" | ||
}, | ||
"dc.identifier.issn": { | ||
"source_field_name": "dc.identifier.issn" | ||
}, | ||
"dc.date.issued": { | ||
"source_field_name": "dc.date.issued" | ||
}, | ||
"dc.rights": { | ||
"source_field_name": "dc.rights", | ||
"language": "en_US" | ||
}, | ||
"dc.rights.uri": { | ||
"source_field_name": "dc.rights.uri" | ||
}, | ||
"dc.description.sponsorship": { | ||
"source_field_name": "dc.description.sponsorship", | ||
"language": "en_US" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from dsc.workflows import SimpleCSV | ||
|
||
|
||
class SCCS(SimpleCSV): | ||
"""Workflow for SCCS-requested deposits. | ||
The deposits managed by this workflow are requested by the Scholarly | ||
Communication and Collection Strategy (SCCS) department | ||
and are for submission to DSpace@MIT. | ||
""" | ||
|
||
workflow_name: str = "sccs" | ||
metadata_mapping_path: str = "dsc/workflows/metadata_mapping/sccs.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
{ | ||
"item_identifier": { | ||
"source_field_name": "item_identifier", | ||
"language": null, | ||
"delimiter": "", | ||
"required": true | ||
}, | ||
"dc.title": { | ||
"source_field_name": "title", | ||
"language": "en_US", | ||
"delimiter": "", | ||
"required": true | ||
}, | ||
"dc.contributor": { | ||
"source_field_name": "contributor", | ||
"language": null, | ||
"delimiter": "|" | ||
} | ||
} |