inspirehep.modules.authors package

Submodules

inspirehep.modules.authors.bundles module

Bundles for author forms.

inspirehep.modules.authors.ext module

Authors extension.

class inspirehep.modules.authors.ext.InspireAuthors(app=None)[source]

Bases: object

init_app(app)[source]

inspirehep.modules.authors.forms module

class inspirehep.modules.authors.forms.AdvisorsInlineForm(*args, **kwargs)[source]

Bases: inspirehep.modules.forms.form.INSPIREForm

Advisors inline form.

degree_type = <UnboundField(SelectField, (), {'default': 'phd', 'choices': [(u'bachelor', u'Bachelor'), (u'diploma', u'Diploma'), (u'habilitation', u'Habilitation'), (u'laurea', u'Laurea'), (u'master', u'Master'), (u'other', u'Other'), (u'phd', u'Phd')], 'widget': <inspirehep.modules.authors.forms.ColumnSelect object>, 'label': 'Degree Type', 'widget_classes': 'form-control'})>
degree_type_options = [(u'bachelor', u'Bachelor'), (u'diploma', u'Diploma'), (u'habilitation', u'Habilitation'), (u'laurea', u'Laurea'), (u'master', u'Master'), (u'other', u'Other'), (u'phd', u'Phd')]
degree_types_schema = {u'minLength': 1, u'enum': [u'other', u'diploma', u'bachelor', u'laurea', u'master', u'phd', u'habilitation'], u'type': u'string', u'description': u'The `other` value means that the degree type is not known or is not among\nthe more specific values.', u'title': u'Academic degree type'}
name = <UnboundField(TextField, (), {'autocomplete': 'author', 'placeholder': 'Name. Type for suggestions', 'widget': <inspirehep.modules.forms.field_widgets.ColumnInput object>, 'export_key': 'full_name', 'widget_classes': 'form-control'})>
val = u'habilitation'
class inspirehep.modules.authors.forms.AuthorUpdateForm(*args, **kwargs)[source]

Bases: inspirehep.modules.forms.form.INSPIREForm

Author update form.

advisors = <UnboundField(DynamicFieldList, (<UnboundField(FormField, (<class 'inspirehep.modules.authors.forms.AdvisorsInlineForm'>,), {'widget': <inspirehep.modules.forms.field_widgets.ExtendedListWidget object>})>,), {'add_label': 'Add another advisor', 'widget': <inspirehep.modules.authors.forms.DynamicUnsortedWidget object>, 'label': 'Advisors', 'min_entries': 1, 'widget_classes': 'ui-disable-sort'})>
arxiv_categories_schema = {u'minLength': 1, u'enum': [u'astro-ph', u'astro-ph.CO', u'astro-ph.EP', u'astro-ph.GA', u'astro-ph.HE', u'astro-ph.IM', u'astro-ph.SR', u'cond-mat', u'cond-mat.dis-nn', u'cond-mat.mes-hall', u'cond-mat.mtrl-sci', u'cond-mat.other', u'cond-mat.quant-gas', u'cond-mat.soft', u'cond-mat.stat-mech', u'cond-mat.str-el', u'cond-mat.supr-con', u'cs', u'cs.AI', u'cs.AR', u'cs.CC', u'cs.CE', u'cs.CG', u'cs.CL', u'cs.CR', u'cs.CV', u'cs.CY', u'cs.DB', u'cs.DC', u'cs.DL', u'cs.DM', u'cs.DS', u'cs.ET', u'cs.FL', u'cs.GL', u'cs.GR', u'cs.GT', u'cs.HC', u'cs.IR', u'cs.IT', u'cs.LG', u'cs.LO', u'cs.MA', u'cs.MM', u'cs.MS', u'cs.NA', u'cs.NE', u'cs.NI', u'cs.OH', u'cs.OS', u'cs.PF', u'cs.PL', u'cs.RO', u'cs.SC', u'cs.SD', u'cs.SE', u'cs.SI', u'cs.SY', u'econ', u'econ.EM', u'econ.GN', u'econ.TH', u'eess', u'eess.AS', u'eess.IV', u'eess.SP', u'gr-qc', u'hep-ex', u'hep-lat', u'hep-ph', u'hep-th', u'math', u'math-ph', u'math.AC', u'math.AG', u'math.AP', u'math.AT', u'math.CA', u'math.CO', u'math.CT', u'math.CV', u'math.DG', u'math.DS', u'math.FA', u'math.GM', u'math.GN', u'math.GR', u'math.GT', u'math.HO', u'math.IT', u'math.KT', u'math.LO', u'math.MG', u'math.MP', u'math.NA', u'math.NT', u'math.OA', u'math.OC', u'math.PR', u'math.QA', u'math.RA', u'math.RT', u'math.SG', u'math.SP', u'math.ST', u'nlin', u'nlin.AO', u'nlin.CD', u'nlin.CG', u'nlin.PS', u'nlin.SI', u'nucl-ex', u'nucl-th', u'physics', u'physics.acc-ph', u'physics.ao-ph', u'physics.app-ph', u'physics.atm-clus', u'physics.atom-ph', u'physics.bio-ph', u'physics.chem-ph', u'physics.class-ph', u'physics.comp-ph', u'physics.data-an', u'physics.ed-ph', u'physics.flu-dyn', u'physics.gen-ph', u'physics.geo-ph', u'physics.hist-ph', u'physics.ins-det', u'physics.med-ph', u'physics.optics', u'physics.plasm-ph', u'physics.pop-ph', u'physics.soc-ph', u'physics.space-ph', u'q-bio', u'q-bio.BM', u'q-bio.CB', u'q-bio.GN', u'q-bio.MN', u'q-bio.NC', u'q-bio.OT', u'q-bio.PE', u'q-bio.QM', u'q-bio.SC', u'q-bio.TO', u'q-fin', u'q-fin.CP', u'q-fin.EC', u'q-fin.GN', u'q-fin.MF', u'q-fin.PM', u'q-fin.PR', u'q-fin.RM', u'q-fin.ST', u'q-fin.TR', u'quant-ph', u'stat', u'stat.AP', u'stat.CO', u'stat.ME', u'stat.ML', u'stat.OT', u'stat.TH'], u'type': u'string', u'description': u'A category that currently exists on arXiv. Note that some categories have\nbeen renamed and are not in this list. These are taken from the `arXiv API\ndocumentation\n<https://arxiv.org/help/api/user-manual#subject_classifications>`_.\n\n:example: ``math.FA`` instead of its previous name, ``funct-an``'}
bai = <UnboundField(StringField, (), {'label': 'Bai', 'widget': <wtforms.widgets.core.HiddenInput object>, 'widget_classes': 'form-control', 'description': u'e.g. M.Santos.1', 'validators': [<wtforms.validators.Optional object>, <inspirehep.modules.forms.validation_utils.RegexpStopValidator object>]})>
blog_url = <UnboundField(StringField, (), {'widget_classes': 'form-control', 'label': 'Blog', 'placeholder': 'http://www.example.com', 'icon': 'fa fa-wordpress', 'validators': [<wtforms.validators.URL object>, <wtforms.validators.Optional object>]})>
control_number = <UnboundField(IntegerField, (), {'widget': <wtforms.widgets.core.HiddenInput object>, 'validators': [<wtforms.validators.Optional object>]})>
display_name = <UnboundField(StringField, (), {'label': 'Display Name', 'validators': [<wtforms.validators.DataRequired object>], 'description': u'How should the author be addressed throughout the site? e.g. Diego Mart\xednez', 'widget_classes': 'form-control'})>
experiments = <UnboundField(DynamicFieldList, (<UnboundField(FormField, (<class 'inspirehep.modules.authors.forms.ExperimentsInlineForm'>,), {'widget': <inspirehep.modules.forms.field_widgets.ExtendedListWidget object>, 'widget_classes': 'col-xs-10'})>,), {'add_label': 'Add another experiment', 'widget': <inspirehep.modules.authors.forms.DynamicUnsortedWidget object>, 'label': 'Experiment History', 'min_entries': 1, 'widget_classes': 'ui-disable-sort'})>
extra_comments = <UnboundField(TextAreaField, (), {'label': 'Comments', 'description': u'Send us any comments you might have. They will not be visible.', 'widget_classes': 'form-control'})>
family_name = <UnboundField(StringField, (), {'label': 'Family Name', 'description': u'e.g. Mart\xednez Santos', 'widget_classes': 'form-control'})>
given_names = <UnboundField(StringField, (), {'label': 'Given Names', 'validators': [<wtforms.validators.DataRequired object>], 'description': u'e.g. Diego', 'widget_classes': 'form-control'})>
groups = [('Personal Information', ['given_names', 'family_name', 'display_name', 'native_name', 'email', 'public_emails', 'status', 'orcid', 'bai', 'inspireid'], {'icon': 'fa fa-user'}), ('Personal Websites', ['websites', 'linkedin_url', 'blog_url', 'twitter_url', 'twitter_hidden'], {'icon': 'fa fa-globe'}), ('Career Information', ['research_field', 'institution_history', 'experiments', 'advisors'], {'icon': 'fa fa-university'}), ('Comments', ['extra_comments'], {'icon': 'fa fa-comments'})]
inspireid = <UnboundField(StringField, (), {'label': 'Inspireid', 'widget': <wtforms.widgets.core.HiddenInput object>, 'widget_classes': 'form-control', 'description': u'e.g. INSPIRE-12345678', 'validators': [<wtforms.validators.Optional object>, <inspirehep.modules.forms.validation_utils.RegexpStopValidator object>]})>
institution_history = <UnboundField(DynamicFieldList, (<UnboundField(FormField, (<class 'inspirehep.modules.authors.forms.InstitutionInlineForm'>,), {'widget': <inspirehep.modules.forms.field_widgets.ExtendedListWidget object>, 'widget_classes': 'col-xs-10'})>,), {'add_label': 'Add another institution', 'widget': <inspirehep.modules.authors.forms.DynamicUnsortedWidget object>, 'label': 'Institution History', 'min_entries': 1, 'widget_classes': 'ui-disable-sort'})>
linkedin_url = <UnboundField(StringField, (), {'widget_classes': 'form-control', 'label': 'Linkedin', 'placeholder': 'https://www.linkedin.com/pub/john-francis-lampen/16/750/778', 'icon': 'fa fa-linkedin-square', 'validators': [<wtforms.validators.URL object>, <wtforms.validators.Optional object>]})>
native_name = <UnboundField(StringField, (), {'label': 'Native Name', 'description': u'For non-Latin names e.g. \u9ea6\u8fea\u5a1c or \u042d\u0434\u0433\u0430\u0440 \u0411\u0443\u0433\u0430\u0435\u0432', 'widget_classes': 'form-control'})>
orcid = <UnboundField(StringField, (), {'widget': <inspirehep.modules.forms.field_widgets.WrappedInput object>, 'description': u'ORCID provides a persistent digital identifier that distinguishes you from other researchers. Learn more at <a href="http://orcid.org" tabIndex="-1" target="_blank">orcid.org</a>', 'label': 'ORCID <img src="/oldui/images/orcid_icon_24.png" style="height:20px">', 'validators': [<wtforms.validators.Optional object>, <inspirehep.modules.forms.validation_utils.RegexpStopValidator object>, <function ORCIDValidator>, <function duplicated_orcid_validator>], 'widget_classes': 'form-control', 'placeholder': '0000-0000-0000-0000'})>
public_emails = <UnboundField(DynamicFieldList, (<UnboundField(FormField, (<class 'inspirehep.modules.authors.forms.EmailInlineForm'>,), {'widget': <inspirehep.modules.forms.field_widgets.ExtendedListWidget object>, 'widget_classes': 'col-xs-10'})>,), {'widget': <inspirehep.modules.authors.forms.DynamicUnsortedNonRemoveWidget object>, 'description': u'This emails will be displayed online in the INSPIRE Author Profile.', 'min_entries': 1, 'label': 'Public emails', 'widget_classes': 'ui-disable-sort', 'add_label': 'Add another email'})>
research_field = <UnboundField(SelectMultipleField, (), {'choices': [(u'astro-ph', u'astro-ph'), (u'cond-mat', u'cond-mat'), (u'cs', u'cs'), (u'econ', u'econ'), (u'eess', u'eess'), (u'gr-qc', u'gr-qc'), (u'hep-ex', u'hep-ex'), (u'hep-lat', u'hep-lat'), (u'hep-ph', u'hep-ph'), (u'hep-th', u'hep-th'), (u'math', u'math'), (u'math-ph', u'math-ph'), (u'nlin', u'nlin'), (u'nucl-ex', u'nucl-ex'), (u'nucl-th', u'nucl-th'), (u'physics', u'physics'), (u'physics.acc-ph', u'physics.acc-ph'), (u'physics.data-an', u'physics.data-an'), (u'physics.ins-det', u'physics.ins-det'), (u'q-bio', u'q-bio'), (u'q-fin', u'q-fin'), (u'quant-ph', u'quant-ph'), (u'stat', u'stat')], 'widget_classes': 'form-control', 'label': 'Field of Research', 'filters': [<function clean_empty_list>], 'validators': [<wtforms.validators.DataRequired object>]})>
research_field_options = [(u'astro-ph', u'astro-ph'), (u'cond-mat', u'cond-mat'), (u'cs', u'cs'), (u'econ', u'econ'), (u'eess', u'eess'), (u'gr-qc', u'gr-qc'), (u'hep-ex', u'hep-ex'), (u'hep-lat', u'hep-lat'), (u'hep-ph', u'hep-ph'), (u'hep-th', u'hep-th'), (u'math', u'math'), (u'math-ph', u'math-ph'), (u'nlin', u'nlin'), (u'nucl-ex', u'nucl-ex'), (u'nucl-th', u'nucl-th'), (u'physics', u'physics'), (u'physics.acc-ph', u'physics.acc-ph'), (u'physics.data-an', u'physics.data-an'), (u'physics.ins-det', u'physics.ins-det'), (u'q-bio', u'q-bio'), (u'q-fin', u'q-fin'), (u'quant-ph', u'quant-ph'), (u'stat', u'stat')]
status = <UnboundField(SelectField, (), {'default': 'active', 'choices': [('active', 'Active'), ('retired', 'Retired'), ('departed', 'Departed'), ('deceased', 'Deceased')], 'validators': [<wtforms.validators.DataRequired object>], 'label': 'Status', 'widget_classes': 'form-control'})>
status_options = [('active', 'Active'), ('retired', 'Retired'), ('departed', 'Departed'), ('deceased', 'Deceased')]
twitter_url = <UnboundField(StringField, (), {'widget_classes': 'form-control', 'label': 'Twitter', 'placeholder': 'https://twitter.com/inspirehep', 'icon': 'fa fa-twitter', 'validators': [<wtforms.validators.URL object>, <wtforms.validators.Optional object>]})>
val = u'stat.TH'
websites = <UnboundField(DynamicFieldList, (<UnboundField(FormField, (<class 'inspirehep.modules.authors.forms.WebpageInlineForm'>,), {'widget': <inspirehep.modules.forms.field_widgets.ExtendedListWidget object>})>,), {'add_label': 'Add another website', 'widget': <inspirehep.modules.authors.forms.DynamicUnsortedWidget object>, 'widget_classes': 'ui-disable-sort', 'min_entries': 1, 'icon': 'fa fa-globe'})>
class inspirehep.modules.authors.forms.ColumnSelect(widget=None, wrapper=None, **kwargs)[source]

Bases: inspirehep.modules.authors.forms.WrappedSelect

Specialized column wrapped input.

wrapper

Wrapper template with description support.

class inspirehep.modules.authors.forms.DynamicUnsortedItemWidget(**kwargs)[source]

Bases: inspirehep.modules.forms.field_widgets.DynamicItemWidget

class inspirehep.modules.authors.forms.DynamicUnsortedNonRemoveItemWidget(**kwargs)[source]

Bases: inspirehep.modules.forms.field_widgets.DynamicItemWidget

class inspirehep.modules.authors.forms.DynamicUnsortedNonRemoveWidget(**kwargs)[source]

Bases: inspirehep.modules.forms.field_widgets.DynamicListWidget

class inspirehep.modules.authors.forms.DynamicUnsortedWidget(**kwargs)[source]

Bases: inspirehep.modules.forms.field_widgets.DynamicListWidget

class inspirehep.modules.authors.forms.EmailInlineForm(*args, **kwargs)[source]

Bases: inspirehep.modules.forms.form.INSPIREForm

Public emails inline form.

email = <UnboundField(StringField, (), {'widget_classes': 'form-control', 'validators': [<wtforms.validators.Optional object>, <wtforms.validators.Email object>]})>
original_email = <UnboundField(HiddenField, (), {})>
class inspirehep.modules.authors.forms.ExperimentsInlineForm(*args, **kwargs)[source]

Bases: inspirehep.modules.forms.form.INSPIREForm

Experiments inline form.

current = <UnboundField(BooleanField, (), {'widget': <function currentCheckboxWidget>})>
end_year = <UnboundField(StringField, (), {'widget': <inspirehep.modules.forms.field_widgets.WrappedInput object>, 'validators': [<inspirehep.modules.forms.validation_utils.RegexpStopValidator object>], 'placeholder': 'End Year', 'description': u'Format: YYYY.', 'widget_classes': 'form-control'})>
name = <UnboundField(StringField, (), {'autocomplete': 'experiment', 'widget': <inspirehep.modules.forms.field_widgets.ColumnInput object>, 'label': 'Experiment', 'placeholder': 'Experiment. Type for suggestions', 'widget_classes': 'form-control'})>
start_year = <UnboundField(StringField, (), {'widget': <inspirehep.modules.forms.field_widgets.WrappedInput object>, 'validators': [<inspirehep.modules.forms.validators.dynamic_fields.LessThan object>, <inspirehep.modules.forms.validation_utils.RegexpStopValidator object>], 'placeholder': 'Start Year', 'description': u'Format: YYYY.', 'widget_classes': 'form-control'})>
class inspirehep.modules.authors.forms.InstitutionInlineForm(*args, **kwargs)[source]

Bases: inspirehep.modules.forms.form.INSPIREForm

Institution inline form.

current = <UnboundField(BooleanField, (), {'widget': <function currentCheckboxWidget>})>
emails = <UnboundField(FieldList, (<UnboundField(HiddenField, (), {'label': ''})>,), {'widget_classes': 'hidden-list'})>
end_year = <UnboundField(StringField, (), {'widget': <inspirehep.modules.forms.field_widgets.WrappedInput object>, 'validators': [<inspirehep.modules.forms.validation_utils.RegexpStopValidator object>], 'placeholder': 'End Year', 'description': u'Format: YYYY.', 'widget_classes': 'form-control'})>
name = <UnboundField(StringField, (), {'autocomplete': 'affiliation', 'widget': <inspirehep.modules.forms.field_widgets.ColumnInput object>, 'placeholder': 'Institution. Type for suggestions', 'widget_classes': 'form-control'})>
old_emails = <UnboundField(FieldList, (<UnboundField(HiddenField, (), {'label': ''})>,), {'widget_classes': 'hidden-list'})>
rank = <UnboundField(SelectField, (), {'default': 'rank', 'choices': [('rank', 'Rank'), ('SENIOR', 'Senior (permanent)'), ('JUNIOR', 'Junior (leads to Senior)'), ('STAFF', 'Staff (non-research)'), ('VISITOR', 'Visitor'), ('PD', 'PostDoc'), ('PHD', 'PhD'), ('MASTER', 'Master'), ('UNDERGRADUATE', 'Undergrad'), ('OTHER', 'Other')], 'widget': <inspirehep.modules.authors.forms.ColumnSelect object>, 'widget_classes': 'form-control', 'validators': [<wtforms.validators.DataRequired object>]})>
rank_options = [('rank', 'Rank'), ('SENIOR', 'Senior (permanent)'), ('JUNIOR', 'Junior (leads to Senior)'), ('STAFF', 'Staff (non-research)'), ('VISITOR', 'Visitor'), ('PD', 'PostDoc'), ('PHD', 'PhD'), ('MASTER', 'Master'), ('UNDERGRADUATE', 'Undergrad'), ('OTHER', 'Other')]
start_year = <UnboundField(StringField, (), {'widget': <inspirehep.modules.forms.field_widgets.WrappedInput object>, 'validators': [<inspirehep.modules.forms.validators.dynamic_fields.LessThan object>, <inspirehep.modules.forms.validation_utils.RegexpStopValidator object>], 'placeholder': 'Start Year', 'description': u'Format: YYYY.', 'widget_classes': 'form-control'})>
class inspirehep.modules.authors.forms.WebpageInlineForm(*args, **kwargs)[source]

Bases: inspirehep.modules.forms.form.INSPIREForm

URL inline form.

webpage = <UnboundField(StringField, (), {'widget_classes': 'form-control', 'widget': <inspirehep.modules.forms.field_widgets.ColumnInput object>, 'label': 'Your Webpage', 'placeholder': 'http://www.example.com', 'validators': [<wtforms.validators.URL object>, <wtforms.validators.Optional object>]})>
class inspirehep.modules.authors.forms.WrappedSelect(widget=None, wrapper=None, **kwargs)[source]

Bases: wtforms.widgets.core.Select

Widget to wrap select input in further markup.

wrapped_widget = <wtforms.widgets.core.Select object>
wrapper = '<div>%(field)s</div>'
inspirehep.modules.authors.forms.currentCheckboxWidget(field, **kwargs)[source]

Current institution checkbox widget.

inspirehep.modules.authors.permissions module

inspirehep.modules.authors.utils module

Helper functions for authors.

inspirehep.modules.authors.utils.bai(name)[source]
inspirehep.modules.authors.utils.phonetic_blocks(full_names, phonetic_algorithm='nysiis')[source]

Create a dictionary of phonetic blocks for a given list of names.

inspirehep.modules.authors.views module

INSPIRE authors views.

inspirehep.modules.authors.views.holdingpenreview(*args, **kwargs)[source]

Deprecated Handler for approval or rejection of new authors in Holding Pen.

inspirehep.modules.authors.views.new()[source]

Deprecated View for INSPIRE author new form.

inspirehep.modules.authors.views.newreview(*args, **kwargs)[source]

Deprecated View for INSPIRE author new form review by a cataloger.

inspirehep.modules.authors.views.reviewhandler(*args, **kwargs)[source]

Deprecated Form handler when a cataloger accepts an author review.

inspirehep.modules.authors.views.submitnew()[source]

Deprecated Form action handler for INSPIRE author new form.

inspirehep.modules.authors.views.submitupdate()[source]

Deprecated Form action handler for INSPIRE author update form.

inspirehep.modules.authors.views.update(recid)[source]

Deprecated View for INSPIRE author update form.

inspirehep.modules.authors.views.validate()[source]

Validate form and return validation errors.

FIXME: move to forms module as a generic /validate where we can pass the for class to validate.

Module contents

Authors module.