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