-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
topless
commented
Mar 28, 2019
- for field 695__ when subfield 9 is LANL EDS then subfield a is stored in: arxiv_eprints/categories
- resolves Add rule 695__ when $$9LANL EDS #198
d997298
to
0617868
Compare
_arxiv_eprints = self.get('arxiv_eprints', []) | ||
category = check_category('a', value) | ||
if not _arxiv_eprints: | ||
raise ManualMigrationRequired(message='037__ is missing') |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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') |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
0617868
to
8663b5d
Compare