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

Yoda 1.8.13 #20

Merged
merged 3 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 flake8-import-order
python -m pip install flake8==5.0.4 flake8-import-order
- name: Lint with flake8
run: |
Expand Down
25 changes: 16 additions & 9 deletions moai/metadata/datacite.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ def __call__(self, element, metadata):
if not isinstance(idf_list, list):
idf_list = [idf_list]
for identifier in idf_list:
nameIdf = NONE.nameIdentifier(identifier['Name_Identifier'])
nameIdf.attrib['nameIdentifierScheme'] = identifier['Name_Identifier_Scheme']
creator.append(nameIdf)
if 'Name_Identifier' in identifier:
nameIdf = NONE.nameIdentifier(identifier['Name_Identifier'])
if 'Name_Identifier_Scheme' in identifier:
nameIdf.attrib['nameIdentifierScheme'] = identifier['Name_Identifier_Scheme']
creator.append(nameIdf)

creators.append(creator)
datacite.append(creators)
Expand Down Expand Up @@ -214,9 +216,11 @@ def __call__(self, element, metadata):
if not isinstance(idf_list, list):
idf_list = [idf_list]
for identifier in idf_list:
nameIdf = NONE.nameIdentifier(identifier['Name_Identifier'])
nameIdf.attrib['nameIdentifierScheme'] = identifier['Name_Identifier_Scheme']
contributor.append(nameIdf)
if 'Name_Identifier' in identifier:
nameIdf = NONE.nameIdentifier(identifier['Name_Identifier'])
if 'Name_Identifier_Scheme' in identifier:
nameIdf.attrib['nameIdentifierScheme'] = identifier['Name_Identifier_Scheme']
contributor.append(nameIdf)

contributors.append(contributor)

Expand All @@ -242,9 +246,12 @@ def __call__(self, element, metadata):
if not isinstance(idf_list, list):
idf_list = [idf_list]
for identifier in idf_list:
nameIdf = NONE.nameIdentifier(identifier['Name_Identifier'])
nameIdf.attrib['nameIdentifierScheme'] = identifier['Name_Identifier_Scheme']
contributor.append(nameIdf)

if 'Name_Identifier' in identifier:
nameIdf = NONE.nameIdentifier(identifier['Name_Identifier'])
if 'Name_Identifier_Scheme' in identifier:
nameIdf.attrib['nameIdentifierScheme'] = identifier['Name_Identifier_Scheme']
contributor.append(nameIdf)

contributors.append(contributor)
except KeyError:
Expand Down
2 changes: 1 addition & 1 deletion moai/metadata/oaidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def __call__(self, element, metadata):
if not isinstance(con_list, list):
con_list = [con_list]

for dccon in creator_list:
for dccon in con_list:
name = dccon['Name']['Given_Name'] + ' ' + dccon['Name']['Family_Name']

affiliation_list = dccon['Affiliation']
Expand Down
Loading