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

fields: rule for 695__ #203

Merged
merged 1 commit into from
Mar 29, 2019
Merged

Conversation

topless
Copy link
Contributor

@topless topless commented Mar 28, 2019

_arxiv_eprints = self.get('arxiv_eprints', [])
category = check_category('a', value)
if not _arxiv_eprints:
raise ManualMigrationRequired(message='037__ is missing')
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add to the tests checking this case to make coverage green?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have added a couple of tests for all the raised exceptions

if category not in _entry['categories']:
_entry['categories'].append(category)
return _arxiv_eprints
raise IgnoreKey('arxiv_eprints')
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should raise UnexpectedValue here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I cleaned up a bit the way we raise exceptions, Unexpected value is raised where expected

* for field 695__ when subfield 9 is LANL EDS then subfield a is stored in: arxiv_eprints/categories
* added tests for the newly introduced cases
* resolves CERNDocumentServer#198
@kpsherva kpsherva merged commit a50d61e into CERNDocumentServer:books Mar 29, 2019
@kpsherva kpsherva removed the review label Mar 29, 2019
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.

None yet

2 participants