Application ElasticHal

Sous-paquets

Modules

elasticHal.admin

class elasticHal.admin.ElasticActions

Bases : object

Actions pour l’index Elasticsearch

static export_to_elastic(request)

Initialise la création des index Elasticsearch à partir des csv enregistrés

static update_elastic(request)

Met à jour les données dans les index Elasticsearch sélectionnées

class elasticHal.admin.ExportCsv

Bases : object

export_as_csv(request, queryset)

Exporte les données sélectionnées dans un fichier CSV

class elasticHal.admin.LaboratoryAdmin(model, admin_site)

Bases : ModelAdmin, ExportCsv

Modèle de l’administration des laboratoires

actions = ['export_as_csv']
get_urls()

Initialise les urls du modèle LaboratoryAdmin

list_display = ('acronym', 'label', 'halStructId', 'idRef', 'structSirene')
list_filter = ('structSirene',)
property media
static upload_csv(request)

Permet de charger un fichier CSV dans la base de données du modèle Laboratory

class elasticHal.admin.StructureAdmin(model, admin_site)

Bases : ModelAdmin, ExportCsv

Modèle de l’administration des structures

actions = ['export_as_csv']
get_urls()

Initialise les urls du modèle StructureAdmin

list_display = ('structSirene', 'acronym', 'label')
property media
static upload_csv(request)

Permet de charger un fichier CSV dans la base de données du modèle Structure

elasticHal.apps

class elasticHal.apps.ElastichalConfig(app_name, app_module)

Bases : AppConfig

Configuration de l’application elasticHal

default_auto_field = 'django.db.models.BigAutoField'
name = 'elasticHal'

elasticHal.clean_researchers_from_es_base

elasticHal.collect_from_HAL

elasticHal.collect_from_HAL.TrouveChercheurs(struct)
elasticHal.collect_from_HAL.collect_data(laboratories=False, researcher=False, django_enabler=None)

Collecte les données d’HAL et les indexe dans ElasticSearch

elasticHal.collect_from_HAL.get_structid_list()

Récupère la liste des structSirene des structures recensées dans ElasticSearch

elasticHal.collect_from_HAL.init_labo()

Initialise les données de l’index

elasticHal.insert_entities

elasticHal.insert_entities.create_laboratories_index(pg)

Créé les index pour les laboratoires

elasticHal.insert_entities.create_structures_index(pg)

Crée les index de structures dans Elasticsearch

elasticHal.insert_entities.get_labo_list()

Récupère la liste des laboratoires dans Elasticsearch et/ou Django DB, afin de les stocker dans une variable globale

elasticHal.insert_entities.get_structid_list()

Récupère la liste des structures dans Elasticsearch et / ou Django DB, afin de les stocker dans une variable globale

elasticHal.insert_entities.temp_laboratories(row)

Nettoie les données provenant de Django et les compare à celles d’Elastic pour complétion

elasticHal.models

class elasticHal.models.Laboratory(*args, **kwargs)

Bases : Model

Définition du modèle Laboratory dans Django

exception DoesNotExist

Bases : ObjectDoesNotExist

exception MultipleObjectsReturned

Bases : MultipleObjectsReturned

acronym

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

halStructId

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

idRef

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

label

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
rsnr

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

structSirene

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class elasticHal.models.Researcher(*args, **kwargs)

Bases : Model

Définition du modèle Researcher dans Django

exception DoesNotExist

Bases : ObjectDoesNotExist

exception MultipleObjectsReturned

Bases : MultipleObjectsReturned

aurehalId

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

firstName

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

function

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

halId_s

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

idRef

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

lab

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

labHalId

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

lastName

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

ldapId

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

mail

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
structDomain

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

structSirene

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

supannAffectation

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

supannEntiteAffectationPrincipale

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class elasticHal.models.Structure(*args, **kwargs)

Bases : Model

Définition du modèle Structure dans Django

exception DoesNotExist

Bases : ObjectDoesNotExist

exception MultipleObjectsReturned

Bases : MultipleObjectsReturned

acronym

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

domain

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

label

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
structSirene

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

elasticHal.views

elasticHal.views.get_index_list()

Récupère la liste des index laboratoires dans elasticsearch