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

Refactoring categories #47

Merged
merged 1 commit into from
Dec 8, 2016

Conversation

rikirenz
Copy link
Contributor

@rikirenz rikirenz commented Dec 5, 2016

We are going to create 2 fields:

  • One for the INSPIRE categories
  • One for the arXiv categories

@@ -0,0 +1,8 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

This generates something like:
arxiv_field_categories = [{'term': 'hep-ph'}, {'term': 'hep-th'}]

When what we need is just an array of strings:
arxiv_field_categories = ['hep-ph', 'hep-th']

Copy link
Contributor

Choose a reason for hiding this comment

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

{
    'items': {
        'oneOf': [
            {
                'enum': ['one', 'two'],
                'type': 'string'
            }
        ]
    },
    'type': 'array',
    'uniqueItems': True
}

@rikirenz rikirenz force-pushed the arxiv-inspire-ext-categ branch 5 times, most recently from 4988dea to c095f17 Compare December 5, 2016 16:38
@david-caro
Copy link
Contributor

This looks great now 👍 , but we should wait for #41 to see if this is actually what it's needed before merging, though we can start modifying the rest of the code (inspire-next + hepcrawl) to adapt to this in the meantime, as if not like this, it will be quite similar I think.

@david-caro david-caro changed the title Refactoring categories Refactoring categories Dec 5, 2016
@david-caro
Copy link
Contributor

I forgot! this is a non-backwards compatible change, so you should use this:
http://autosemver.readthedocs.io/en/latest/usage.html#major-change

Copy link
Contributor

@david-caro david-caro left a comment

Choose a reason for hiding this comment

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

Add the non-backwards-compatible tag/header/message/whatever

@rikirenz rikirenz force-pushed the arxiv-inspire-ext-categ branch 2 times, most recently from a2d0081 to e264d7f Compare December 6, 2016 15:58
@rikirenz rikirenz force-pushed the arxiv-inspire-ext-categ branch 2 times, most recently from 1ea5678 to 4413868 Compare December 8, 2016 13:10
* INCOMPATIBLE rename inspire_field_categories to inspire_categories.
* Removed external_field_categories.
* New values for inspire_field enum
@rikirenz rikirenz force-pushed the arxiv-inspire-ext-categ branch from 4413868 to 04f2fc6 Compare December 8, 2016 13:38
@david-caro
Copy link
Contributor

  • 💯 !

@david-caro david-caro merged commit 5c05db1 into inspirehep:master Dec 8, 2016
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