Commit 7441a3a2 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Remove all reference to CPPM.

parent 895e34dd
......@@ -133,7 +133,7 @@ def edit_insert():
values['PublicationsFirst_author'] = record.first_author()
values['PublicationsAuthors'] = record.authors()
values['PublicationsAuthors_cppm'] = record.my_authors
values['PublicationsAuthors_institute'] = record.my_authors
# collaboration
id = get_id(db.collaborations, collaboration=record.collaboration())
......
......@@ -148,7 +148,7 @@ def extract_authors():
# J. DOe,56 P. Schmidt,67 ...
case_1 = True
all_authors = []
cppm_authors = []
my_authors = []
rex = re.compile('([^\d]+)[ ,]?([\d,a-z\*]+)[ ,]')
for el in rex.finditer(authors):
......@@ -164,7 +164,7 @@ def extract_authors():
all_authors.append(author)
if el.group(2) == selector.affiliation:
cppm_authors.append(author)
my_authors.append(author)
# # CASE 2 -- affiliation is base on letter
# # J. Doeb,ae , P. Schmidtb,1 , H. Fooae,e, ....
......@@ -188,4 +188,4 @@ def extract_authors():
if not case_1:
return MSG_NO_AUTHORS
return dict(all=', '.join(all_authors), cppm=', '.join(cppm_authors))
\ No newline at end of file
return dict(all=', '.join(all_authors), my_authors=', '.join(my_authors))
\ No newline at end of file
......@@ -147,7 +147,6 @@
'country': 'pays',
'Country': 'Pays',
'CPPM': 'CPPM',
'cppm_authors': 'autheurs du cppm',
'Created By': 'Created By',
'Created On': 'Created On',
'Data base scheme': 'Schéma base de donnée',
......@@ -222,11 +221,11 @@
'Filter categories': 'Filtrer les catégories',
'Filter collaborations': 'Filtrer les collaborations',
'Filter countries': 'Filtrer les pays',
'Filter cppm_authors': 'Filtrer les auteurs du CPPM',
'Filter diplomas': 'Filtrer les diplomes',
'Filter harvesters': 'Filtrer les moissonneurs',
'Filter lists': 'Filtrer les listes',
'Filter metrics': 'Filtrer les métriques',
'Filter my_authors': 'Filtrer les auteurs du laboratoire',
'Filter publications': 'Filtrer les publications',
'Filter publishers': 'Filtrer les revues',
'Filter status': 'Filtrer les status',
......@@ -308,7 +307,7 @@
'licence': 'license',
'Lignes': 'Lignes',
'List': 'Liste',
'List of authors belonging to CPPM, separated by comma: P.-Y. Doe, J. Smith': 'Liste des auteurs du labaoratoire, séparé par une virgule : P.-Y. Doe, J. Smith',
'List of authors belonging to your institute, separated by comma: P.-Y. Doe, J. Smith': 'Liste des auteurs du labaoratoire, séparé par une virgule : P.-Y. Doe, J. Smith',
'List of authors separated by comma: J. Doe, P.-Y. Smith': 'Liste des auteurs séparé par une virgule : J. Doe, P.-Y. Smith',
'List of category codes separated by a comma: ACL, ACLN. Only the publications with the given categories will be processed in the section.': 'Liste de catégorie (code) spéraré par une virgule: ACL, ACLN. Seules les publications de ces categories seront analysées dans cette section.',
'List of collections separated by comma: LHCb Papers, LHCb Talks': 'Liste des collections separé par une virgule : LHCb Papers, LHCb Talks',
......@@ -345,8 +344,9 @@
'Modified By': 'Modified By',
'Modified On': 'Modified On',
'Modify': 'Modifier',
'my_authors': 'autheurs du laboratoire',
'Name': 'Nom',
'Name of a function located in the modules list_postprocessing. Can be a list of name separated by comma.': 'Liste de fonction du module list_postprocessing, séparé par une virgule. Les fonctions disponibles sont : clean, highlight_cppm_authors, highlight_cppm_speaker, remove_undef.',
'Name of a function located in the modules list_postprocessing. Can be a list of name separated by comma.': 'Liste de fonction du module list_postprocessing, séparé par une virgule. Les fonctions disponibles sont : clean, highlight_my_authors, highlight_my_speaker, remove_undef.',
'Name of the database table containing the publications shown in this section.': 'Nom de la table qui contient les publications qui seront présentées dans cette section.',
'Name of the list.': 'Nom de la liste.',
'Name of the section.': 'Nom de la section.',
......@@ -571,9 +571,9 @@
'Temporary record': 'Enregistrement temporaire',
'Temps': 'Temps',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.',
'The cppm authors contains the team name?': "Le champ autheurs du CPPM contiens le nom de l'équipe ?",
'The field "%s" is missing ...': 'Le champ "%s" est manquant ...',
'The identifier of the record in the invenio store': 'The identifier of the record in the invenio store',
'The institute authors contains the team name?': "Le champ, autheurs du laboratoire, contiens le nom de l'équipe ?",
'The name of the first author: J. Doe': 'Nom du premier auteur : J. Doe',
'The name of the harvester.': 'Le nom du moissoneur.',
'The name of the speaker: P.-Y. Smith': "Nom de l'orateur : P.-Y. Smith",
......
......@@ -18,8 +18,9 @@ DATABASE = 'GesProd'
# DATABASE = 'test_publications'
# DATABASE = 'foo'
# Migration flag
# Migration flags
MIGRATE = False
MIGRATE_USER = False
# Roles
ID_ADMIN, ADMIN, DEF_ADMIN = 1, 'admin', 'administrators, librairians,...'
......
......@@ -91,10 +91,10 @@ tables = ['application',
'collaborations',
'controllers',
'countries',
'cppm_authors',
'harvesters',
'lists',
'metrics',
'my_authors',
'organisation',
'projects',
'publications',
......
# -*- coding: utf-8 -*-
""" controllers
The table cppm_authors, controllers and harvesters are used
The table my_authors, controllers and harvesters are used
by the harvesters tool.
It define the relation between harvester controllers and
......
# -*- coding: utf-8 -*-
""" harvesters
The table cppm_authors, controllers and harvesters are used
The table my_authors, controllers and harvesters are used
by the harvesters tool.
"""
......
# -*- coding: utf-8 -*-
""" cppm_authors
The table cppm_authors, controllers and harvesters are used
by the harvesters tool.
""" my_authors
It is the recovery table use by harvesters.
It defines a list of authors for each projects and each year.
It defines a list of authors belonging to your institute
for each project and each year.
"""
tp_authors_cppm = \
T("List of authors belonging to CPPM, separated by comma: P.-Y. Doe, J. Smith")
T("List of authors belonging to your institute, separated by comma: P.-Y. Doe, J. Smith")
db.define_table("cppm_authors",
db.define_table("my_authors",
Field("year", "integer", default=year, notnull=True),
Field("id_teams", "reference teams", label='Team', notnull=True),
Field("id_projects", "reference projects", label='Project', notnull=True),
Field("authors", "text", comment=tp_authors_cppm, notnull=True),
migrate="cppm_authors.table")
migrate="my_authors.table")
db.cppm_authors.year.requires = IS_INT_IN_RANGE(1900, year+1)
\ No newline at end of file
db.my_authors.year.requires = IS_INT_IN_RANGE(1900, year+1)
\ No newline at end of file
......@@ -5,8 +5,8 @@
tp_authors = \
T("List of authors separated by comma: J. Doe, P.-Y. Smith")
tp_authors_cppm = \
T("List of authors belonging to CPPM, separated by comma: P.-Y. Doe, J. Smith")
tp_authors_institute = \
T("List of authors belonging to your institute, separated by comma: P.-Y. Doe, J. Smith")
tp_conference_dates = \
T("Dates of the conference = 9-10 Oct 2012 or 29 Oct - 3 Nov 2012")
......@@ -85,7 +85,7 @@ db.define_table("publications",
Field("book_isbn", "string", length=255, label="ISBN", default=""),
Field("book_issn", "string", length=255, label="ISSN", default=""),
Field("book_chapters", "string", length=255, default="", label="Chapter(s)"),
Field("authors_cppm", "text", comment=tp_authors_cppm, notnull=True, label="Authors"),
Field("authors_institute", "text", comment=tp_authors_institute, notnull=True, label="Authors"),
Field("id_authors_roles", "reference authors_roles", default=undef_id, label="Role"),
Field("id_teams", "reference teams", label='Team', notnull=True),
Field("id_projects", "reference projects", label='Project', notnull=True),
......@@ -99,7 +99,7 @@ db.publications._before_insert.append(INHIBIT_DUPLICATE_PUBLICATION)
db.publications._before_update.append(INHIBIT_PUBLICATION_UPDATE_ON_OK)
db.publications.authors.filter_in = dbui.CLEAN_COMMA
db.publications.authors_cppm.filter_in = dbui.CLEAN_COMMA
db.publications.authors_institute.filter_in = dbui.CLEAN_COMMA
db.publications.conference_title.filter_in = dbui.CLEAN_SPACES
db.publications.conference_town.filter_in = dbui.CLEAN_SPACES
db.publications.defense.filter_in = filters.CLEAN_THESIS_DEFENSE
......
# -*- coding: utf-8 -*-
""" controllers
The table cppm_authors, controllers and harvesters are used
by the harvesters tool.
It define the relation between harvester controllers and
publication categories.
......
# -*- coding: utf-8 -*-
""" harvesters
The table cppm_authors, controllers and harvesters are used
by the harvesters tool.
"""
#-------------------------------------------------------------------------------
#
......
# -*- coding: utf-8 -*-
""" cppm_authors
The table cppm_authors, controllers and harvesters are used
by the harvesters tool.
It is the recovery table use by harvesters.
It defines a list of authors for each projects and each year.
""" my_authors
"""
#-------------------------------------------------------------------------------
......@@ -13,7 +7,7 @@
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
fieldsModifier = dbui.FieldsModifier('cppm_authors')
fieldsModifier = dbui.FieldsModifier('my_authors')
fieldsModifier.configure_field('authors', height=250)
#-------------------------------------------------------------------------------
......@@ -22,11 +16,11 @@ fieldsModifier.configure_field('authors', height=250)
#
#-------------------------------------------------------------------------------
# Relation between projects and teams
formModifier = dbui.FormModifier('cppm_authors')
formModifier = dbui.FormModifier('my_authors')
formModifier.configure(width=400)
formModifier.link_comboboxes(master=db.cppm_authors.id_projects,
slave=db.cppm_authors.id_teams,
formModifier.link_comboboxes(master=db.my_authors.id_projects,
slave=db.my_authors.id_teams,
masterHasSlaveData='organisation',
slaveExtJS={'hidden': True})
......@@ -35,7 +29,7 @@ formModifier.link_comboboxes(master=db.cppm_authors.id_projects,
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
gridModifier = dbui.GridModifier('cppm_authors')
gridModifier = dbui.GridModifier('my_authors')
gridModifier.configure_column('year', width=10)
gridModifier.configure_column('id_teams', width=15)
gridModifier.configure_column('id_projects', width=15)
......@@ -52,5 +46,5 @@ gridModifier.configure_gridWithFilter(selectorTitle= T('Filter'))
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
# storeModifier = dbui.StoreModifier('cppm_authors')
# storeModifier.orderby(db.teams.team, ~db.cppm_authors.year)
# storeModifier = dbui.StoreModifier('my_authors')
# storeModifier.orderby(db.teams.team, ~db.my_authors.year)
......@@ -72,7 +72,7 @@ formModifier.merge_fields('book_isbn',
'book_chapters',
title=T('Book'))
formModifier.merge_fields('authors_cppm',
formModifier.merge_fields('authors_institute',
'id_authors_roles',
'id_teams',
'id_projects',
......@@ -147,7 +147,7 @@ gridModifier.hide_columns('id_authors_roles',
'id_teams',
'id_projects',
'authors',
'authors_cppm',
'authors_institute',
'defense',
'directors',
'origin',
......@@ -160,7 +160,7 @@ gridModifier.append_filter(('id_teams', '==', T('is equal to')))
gridModifier.append_filter(('id_projects', '==', T('is equal to')))
gridModifier.append_filter(('id_categories', '==', T('is equal to')))
gridModifier.append_filter(('authors_cppm', 'contains', T('contains')), \
gridModifier.append_filter(('authors_institute', 'contains', T('contains')), \
allowBlank=True, xtype='textfield')
gridModifier.append_filter(('title', 'contains', T('contains')), allowBlank=True)
......
......@@ -66,24 +66,24 @@ if db(db.organisation).count() == 0:
db.organisation.insert(id_teams=9, id_projects=12)
#
# Harvester recovery tool: cppm authors
# Harvester recovery tool: authors of my institute
#
if db(db.cppm_authors).count() == 0:
db.cppm_authors.insert(id=1, year=1998, id_teams=7, id_projects=8, authors="E. Aslanides, B. Dinkespiler, R. Le Gac, M. Menouni, A. Tsaregorodtsev")
db.cppm_authors.insert(id=2, year=1999, id_teams=7, id_projects=8, authors="E. Aslanides, J.-P. Cachemiche, T. Da silva, B. Dinkespiler, R. Le Gac, O. Leroy, M. Menouni, A. Tsaregorodtsev")
db.cppm_authors.insert(id=3, year=2000, id_teams=7, id_projects=8, authors="E. Aslanides, J.-P. Cachemiche, T. Da silva, R. Le Gac, O. Leroy, P.-L. Liotard, M. Menouni, A. Tsaregorodtsev, B. Viaud")
db.cppm_authors.insert(id=4, year=2001, id_teams=7, id_projects=8, authors="E. Aslanides, J.-P. Cachemiche, T. Da silva, F. Derue, P.-Y. Duval, R. Le Gac, O. Leroy, P.-L. Liotard, M. Menouni, A. Tsaregorodtsev, B. Viaud")
db.cppm_authors.insert(id=5, year=2002, id_teams=7, id_projects=8, authors="E. Aslanides, J.-P. Cachemiche, F. Derue, P.-Y. Duval, V. Garonne, R. Le Gac, O. Leroy, P.-L. Liotard, M. Menouni, A. Tsaregorodtsev, B. Viaud")
db.cppm_authors.insert(id=6, year=2003, id_teams=7, id_projects=8, authors="E. Aslanides, J. Babel, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, V. Garonne, R. Le Gac, O. Leroy, P.-L. Liotard, M. Menouni, L. Tocco, A. Tsaregorodtsev, B. Viaud")
db.cppm_authors.insert(id=7, year=2004, id_teams=7, id_projects=8, authors="E. Aslanides, J. Babel, C. Benchouk, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, V. Garonne, R. Le Gac, O. Leroy, P.-L. Liotard, D. Lunesu, F. Marin, M. Menouni, L. Tocco, A. Tsaregorodtsev")
db.cppm_authors.insert(id=8, year=2005, id_teams=7, id_projects=8, authors="E. Aslanides, J. Babel, C. Benchouk, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, S. Favard, V. Garonne, R. Le Gac, O. Leroy, P.-L. Liotard, D. Lunesu, F. Marin, A. Tsaregorodtsev")
db.cppm_authors.insert(id=9, year=2006, id_teams=7, id_projects=8, authors="E. Aslanides, J. Babel, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, S. Favard, R. Le Gac, O. Leroy, P.-L. Liotard, F. Marin, S. Poss, A. Tsaregorodtsev")
db.cppm_authors.insert(id=10, year=2007, id_teams=7, id_projects=8, authors="E. Aslanides, J. Babel, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, B. Khanji, R. Le Gac, O. Leroy, P.-L. Liotard, G. Mancinelli, F. Marin, S. Poss, M. Sapunov, A. Tsaregorodtsev")
db.cppm_authors.insert(id=11, year=2008, id_teams=7, id_projects=8, authors="F. Alessio, E. Aslanides, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, F. Hachon, B. Khanji, R. Le Gac, O. Leroy, G. Mancinelli, F. Marin, S. Poss, M. Sapunov, J. Serrano, A. Tsaregorodtsev")
db.cppm_authors.insert(id=12, year=2009, id_teams=7, id_projects=8, authors="C. Adrover, F. Alessio, E. Aslanides, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, F. Hachon, B. Khanji, R. Le Gac, O. Leroy, G. Mancinelli, F. Marin, E. Maurice, S. Poss, M. Sapunov, J. Serrano, A. Tsaregorodtsev")
db.cppm_authors.insert(id=13, year=2010, id_teams=7, id_projects=8, authors="C. Adrover, F. Alessio, E. Aslanides, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, F. Hachon, B. Khanji, R. Le Gac, O. Leroy, G. Mancinelli, F. Marin, E. Maurice, M. Perrin-Terrin, F. Réthoré, M. Sapunov, J. Serrano, A. Tsaregorodtsev")
db.cppm_authors.insert(id=14, year=2011, id_teams=7, id_projects=8, authors="C. Adrover, F. Alessio, E. Aslanides, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, F. Hachon, B. Khanji, R. Le Gac, O. Leroy, G. Mancinelli, E. Maurice, M. Perrin-Terrin, F. Réthoré, M. Sapunov, J. Serrano, A. Tsaregorodtsev")
db.cppm_authors.insert(id=15, year=2012, id_teams=7, id_projects=8, authors="C. Adrover, E. Aslanides, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, F. Hachon, B. Khanji, R. Le Gac, O. Leroy, G. Mancinelli, E. Maurice, M. Perrin-Terrin, F. Réthoré, M. Sapunov, J. Serrano, A. Tsaregorodtsev")
if db(db.my_authors).count() == 0:
db.my_authors.insert(id=1, year=1998, id_teams=7, id_projects=8, authors="E. Aslanides, B. Dinkespiler, R. Le Gac, M. Menouni, A. Tsaregorodtsev")
db.my_authors.insert(id=2, year=1999, id_teams=7, id_projects=8, authors="E. Aslanides, J.-P. Cachemiche, T. Da silva, B. Dinkespiler, R. Le Gac, O. Leroy, M. Menouni, A. Tsaregorodtsev")
db.my_authors.insert(id=3, year=2000, id_teams=7, id_projects=8, authors="E. Aslanides, J.-P. Cachemiche, T. Da silva, R. Le Gac, O. Leroy, P.-L. Liotard, M. Menouni, A. Tsaregorodtsev, B. Viaud")
db.my_authors.insert(id=4, year=2001, id_teams=7, id_projects=8, authors="E. Aslanides, J.-P. Cachemiche, T. Da silva, F. Derue, P.-Y. Duval, R. Le Gac, O. Leroy, P.-L. Liotard, M. Menouni, A. Tsaregorodtsev, B. Viaud")
db.my_authors.insert(id=5, year=2002, id_teams=7, id_projects=8, authors="E. Aslanides, J.-P. Cachemiche, F. Derue, P.-Y. Duval, V. Garonne, R. Le Gac, O. Leroy, P.-L. Liotard, M. Menouni, A. Tsaregorodtsev, B. Viaud")
db.my_authors.insert(id=6, year=2003, id_teams=7, id_projects=8, authors="E. Aslanides, J. Babel, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, V. Garonne, R. Le Gac, O. Leroy, P.-L. Liotard, M. Menouni, L. Tocco, A. Tsaregorodtsev, B. Viaud")
db.my_authors.insert(id=7, year=2004, id_teams=7, id_projects=8, authors="E. Aslanides, J. Babel, C. Benchouk, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, V. Garonne, R. Le Gac, O. Leroy, P.-L. Liotard, D. Lunesu, F. Marin, M. Menouni, L. Tocco, A. Tsaregorodtsev")
db.my_authors.insert(id=8, year=2005, id_teams=7, id_projects=8, authors="E. Aslanides, J. Babel, C. Benchouk, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, S. Favard, V. Garonne, R. Le Gac, O. Leroy, P.-L. Liotard, D. Lunesu, F. Marin, A. Tsaregorodtsev")
db.my_authors.insert(id=9, year=2006, id_teams=7, id_projects=8, authors="E. Aslanides, J. Babel, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, S. Favard, R. Le Gac, O. Leroy, P.-L. Liotard, F. Marin, S. Poss, A. Tsaregorodtsev")
db.my_authors.insert(id=10, year=2007, id_teams=7, id_projects=8, authors="E. Aslanides, J. Babel, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, B. Khanji, R. Le Gac, O. Leroy, P.-L. Liotard, G. Mancinelli, F. Marin, S. Poss, M. Sapunov, A. Tsaregorodtsev")
db.my_authors.insert(id=11, year=2008, id_teams=7, id_projects=8, authors="F. Alessio, E. Aslanides, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, F. Hachon, B. Khanji, R. Le Gac, O. Leroy, G. Mancinelli, F. Marin, S. Poss, M. Sapunov, J. Serrano, A. Tsaregorodtsev")
db.my_authors.insert(id=12, year=2009, id_teams=7, id_projects=8, authors="C. Adrover, F. Alessio, E. Aslanides, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, F. Hachon, B. Khanji, R. Le Gac, O. Leroy, G. Mancinelli, F. Marin, E. Maurice, S. Poss, M. Sapunov, J. Serrano, A. Tsaregorodtsev")
db.my_authors.insert(id=13, year=2010, id_teams=7, id_projects=8, authors="C. Adrover, F. Alessio, E. Aslanides, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, F. Hachon, B. Khanji, R. Le Gac, O. Leroy, G. Mancinelli, F. Marin, E. Maurice, M. Perrin-Terrin, F. Réthoré, M. Sapunov, J. Serrano, A. Tsaregorodtsev")
db.my_authors.insert(id=14, year=2011, id_teams=7, id_projects=8, authors="C. Adrover, F. Alessio, E. Aslanides, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, F. Hachon, B. Khanji, R. Le Gac, O. Leroy, G. Mancinelli, E. Maurice, M. Perrin-Terrin, F. Réthoré, M. Sapunov, J. Serrano, A. Tsaregorodtsev")
db.my_authors.insert(id=15, year=2012, id_teams=7, id_projects=8, authors="C. Adrover, E. Aslanides, J.-P. Cachemiche, J. Cogan, P.-Y. Duval, F. Hachon, B. Khanji, R. Le Gac, O. Leroy, G. Mancinelli, E. Maurice, M. Perrin-Terrin, F. Réthoré, M. Sapunov, J. Serrano, A. Tsaregorodtsev")
#
# Harvester configuration
......
......@@ -30,7 +30,7 @@ if db(db.renderers).count() == 0:
"{publications.conference_town}, "
"{countries.country}, "
"{publications.conference_dates}",
postprocessing='highlight_cppm_speaker',
postprocessing='highlight_my_speaker',
definition=T('Talks or proceedings'))
db.renderers.insert(id=4,
......@@ -46,7 +46,7 @@ if db(db.renderers).count() == 0:
renderer=T('Report'),
template="{publications.title}, {publications.authors}, "
"{publications.report_numbers}",
postprocessing='highlight_cppm_authors',
postprocessing='highlight_my_authors',
definition=T('Reports or notes signed by members of the institute'))
db.renderers.insert(id=6,
......
......@@ -47,7 +47,7 @@ if session.role in (ADMIN, USER):
confHarvesterNode.add_child(T('harvesters'), to_grid('harvesters'))
confHarvesterNode.add_child(T('relation harvesters / categories'), to_grid('controllers'))
confHarvesterNode.add_child(T("author's rescue list"), to_grid('cppm_authors'))
confHarvesterNode.add_child(T("author's rescue list"), to_grid('my_authors'))
#-------------------------------------------------------------------------------
#
......
......@@ -61,8 +61,8 @@ def check_publication(row):
li.append(text)
# CPPM authors (team name, ...)
if row.teams.team in row.publications.authors_cppm:
text = T("The cppm authors contains the team name?")
if row.teams.team in row.publications.authors_institute:
text = T("The institute authors contains the team name?")
li.append(text)
# submitted date
......
......@@ -175,12 +175,12 @@ def get_harvester_tool(controller):
return Tool
def learn_cppm_authors(db, authors=None,
id_project=None,
id_team=None,
year=None):
"""Train the rescue list of of CPPM authors stored in the database
using the list C{authors} provided in argument.
def learn_my_authors(db, authors=None,
id_project=None,
id_team=None,
year=None):
"""Train the rescue list of the authors of my institute,
stored in the database, using the list C{authors} provided in argument.
@note: all keyword arguments have to be defined.
......@@ -201,16 +201,16 @@ def learn_cppm_authors(db, authors=None,
"""
# get the list of authors store in the database
row = db.cppm_authors(id_projects=id_project,
row = db.my_authors(id_projects=id_project,
id_teams=id_team,
year=year)
# no entry in the database
if not row:
db.cppm_authors[0] = dict(authors=authors,
id_projects=id_project,
id_teams=id_team,
year=year)
db.my_authors[0] = dict(authors=authors,
id_projects=id_project,
id_teams=id_team,
year=year)
return
database_authors = row.authors.split(', ')
......@@ -237,7 +237,7 @@ def learn_cppm_authors(db, authors=None,
database_authors.extend(li)
database_authors.sort(key=family_name_fr)
db.cppm_authors[row.id] = dict(authors=', '.join(database_authors))
db.my_authors[row.id] = dict(authors=', '.join(database_authors))
class Msg(Storage):
......@@ -519,7 +519,7 @@ class PublicationsTool(object):
return self.__reference
# extract the list from the database
row = self.db.cppm_authors(year=year,
row = self.db.my_authors(year=year,
id_projects=self.selector.id_projects,
id_teams=self.selector.id_teams)
......@@ -932,7 +932,7 @@ class Articles(PublicationsTool):
# transform a preprint into an article
self.logs[-1].modify(MSG_TRANSFORM_PREPRINT, year)
if self.selector.mode != DRY_RUN:
db.publications[id] = dict(authors_cppm=my_authors,
db.publications[id] = dict(authors_institute=my_authors,
id_categories=self.harvester.id_categories,
id_publishers=id_publisher,
id_status=UNDEF_ID,
......@@ -1012,12 +1012,12 @@ class Articles(PublicationsTool):
return (None, 0)
# transform an existing preprint into article
# cppm authors can be missing in the preprint
# institute authors can be missing in the preprint
# change also the status
self.logs[-1].modify(MSG_TRANSFORM_PREPRINT, year)
if self.selector.mode != DRY_RUN:
db.publications[id] = dict(authors_cppm=my_authors,
db.publications[id] = dict(authors_institute=my_authors,
id_categories=self.harvester.id_categories,
id_publishers=id_publisher,
id_status=UNDEF_ID,
......@@ -1097,7 +1097,7 @@ class Articles(PublicationsTool):
if self.selector.mode != DRY_RUN:
db.publications.insert(authors=record.authors(),
authors_cppm=record.my_authors,
authors_institute=record.my_authors,
first_author=first_author,
id_categories=self.harvester.id_categories,
id_collaborations=id_collaboration,
......@@ -1114,7 +1114,7 @@ class Articles(PublicationsTool):
volume=volume,
year=year)
learn_cppm_authors(db,
learn_my_authors(db,
authors=record.my_authors,
id_project=self.harvester.id_projects,
id_team=self.harvester.id_teams,
......@@ -1210,7 +1210,7 @@ class Notes(PublicationsTool):
# eventually insert a new report
if self.selector.mode != DRY_RUN:
db.publications.insert(authors=record.authors(),
authors_cppm=record.my_authors,
authors_institute=record.my_authors,
first_author=first_author,
id_categories=self.harvester.id_categories,
id_projects=self.harvester.id_projects,
......@@ -1312,7 +1312,7 @@ class Preprints(PublicationsTool):
if self.selector.mode != DRY_RUN:
db.publications.insert(authors=record.authors(),
authors_cppm=record.my_authors,
authors_institute=record.my_authors,
first_author=first_author,
id_categories=self.harvester.id_categories,
id_collaborations=id_collaboration,
......@@ -1663,7 +1663,7 @@ class Proceedings(PublicationsTool):
if self.selector.mode != DRY_RUN:
di = dict(authors=authors,
authors_cppm=record.my_authors,
authors_institute=record.my_authors,
conference_dates=conference_dates,
conference_speaker=first_author,
conference_title=conference_title,
......@@ -1761,15 +1761,15 @@ class Reports(PublicationsTool):
title = record.title()
year = record.year()
# allow undefined cppm authors
# allow undefined institute authors
try:
self.check.my_authors(record,
reference=self._my_author_list(record),
cmpFct=family_name_fr)
authors_cppm = record.my_authors
authors_institute = record.my_authors
except CheckException:
authors_cppm = UNKNOWN
authors_institute = UNKNOWN
id_status = get_id(db.status, code=UNKNOWN)
# check the collaboration
......@@ -1793,7 +1793,7 @@ class Reports(PublicationsTool):
# eventually insert a new report
if self.selector.mode != DRY_RUN:
db.publications.insert(authors=authors,
authors_cppm=authors_cppm,
authors_institute=authors_institute,
first_author=first_author,
id_categories=self.harvester.id_categories,
id_collaborations=id_collaboration,
......@@ -2029,7 +2029,7 @@ class Talks(PublicationsTool):
# eventually insert a new talk
if self.selector.mode != DRY_RUN:
db.publications.insert(authors=record.authors(),
authors_cppm=record.my_authors,
authors_institute=record.my_authors,
conference_dates=conference_dates,
conference_speaker=first_author,
conference_title=conference_title,
......@@ -2137,7 +2137,7 @@ class Thesis(PublicationsTool):
# eventually insert a new thesis
if self.selector.mode != DRY_RUN:
db.publications.insert(authors=first_author,
authors_cppm=first_author,
authors_institute=first_author,
defense=defense_date,
directors=record.these_directors(),
first_author=first_author,
......
......@@ -2509,17 +2509,14 @@ if __name__ == "__main__":
# public notes
# xml = csv.search_year('LHCb Notes', '2009', rg=150)
# msv.process(xml, func=print_note)
# msv.process(xml, func=print_note, filter=filter_cppm)
# conference talks
# xml = csv.search_year('LHCb Talks', '2010', rg=150)
# msv.process(xml, func=print_talk)
# msv.process(xml, func=print_talk, filter=filter_cppm)
# conference proceeding
# xml = csv.search_year('LHCb Conference Proceedings', '2010', rg=150)
# msv.process(xml, func=print_talk)
# msv.process(xml, func=print_talk, filter=filter_cppm)
#msv.process(xml, func=pprint.pprint)
......@@ -38,8 +38,8 @@ def clean(value, template, record):
return value
def highlight_cppm_authors(value, template, record):
"""Highlight the name of the CPPM author by underlying them.
def highlight_my_authors(value, template, record):
"""Highlight the name of the authors of my institute by underlying them.
@type value: unicode
@param value: the current string representing the record
......@@ -60,7 +60,7 @@ def highlight_cppm_authors(value, template, record):
"""
li = record.publications.authors_cppm.split(',')
li = record.publications.authors_institute.split(',')
for author in li:
author = author.strip()
......@@ -69,9 +69,9 @@ def highlight_cppm_authors(value, template, record):
return value
def highlight_cppm_speaker(value, template, record):
"""Highlight the name of the CPPM speaker (bold)
and CPPM authors (underline).
def highlight_my_speaker(value, template, record):
"""Highlight the name of the speaker of my institute (bold)
and my authors (underline).
@type value: unicode
@param value: the current string representing the record
......@@ -92,13 +92,13 @@ def highlight_cppm_speaker(value, template, record):
"""
# cppm speaker is in bold
# my speaker is in bold
speaker = record.publications.conference_speaker.strip()
if speaker and speaker in record.publications.authors_cppm:
if speaker and speaker in record.publications.authors_institute:
value = value.replace(speaker, '<b>%s</b>' % speaker)
# cppm auhtors are underlined
li = record.publications.authors_cppm.split(',')
# my authors are underlined
li = record.publications.authors_institute.split(',')
for author in li:
author = author.strip()
......
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