From 8139d17d3614c223434156bef734613041b584f9 Mon Sep 17 00:00:00 2001 From: Eamonn Maguire Date: Thu, 10 Dec 2015 11:41:44 +0100 Subject: [PATCH] docs: changing for hepdata Signed-off-by: Eamonn Maguire --- .travis.yml | 8 ++--- babel.ini | 8 ++--- docs/conf.py | 8 ++--- hepdata/__init__.py | 10 +++--- hepdata/celery.py | 10 +++--- hepdata/cli.py | 10 +++--- hepdata/config.py | 14 ++++----- hepdata/factory.py | 10 +++--- hepdata/modules/__init__.py | 10 +++--- hepdata/modules/frontpage/__init__.py | 10 +++--- hepdata/modules/frontpage/views.py | 10 +++--- hepdata/modules/records/__init__.py | 8 ++--- hepdata/modules/records/config.py | 23 +++----------- hepdata/modules/records/ext.py | 10 +++--- hepdata/modules/records/filters.py | 8 ++--- .../modules/records/jsonschemas/__init__.py | 10 +++--- hepdata/modules/records/models.py | 31 ++++++++++--------- .../templates/hepdata_records/box/export.html | 8 ++--- .../templates/hepdata_records/box/info.html | 26 ++++++++-------- .../hepdata_records/box/publishedin.html | 8 ++--- .../templates/hepdata_records/box/share.html | 10 +++--- .../hepdata_records/macros/accessright.html | 8 ++--- .../hepdata_records/macros/altmetric.html | 8 ++--- .../hepdata_records/macros/authors.html | 8 ++--- .../hepdata_records/macros/objecttype.html | 8 ++--- .../templates/hepdata_records/meta.html | 14 ++++----- .../hepdata_records/record_detail.html | 8 ++--- .../hepdata_records/record_export.html | 10 +++--- hepdata/modules/records/views.py | 10 +++--- hepdata/modules/theme/__init__.py | 10 +++--- hepdata/modules/theme/bundles.py | 8 ++--- hepdata/modules/theme/static/scss/body.scss | 8 ++--- hepdata/modules/theme/static/scss/cover.scss | 8 ++--- hepdata/modules/theme/static/scss/footer.scss | 8 ++--- .../modules/theme/static/scss/frontpage.scss | 8 ++--- .../modules/theme/static/scss/input-icon.scss | 8 ++--- hepdata/modules/theme/static/scss/navbar.scss | 8 ++--- hepdata/modules/theme/static/scss/record.scss | 8 ++--- .../modules/theme/static/scss/sidebarnav.scss | 8 ++--- hepdata/modules/theme/static/scss/styles.scss | 8 ++--- hepdata/modules/theme/static/scss/type.scss | 8 ++--- .../modules/theme/static/scss/utilities.scss | 8 ++--- .../modules/theme/static/scss/variables.scss | 8 ++--- .../templates/hepdata_theme/javascript.html | 8 ++--- .../theme/templates/hepdata_theme/page.html | 8 ++--- .../templates/hepdata_theme/page_cover.html | 8 ++--- .../hepdata_theme/security/login_user.html | 8 ++--- .../hepdata_theme/security/register_user.html | 8 ++--- .../hepdata_theme/settings/base.html | 8 ++--- hepdata/modules/theme/views.py | 8 ++--- hepdata/version.py | 12 +++---- hepdata/wsgi.py | 10 +++--- pytest.ini | 8 ++--- setup.py | 4 +++ tests/conftest.py | 8 ++--- tests/test_hepdata.py | 10 +++--- 56 files changed, 269 insertions(+), 277 deletions(-) diff --git a/.travis.yml b/.travis.yml index 807a8d91..6b3c94f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # diff --git a/babel.ini b/babel.ini index 48d93389..f5adf43f 100644 --- a/babel.ini +++ b/babel.ini @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # diff --git a/docs/conf.py b/docs/conf.py index 74b80e9a..dfd430a9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # diff --git a/hepdata/__init__.py b/hepdata/__init__.py index 0a25f6e0..c3d5fd42 100644 --- a/hepdata/__init__.py +++ b/hepdata/__init__.py @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # @@ -22,7 +22,7 @@ # waive the privileges and immunities granted to it by virtue of its status # as an Intergovernmental Organization or submit itself to any jurisdiction. -"""Zenodo - Research. Shared.""" +"""HEPData.""" from __future__ import absolute_import, print_function diff --git a/hepdata/celery.py b/hepdata/celery.py index 87834aa1..c9ee5ea2 100644 --- a/hepdata/celery.py +++ b/hepdata/celery.py @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # @@ -22,7 +22,7 @@ # waive the privileges and immunities granted to it by virtue of its status # as an Intergovernmental Organization or submit itself to any jurisdiction. -"""Zenodo celery application object.""" +"""HEPData celery application object.""" from __future__ import absolute_import, print_function diff --git a/hepdata/cli.py b/hepdata/cli.py index 099762d2..c0c39494 100644 --- a/hepdata/cli.py +++ b/hepdata/cli.py @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # @@ -22,7 +22,7 @@ # waive the privileges and immunities granted to it by virtue of its status # as an Intergovernmental Organization or submit itself to any jurisdiction. -"""Zenodo CLI module.""" +"""HEPData CLI module.""" from __future__ import absolute_import, print_function diff --git a/hepdata/config.py b/hepdata/config.py index 469bdf9a..e4596043 100644 --- a/hepdata/config.py +++ b/hepdata/config.py @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # @@ -22,7 +22,7 @@ # waive the privileges and immunities granted to it by virtue of its status # as an Intergovernmental Organization or submit itself to any jurisdiction. -"""Zenodo default application configuration.""" +"""HEPData default application configuration.""" from __future__ import absolute_import, print_function @@ -36,7 +36,7 @@ def _(x): # Database SQLALCHEMY_DATABASE_URI = os.environ.get( "SQLALCHEMY_DATABASE_URI", - "postgresql+psycopg2://localhost/zenodo") + "postgresql+psycopg2://localhost/hepdata") SQLALCHEMY_ECHO = False # Default language and timezone @@ -69,7 +69,7 @@ def _(x): "hepdata_theme/security/login_user.html" SECURITY_CONFIRM_SALT = "CHANGE_ME" -SECURITY_EMAIL_SENDER = "info@zenodo.org" +SECURITY_EMAIL_SENDER = "info@hepdata.net" SECURITY_EMAIL_SUBJECT_REGISTER = _("Welcome to HEPData!") SECURITY_LOGIN_SALT = "CHANGE_ME" SECURITY_PASSWORD_SALT = "CHANGE_ME" diff --git a/hepdata/factory.py b/hepdata/factory.py index 6d7bfcab..b8cef0b9 100644 --- a/hepdata/factory.py +++ b/hepdata/factory.py @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # @@ -22,7 +22,7 @@ # waive the privileges and immunities granted to it by virtue of its status # as an Intergovernmental Organization or submit itself to any jurisdiction. -"""Zenodo application factories.""" +"""HEPData application factories.""" import os import sys diff --git a/hepdata/modules/__init__.py b/hepdata/modules/__init__.py index 03273753..7431a1ce 100644 --- a/hepdata/modules/__init__.py +++ b/hepdata/modules/__init__.py @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # @@ -22,4 +22,4 @@ # waive the privileges and immunities granted to it by virtue of its status # as an Intergovernmental Organization or submit itself to any jurisdiction. -"""Zenodo modules.""" +"""HEPData modules.""" diff --git a/hepdata/modules/frontpage/__init__.py b/hepdata/modules/frontpage/__init__.py index fcbf02bd..6a595ee3 100644 --- a/hepdata/modules/frontpage/__init__.py +++ b/hepdata/modules/frontpage/__init__.py @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # @@ -22,6 +22,6 @@ # waive the privileges and immunities granted to it by virtue of its status # as an Intergovernmental Organization or submit itself to any jurisdiction. -"""Zenodo frontpage.""" +"""HEPData frontpage.""" from __future__ import absolute_import, print_function diff --git a/hepdata/modules/frontpage/views.py b/hepdata/modules/frontpage/views.py index 71827fd6..c40df9be 100644 --- a/hepdata/modules/frontpage/views.py +++ b/hepdata/modules/frontpage/views.py @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # @@ -22,7 +22,7 @@ # waive the privileges and immunities granted to it by virtue of its status # as an Intergovernmental Organization or submit itself to any jurisdiction. -"""Zenodo frontpage blueprint.""" +"""HEPData frontpage blueprint.""" from __future__ import absolute_import, print_function diff --git a/hepdata/modules/records/__init__.py b/hepdata/modules/records/__init__.py index 547dc516..b4813370 100644 --- a/hepdata/modules/records/__init__.py +++ b/hepdata/modules/records/__init__.py @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # diff --git a/hepdata/modules/records/config.py b/hepdata/modules/records/config.py index d93bb3b1..5ee98bf1 100644 --- a/hepdata/modules/records/config.py +++ b/hepdata/modules/records/config.py @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # @@ -22,7 +22,7 @@ # waive the privileges and immunities granted to it by virtue of its status # as an Intergovernmental Organization or submit itself to any jurisdiction. -"""Configuration for Zenodo Records.""" +"""Configuration for HEPData Records.""" from __future__ import absolute_import, print_function @@ -30,16 +30,3 @@ from speaklater import make_lazy_gettext _ = make_lazy_gettext(lambda: gettext) - -ZENODO_RELATION_TYPES = [ - ('isCitedBy', _('Cited by')), - ('cites', _('Cites')), - ('isSupplementTo', _('Supplement to')), - ('isSupplementedBy', _('Supplementary material')), - ('references', _('References')), - ('isReferencedBy', _('Referenced by')), - ('isNewVersionOf', _('Previous versions')), - ('isPreviousVersionOf', _('New versions')), -] - -ZENODO_LOCAL_DOI_PREFIXES = [] diff --git a/hepdata/modules/records/ext.py b/hepdata/modules/records/ext.py index f1434b61..1e9b4860 100644 --- a/hepdata/modules/records/ext.py +++ b/hepdata/modules/records/ext.py @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # @@ -31,7 +31,7 @@ class HEPDataRecords(object): - """Zenodo records extension.""" + """HEPData records extension.""" def __init__(self, app=None): """Extension initialization.""" diff --git a/hepdata/modules/records/filters.py b/hepdata/modules/records/filters.py index 981fe9b3..669d39c2 100644 --- a/hepdata/modules/records/filters.py +++ b/hepdata/modules/records/filters.py @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # diff --git a/hepdata/modules/records/jsonschemas/__init__.py b/hepdata/modules/records/jsonschemas/__init__.py index 684fb9ff..6c7d62e6 100644 --- a/hepdata/modules/records/jsonschemas/__init__.py +++ b/hepdata/modules/records/jsonschemas/__init__.py @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # @@ -22,6 +22,6 @@ # waive the privileges and immunities granted to it by virtue of its status # as an Intergovernmental Organization or submit itself to any jurisdiction. -"""JSON schemas for Zenodo.""" +"""JSON schemas for HEPData.""" from __future__ import absolute_import, print_function diff --git a/hepdata/modules/records/models.py b/hepdata/modules/records/models.py index bc989d04..03920242 100644 --- a/hepdata/modules/records/models.py +++ b/hepdata/modules/records/models.py @@ -1,20 +1,20 @@ # -*- coding: utf-8 -*- # -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # @@ -22,7 +22,7 @@ # waive the privileges and immunities granted to it by virtue of its status # as an Intergovernmental Organization or submit itself to any jurisdiction. -"""Helper models for Zenodo data model.""" +"""Helper models for HEPData data model.""" from __future__ import absolute_import, print_function from invenio_accounts.models import User @@ -33,18 +33,19 @@ __author__ = 'eamonnmaguire' from invenio_db import db +from sqlalchemy_utils.types import JSONType, UUIDType db_engine = 'MyISAM' table_args = {'mysql_engine': db_engine} -submission_participant_link = db.Table('submission_participant_link', db.Column('rec_id', db.Integer, +submission_participant_link = db.Table('submission_participant_link', db.Column('rec_id', UUIDType, db.ForeignKey('hepsubmission.publication_recid')), db.Column('participant_id', db.Integer, db.ForeignKey('submissionparticipant.id')), mysql_engine=db_engine) data_reference_link = db.Table('data_resource_link', - db.Column('rec_id', db.Integer, db.ForeignKey('hepsubmission.publication_recid')), + db.Column('rec_id', UUIDType, db.ForeignKey('hepsubmission.publication_recid')), db.Column('dataresource_id', db.Integer, db.ForeignKey('dataresource.id')), mysql_engine=db_engine) @@ -56,9 +57,9 @@ class HEPSubmission(db.Model): __tablename__ = "hepsubmission" __table_args__ = table_args - publication_recid = db.Column(db.Integer, db.ForeignKey(RecordMetadata.id), primary_key=True) + publication_recid = db.Column(UUIDType, db.ForeignKey(RecordMetadata.id), primary_key=True) - data_abstract = db.Column(db.BLOB) + data_abstract = db.Column(db.Binary) references = db.relationship("DataResource", secondary="data_resource_link") # coordinators are already logged in to submit records, so we know their User id. @@ -87,7 +88,7 @@ class SubmissionParticipant(db.Model): id = db.Column(db.Integer, primary_key=True, nullable=False, autoincrement=True) - publication_recid = db.Column(db.Integer, db.ForeignKey(RecordMetadata.id)) + publication_recid = db.Column(UUIDType, db.ForeignKey(RecordMetadata.id)) full_name = db.Column(db.String(128)) email = db.Column(db.String(128)) @@ -122,10 +123,10 @@ class DataSubmission(db.Model): id = db.Column(db.Integer, primary_key=True, nullable=False, autoincrement=True) - publication_recid = db.Column(db.Integer, db.ForeignKey(RecordMetadata.id)) + publication_recid = db.Column(UUIDType, db.ForeignKey(RecordMetadata.id)) location_in_publication = db.Column(db.String(256)) name = db.Column(db.String(64)) - description = db.Column(db.BLOB()) + description = db.Column(db.Binary) keywords = db.relationship("Keyword", secondary="keyword_submission") # the main data file, with the data table @@ -157,7 +158,7 @@ class License(db.Model): name = db.Column(db.String(256)) url = db.Column(db.String(256)) - description = db.Column(db.BLOB) + description = db.Column(db.Binary) class DataResource(db.Model): @@ -169,7 +170,7 @@ class DataResource(db.Model): file_location = db.Column(db.String(256)) file_type = db.Column(db.String(64), default="json") - file_description = db.Column(db.BLOB) + file_description = db.Column(db.Binary) file_license = db.Column(db.Integer, db.ForeignKey("hepdata_license.id"), nullable=True) @@ -191,7 +192,7 @@ class DataReview(db.Model): db.Integer, primary_key=True, nullable=False, autoincrement=True) - publication_recid = db.Column(db.Integer, db.ForeignKey(RecordMetadata.id)) + publication_recid = db.Column(UUIDType, db.ForeignKey(RecordMetadata.id)) data_recid = db.Column(db.Integer, db.ForeignKey("datasubmission.id")) creation_date = db.Column( diff --git a/hepdata/modules/records/templates/hepdata_records/box/export.html b/hepdata/modules/records/templates/hepdata_records/box/export.html index e67d4560..49a9ee53 100644 --- a/hepdata/modules/records/templates/hepdata_records/box/export.html +++ b/hepdata/modules/records/templates/hepdata_records/box/export.html @@ -1,19 +1,19 @@ {# -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # diff --git a/hepdata/modules/records/templates/hepdata_records/box/info.html b/hepdata/modules/records/templates/hepdata_records/box/info.html index 89fd913c..fbaed3af 100644 --- a/hepdata/modules/records/templates/hepdata_records/box/info.html +++ b/hepdata/modules/records/templates/hepdata_records/box/info.html @@ -1,19 +1,19 @@ {# -# This file is part of Zenodo. +# This file is part of HEPData. # Copyright (C) 2015 CERN. # -# Zenodo is free software; you can redistribute it +# HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # -# Zenodo is distributed in the hope that it will be +# HEPData is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Zenodo; if not, write to the +# along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # @@ -47,29 +47,29 @@ {% if record.doi|is_local_doi %}{{doi_badge(record.doi)}}{% else %}{{ record.doi|doi_link }}{% endif %} {% endif%} - 10.5281/zenodo.32481 + 10.5281/HEPData.32481 -