Commit b2878afb authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update module to remove 'coding utf8'

parent bdf3cd79
# -*- coding: utf-8 -*-
""" authentication """ authentication
* Customise the authentication * Customise the authentication
......
# -*- coding: utf-8 -*-
""" harvest_tools.checkandfix """ harvest_tools.checkandfix
""" """
......
# -*- coding: utf-8 -*-
""" invenio_tools.factory """ invenio_tools.factory
""" """
......
# -*- coding: utf-8 -*-
"""a collection of tools to help tests procedure. """a collection of tools to help tests procedure.
* Build the complete list of messages * Build the complete list of messages
......
# -*- coding: utf-8 -*-
""" categories """ categories
Insert AERES categories Insert AERES categories
""" """
if db(db.categories).count() == 1: if db(db.categories).count() == 1:
db.categories.insert(id=2, db.categories.insert(id=2,
code='ACL', code='ACL',
usual=T('article'), usual=T('article'),
definition='Articles dans des revues internationales ' definition='Articles dans des revues internationales '
'ou nationales avec comité de lecture ' 'ou nationales avec comité de lecture '
'répertoriées par l’AERES ou dans les ' 'répertoriées par l’AERES ou dans les '
'bases de données internationales') 'bases de données internationales')
db.categories.insert(id=3, db.categories.insert(id=3,
code='ACLN', code='ACLN',
usual=T('article'), usual=T('article'),
definition='Articles dans des revues avec comité de ' definition='Articles dans des revues avec comité de '
'lecture non répertoriées dans des bases ' 'lecture non répertoriées dans des bases '
'de données internationales') 'de données internationales')
db.categories.insert(id=4, db.categories.insert(id=4,
code='ASCL', code='ASCL',
usual=T('article'), usual=T('article'),
definition='Articles dans des revues ' definition='Articles dans des revues '
'sans comité de lecture') 'sans comité de lecture')
db.categories.insert(id=5, db.categories.insert(id=5,
code='BRE', code='BRE',
usual=T('patent'), usual=T('patent'),
definition='Brevets'); definition='Brevets');
db.categories.insert(id=6, db.categories.insert(id=6,
code='INV', code='INV',
usual=T('talk'), usual=T('talk'),
definition='Conférences données à l’invitation du ' definition='Conférences données à l’invitation du '
'Comité d’organisation dans un congrès ' 'Comité d’organisation dans un congrès '
'national ou international') 'national ou international')
db.categories.insert(id=7, db.categories.insert(id=7,
code='ACTI', code='ACTI',
usual=T('proceeding'), usual=T('proceeding'),
definition='Communications avec actes dans un congrès ' definition='Communications avec actes dans un congrès '
'international') 'international')
db.categories.insert(id=8, db.categories.insert(id=8,
code='ACTN', code='ACTN',
usual=T('proceeding'), usual=T('proceeding'),
definition='Communications avec actes dans un congrès ' definition='Communications avec actes dans un congrès '
'national') 'national')
db.categories.insert(id=9, db.categories.insert(id=9,
code='COM', code='COM',
usual=T('talk'), usual=T('talk'),
definition='Communications orales sans actes dans un ' definition='Communications orales sans actes dans un '
'congrès international ou national') 'congrès international ou national')
db.categories.insert(id=10, db.categories.insert(id=10,
code='AFF', code='AFF',
usual=T('poster'), usual=T('poster'),
definition='Communications par affiche dans un ' definition='Communications par affiche dans un '
'congrès international ou national') 'congrès international ou national')
db.categories.insert(id=11, db.categories.insert(id=11,
code='OS', code='OS',
usual=T('book'), usual=T('book'),
definition='Ouvrages scientifiques ' definition='Ouvrages scientifiques '
'(ou chapitres de ces ouvrages)') '(ou chapitres de ces ouvrages)')
db.categories.insert(id=12, db.categories.insert(id=12,
code='OV', code='OV',
usual=T('book'), usual=T('book'),
definition='Ouvrages de vulgarisation ' definition='Ouvrages de vulgarisation '
'(ou chapitres de ces ouvrages)') '(ou chapitres de ces ouvrages)')
db.categories.insert(id=13, db.categories.insert(id=13,
code='DO', code='DO',
usual=T('book'), usual=T('book'),
definition='Directions d’ouvrages ou de revues') definition='Directions d’ouvrages ou de revues')
db.categories.insert(id=14, db.categories.insert(id=14,
code='AP', code='AP',
usual=T('report'), usual=T('report'),
definition="Autres productions : bases de données, " definition="Autres productions : bases de données, "
"logiciels enregistrés, traductions, " "logiciels enregistrés, traductions, "
...@@ -89,22 +88,22 @@ if db(db.categories).count() == 1: ...@@ -89,22 +88,22 @@ if db(db.categories).count() == 1:
"fouilles, guides techniques, catalogues " "fouilles, guides techniques, catalogues "
"d’exposition, rapports intermédiaires " "d’exposition, rapports intermédiaires "
"de grands projets internationaux, ...") "de grands projets internationaux, ...")
db.categories.insert(id=15, db.categories.insert(id=15,
code='PRE', code='PRE',
usual=T('preprint'), usual=T('preprint'),
definition="Article soumis à un éditeur " definition="Article soumis à un éditeur "
"mais pas encore publié (preprint)") "mais pas encore publié (preprint)")
db.categories.insert(id=16, db.categories.insert(id=16,
code='PHD', code='PHD',
usual=T('thesis'), usual=T('thesis'),
definition="Doctorat soutenu par un doctorant du laboratoire. " definition="Doctorat soutenu par un doctorant du laboratoire. "
"Cette catégorie inclus les doctorats en co-tutelles") "Cette catégorie inclus les doctorats en co-tutelles")
db.categories.insert(id=17, db.categories.insert(id=17,
code='HDR', code='HDR',
usual=T('thesis'), usual=T('thesis'),
definition="Habilitation à diriger des recherches " definition="Habilitation à diriger des recherches "
"soutenu par un chercheur du laboratoire") "soutenu par un chercheur du laboratoire")
# -*- coding: utf-8 -*-
""" categories """ categories
Insert roles for authors Insert roles for authors
......
# -*- coding: utf-8 -*-
""" axes """ axes
Fill axes table. Fill axes table.
It is used by the lists user interface. It is used by the lists user interface.
The table defines the relation between axis and their granularity. The table defines the relation between axis and their granularity.
This table contains static data which can not be modified by the user. This table contains static data which can not be modified by the user.
""" """
if db(db.axes).count() == 0: if db(db.axes).count() == 0:
axes = ['categories', axes = ['categories',
'countries', 'countries',
'projects', 'projects',
'publishers', 'publishers',
'status', 'status',
'teams'] 'teams']
for axe in axes: for axe in axes:
granularities = set(db[axe].fields).difference(['id', 'definition']) granularities = set(db[axe].fields).difference(['id', 'definition'])
for value in granularities: for value in granularities:
db.axes.insert(axis=axe, db.axes.insert(axis=axe,
granularity=value, granularity=value,
tr_axis=T(axe), tr_axis=T(axe),
tr_granularity=T(value)) tr_granularity=T(value))
db.axes.insert(axis='publications', db.axes.insert(axis='publications',
granularity='year', granularity='year',
tr_axis=T('time'), tr_axis=T('time'),
tr_granularity=T('year')) tr_granularity=T('year'))
......
# -*- coding: utf-8 -*-
""" countries """ countries
List of countries extract from the geographical database www.geonames.org: List of countries extract from the geographical database www.geonames.org:
......
# -*- coding: utf-8 -*-
""" CPPM """ CPPM
Data for CPPM Data for CPPM
""" """
# #
# projects # projects
...@@ -64,7 +63,7 @@ if db(db.organisation).count() == 0: ...@@ -64,7 +63,7 @@ if db(db.organisation).count() == 0:
db.organisation.insert(id_teams=8, id_projects=10) db.organisation.insert(id_teams=8, id_projects=10)
db.organisation.insert(id_teams=8, id_projects=9) db.organisation.insert(id_teams=8, id_projects=9)
db.organisation.insert(id_teams=9, id_projects=12) db.organisation.insert(id_teams=9, id_projects=12)
# #
# Harvester recovery tool: authors of my institute # Harvester recovery tool: authors of my institute
# #
...@@ -136,7 +135,7 @@ if db(db.harvesters).count() == 0: ...@@ -136,7 +135,7 @@ if db(db.harvesters).count() == 0:
collections='find cn d0 and tc c', collections='find cn d0 and tc c',
id_categories=7, id_categories=7,
ratio=0.7) ratio=0.7)
# H1 # H1
db.harvesters.insert(id_teams=5, db.harvesters.insert(id_teams=5,
id_projects=6, id_projects=6,
......
# -*- coding: utf-8 -*-
""" defaults """ defaults
Insert defaults values in the tables Insert defaults values in the tables
""" """
if not db(db.authors_roles).count(): if not db(db.authors_roles).count():
db.authors_roles.insert(id=undef_id, role=undef) db.authors_roles.insert(id=undef_id, role=undef)
...@@ -30,6 +29,6 @@ if not db(db.reports).count(): ...@@ -30,6 +29,6 @@ if not db(db.reports).count():
if not db(db.status).count(): if not db(db.status).count():
db.status.insert(id=undef_id, code=undef, definition=undef) db.status.insert(id=undef_id, code=undef, definition=undef)
if not db(db.teams).count(): if not db(db.teams).count():
db.teams.insert(id=undef_id, team=undef, domain=undef) db.teams.insert(id=undef_id, team=undef, domain=undef)
\ No newline at end of file
# -*- coding: utf-8 -*-
""" preferences """ preferences
""" """
......
# -*- coding: utf-8 -*-
""" reports """ reports
Create examples for list. Create examples for list.
Create examples for metric. Create examples for metric.
""" """
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# #
...@@ -53,7 +52,7 @@ if db(db.renderers).count() == 0: ...@@ -53,7 +52,7 @@ if db(db.renderers).count() == 0:
renderer=T('Report by collaboration'), renderer=T('Report by collaboration'),
template="{publications.title}, {publications.first_author} " template="{publications.title}, {publications.first_author} "
"<span style='font-style: italic;'>et al.</span>, " "<span style='font-style: italic;'>et al.</span>, "
"{collaborations.collaboration}, " "{collaborations.collaboration}, "
"{publications.report_numbers}", "{publications.report_numbers}",
postprocessing='', postprocessing='',
definition=T('Reports or notes signed by collaboration(s)')) definition=T('Reports or notes signed by collaboration(s)'))
...@@ -143,16 +142,16 @@ if db(db.sections).count() == 0: ...@@ -143,16 +142,16 @@ if db(db.sections).count() == 0:
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
if db(db.lists).count() == 0: if db(db.lists).count() == 0:
sections = [T('Preprints'), sections = [T('Preprints'),
T('Articles'), T('Articles'),
T('Proceedings'), T('Proceedings'),
T('Talks'), T('Talks'),
T('Posters'), T('Posters'),
T('Reports'), T('Reports'),
T('Reports by collaboration'), T('Reports by collaboration'),
T('Theses')] T('Theses')]
db.lists.insert(id=2, db.lists.insert(id=2,
list=T('cat. usual / team / year'), list=T('cat. usual / team / year'),
sections=', '.join(sections), sections=', '.join(sections),
...@@ -183,7 +182,7 @@ if db(db.lists).count() == 0: ...@@ -183,7 +182,7 @@ if db(db.lists).count() == 0:
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
if db(db.metrics).count() == 0: if db(db.metrics).count() == 0:
db.metrics.insert(id=2, db.metrics.insert(id=2,
metric=T('cat. usual / year'), metric=T('cat. usual / year'),
axis_column='categories', axis_column='categories',
......
# -*- coding: utf-8 -*-
""" categories """ categories
Insert basic status Insert basic status
""" """
if db(db.status).count() == 1: if db(db.status).count() == 1:
db.status.insert(id=2, db.status.insert(id=2,
code=dbui.UNKNOWN, code=dbui.UNKNOWN,
definition=T("Master field is not properly defined. " definition=T("Master field is not properly defined. "
"Check this record.")) "Check this record."))
db.status.insert(id=3, db.status.insert(id=3,
code='OK', code='OK',
definition=T("The record was validated. " definition=T("The record was validated. "
"It can not be modified or deleted.")) "It can not be modified or deleted."))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment