diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6a469fa4532bcb3c6dcf26f706de24330f137a48..3e48fc2283f4ae6c49fe06f659beb1f9fb7099d4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,12 +29,9 @@ actualisation_dois: - git commit -m "Execution du pipeline. Actualisation des dois et des graphes." - git push origin HEAD:${CI_COMMIT_REF_NAME} - # création d'un espace accueillant le clone du repo du site web - - cd .. - - mkdir cloned_repo 2>&1 - - cd cloned_repo - - git clone ${LINK_TO_CLONE} 2>&1 - - git pull + # création d'un espace accueillant le clone du repo du site web, et tests au cas où l'espace existe déjà + - if ! [ -d "../cloned_repo" ]; then mkdir ../cloned_repo; fi + - if [ -d "../cloned_repo/${PATH_TO_PUSH}" ]; then cd ../cloned_repo/${PATH_TO_PUSH}; git pull; else cd ../cloned_repo; git clone ${LINK_TO_CLONE}; fi - cd - # copier le fichier "nb-dois.txt" pour commit dans le repo du site web - cp open-research-data-monitor-back/1-enrich-with-datacite/nb-dois.txt cloned_repo/${PATH_TO_PUSH} diff --git a/0-collect-data/rdg.py b/0-collect-data/rdg.py index 3a8862c0f07bcd6a7327e0d28eb2d609a550299c..67d64a8f59ddf17949a5bd1d5680b66afd32a68e 100644 --- a/0-collect-data/rdg.py +++ b/0-collect-data/rdg.py @@ -21,10 +21,10 @@ urls = [ 'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=authorAffiliation%3AUGA', 'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=producerAffiliation%3AUGA', 'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=contributorAffiliation%3AUGA', - 'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=datasetContactAffiliation%3AGrenoble', - 'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=authorAffiliation%3AGrenoble', - 'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=producerAffiliation%3AGrenoble', - 'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=contributorAffiliation%3AGrenoble' + 'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=datasetContactAffiliation%3A(Grenoble AND Alpes)', + 'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=authorAffiliation%3AGrenoble(Grenoble AND Alpes)', + 'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=producerAffiliation%3AGrenoble(Grenoble AND Alpes)', + 'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=contributorAffiliation%3AGrenoble(Grenoble AND Alpes)' # possiblilité d'ajouter d'autres requêtes ] diff --git a/1-enrich-with-datacite/concatenate-enrich-dois.py b/1-enrich-with-datacite/concatenate-enrich-dois.py index 2f4e4b5954b771ec7c44c1830db728d4a19dd552..bf21c95d738e0f20cfaedf582b77ffc895c655c3 100644 --- a/1-enrich-with-datacite/concatenate-enrich-dois.py +++ b/1-enrich-with-datacite/concatenate-enrich-dois.py @@ -59,9 +59,9 @@ if temp_rows : ## remove not wanted datacite type type_to_explude = ["Book", "ConferencePaper", "ConferenceProceeding", "JournalArticle", "BookChapter", "Service", "Preprint"] - df_out = df_concat[ ~df_concat["resourceTypeGeneral"].isin(type_to_explude) ].copy() - - ## output main CSV + df_out = df_concat[ ~df_concat["resourceTypeGeneral"].isin(type_to_explude) ].copy() + + ## output main CSV df_out.to_csv("../dois-uga.csv", index = False) print(f"\n\nnb of doi exported \t{len(df_out)}") diff --git a/2-produce-graph/pie--datacite-type.png b/2-produce-graph/pie--datacite-type.png index d9f3c88b3cf2198de463782d578ef2b5b97d43b5..d996c0a85f05698fc6e046e31c6c89110e70157d 100644 Binary files a/2-produce-graph/pie--datacite-type.png and b/2-produce-graph/pie--datacite-type.png differ