From f992ecb6573b507351773096af78d65faef1baac Mon Sep 17 00:00:00 2001 From: Serafeim Chatzopoulos Date: Tue, 21 Mar 2023 18:03:55 +0200 Subject: [PATCH] Checkout BIP-Ranker during 'prepare-package' && add it in the oozie-package.tar.gz --- dhp-workflows/dhp-impact-indicators/README.md | 14 ++++++-------- dhp-workflows/dhp-impact-indicators/pom.xml | 19 +++++++++++++++---- .../create_openaire_ranking_graph.py | 0 .../format_ranking_results.py | 0 .../{ => eu.dnetlib}/get_ranking_files.sh | 0 .../resources/{ => eu.dnetlib}/job.properties | 0 .../map_openaire_ids_to_dois.py | 0 .../{ => eu.dnetlib}/map_scores_to_dois.py | 0 .../resources/{ => eu.dnetlib}/workflow.xml | 0 dhp-workflows/pom.xml | 1 + 10 files changed, 22 insertions(+), 12 deletions(-) rename dhp-workflows/dhp-impact-indicators/src/main/resources/{ => eu.dnetlib}/create_openaire_ranking_graph.py (100%) rename dhp-workflows/dhp-impact-indicators/src/main/resources/{ => eu.dnetlib}/format_ranking_results.py (100%) rename dhp-workflows/dhp-impact-indicators/src/main/resources/{ => eu.dnetlib}/get_ranking_files.sh (100%) rename dhp-workflows/dhp-impact-indicators/src/main/resources/{ => eu.dnetlib}/job.properties (100%) rename dhp-workflows/dhp-impact-indicators/src/main/resources/{ => eu.dnetlib}/map_openaire_ids_to_dois.py (100%) rename dhp-workflows/dhp-impact-indicators/src/main/resources/{ => eu.dnetlib}/map_scores_to_dois.py (100%) rename dhp-workflows/dhp-impact-indicators/src/main/resources/{ => eu.dnetlib}/workflow.xml (100%) diff --git a/dhp-workflows/dhp-impact-indicators/README.md b/dhp-workflows/dhp-impact-indicators/README.md index 14f489da3..45a4701e7 100644 --- a/dhp-workflows/dhp-impact-indicators/README.md +++ b/dhp-workflows/dhp-impact-indicators/README.md @@ -1,4 +1,4 @@ -# Ranking Workflow for Openaire Publications +# Ranking Workflow for OpenAIRE Publications This project contains the files for running a paper ranking workflow on the openaire graph using apache oozie. All scripts are written in python and the project setup follows the typical oozie workflow structure: @@ -7,17 +7,15 @@ All scripts are written in python and the project setup follows the typical oozi - a job.properties file specifying parameter values for the parameters used by the workflow - a set of python scripts used by the workflow -**NOTE**: the workflow depends on the external library of ranking scripts called BiP! Ranker. +**NOTE**: the workflow depends on the external library of ranking scripts called [BiP! Ranker](https://github.com/athenarc/Bip-Ranker). You can check out a specific tag/release of BIP! Ranker using maven, as described in the following section. -## Check out a specific tag/release of BIP-Ranker +## Build and deploy -* Edit the `scmVersion` of the maven-scm-plugin in the pom.xml to point to the tag/release version you want to check out. - -* Then, use maven to perform the checkout: +Use the following command for packaging: ``` -mvn scm:checkout +mvn package -Poozie-package -Dworkflow.source.dir=eu/dnetlib/dhp/oa/graph/impact_indicators -DskipTests ``` -* The code should be visible under `src/main/bip-ranker` folder. \ No newline at end of file +Note: edit the property `bip.ranker.tag` of the `pom.xml` file to specify the tag of [BIP-Ranker](https://github.com/athenarc/Bip-Ranker) that you want to use. diff --git a/dhp-workflows/dhp-impact-indicators/pom.xml b/dhp-workflows/dhp-impact-indicators/pom.xml index b510635a6..644b82c7b 100644 --- a/dhp-workflows/dhp-impact-indicators/pom.xml +++ b/dhp-workflows/dhp-impact-indicators/pom.xml @@ -5,9 +5,8 @@ 4.0.0 eu.dnetlib.dhp - dhp + dhp-workflows 1.2.5-SNAPSHOT - ../pom.xml dhp-impact-indicators @@ -16,6 +15,9 @@ 8 8 UTF-8 + + + v1.0.0 @@ -32,9 +34,18 @@ connection tag - v1.0.0 - ${project.build.directory}/../src/main/bip-ranker + ${bip.ranker.tag} + ${project.build.directory}/${oozie.package.file.name}/${oozieAppDir}/bip-ranker + + + checkout-bip-ranker + prepare-package + + checkout + + + diff --git a/dhp-workflows/dhp-impact-indicators/src/main/resources/create_openaire_ranking_graph.py b/dhp-workflows/dhp-impact-indicators/src/main/resources/eu.dnetlib/create_openaire_ranking_graph.py similarity index 100% rename from dhp-workflows/dhp-impact-indicators/src/main/resources/create_openaire_ranking_graph.py rename to dhp-workflows/dhp-impact-indicators/src/main/resources/eu.dnetlib/create_openaire_ranking_graph.py diff --git a/dhp-workflows/dhp-impact-indicators/src/main/resources/format_ranking_results.py b/dhp-workflows/dhp-impact-indicators/src/main/resources/eu.dnetlib/format_ranking_results.py similarity index 100% rename from dhp-workflows/dhp-impact-indicators/src/main/resources/format_ranking_results.py rename to dhp-workflows/dhp-impact-indicators/src/main/resources/eu.dnetlib/format_ranking_results.py diff --git a/dhp-workflows/dhp-impact-indicators/src/main/resources/get_ranking_files.sh b/dhp-workflows/dhp-impact-indicators/src/main/resources/eu.dnetlib/get_ranking_files.sh similarity index 100% rename from dhp-workflows/dhp-impact-indicators/src/main/resources/get_ranking_files.sh rename to dhp-workflows/dhp-impact-indicators/src/main/resources/eu.dnetlib/get_ranking_files.sh diff --git a/dhp-workflows/dhp-impact-indicators/src/main/resources/job.properties b/dhp-workflows/dhp-impact-indicators/src/main/resources/eu.dnetlib/job.properties similarity index 100% rename from dhp-workflows/dhp-impact-indicators/src/main/resources/job.properties rename to dhp-workflows/dhp-impact-indicators/src/main/resources/eu.dnetlib/job.properties diff --git a/dhp-workflows/dhp-impact-indicators/src/main/resources/map_openaire_ids_to_dois.py b/dhp-workflows/dhp-impact-indicators/src/main/resources/eu.dnetlib/map_openaire_ids_to_dois.py similarity index 100% rename from dhp-workflows/dhp-impact-indicators/src/main/resources/map_openaire_ids_to_dois.py rename to dhp-workflows/dhp-impact-indicators/src/main/resources/eu.dnetlib/map_openaire_ids_to_dois.py diff --git a/dhp-workflows/dhp-impact-indicators/src/main/resources/map_scores_to_dois.py b/dhp-workflows/dhp-impact-indicators/src/main/resources/eu.dnetlib/map_scores_to_dois.py similarity index 100% rename from dhp-workflows/dhp-impact-indicators/src/main/resources/map_scores_to_dois.py rename to dhp-workflows/dhp-impact-indicators/src/main/resources/eu.dnetlib/map_scores_to_dois.py diff --git a/dhp-workflows/dhp-impact-indicators/src/main/resources/workflow.xml b/dhp-workflows/dhp-impact-indicators/src/main/resources/eu.dnetlib/workflow.xml similarity index 100% rename from dhp-workflows/dhp-impact-indicators/src/main/resources/workflow.xml rename to dhp-workflows/dhp-impact-indicators/src/main/resources/eu.dnetlib/workflow.xml diff --git a/dhp-workflows/pom.xml b/dhp-workflows/pom.xml index 541d59007..d054ba39b 100644 --- a/dhp-workflows/pom.xml +++ b/dhp-workflows/pom.xml @@ -38,6 +38,7 @@ dhp-usage-raw-data-update dhp-broker-events dhp-doiboost + dhp-impact-indicators