Skip to content

Commit

Permalink
Merge pull request #258 from Knowledge-Graph-Hub/jenkins_change_trans…
Browse files Browse the repository at this point in the history
…form_stage

Change Jenkins transform step
  • Loading branch information
justaddcoffee committed Jun 30, 2020
2 parents 8b03eea + 3cab4ce commit c670fd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 1 addition & 12 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,7 @@ pipeline {
stage('Transform') {
steps {
dir('./gitrepo') {
script {
def run_py_transform = sh(
script: '. venv/bin/activate && python3.7 run.py transform', returnStatus: true
)
if (run_py_transform != 0) { // 'run.py transform' failed - let's try to download last good copy of transformed/ from s3 to data/
withCredentials([file(credentialsId: 's3cmd_kg_hub_push_configuration', variable: 'S3CMD_JSON')]) {
sh 'rm -fr data/transformed || true;'
sh 'mkdir -p data/transformed || true'
sh 's3cmd -c $S3CMD_JSON --acl-public --mime-type=plain/text get -r s3://kg-hub-public-data/transformed/ data/transformed/'
}
}
}
sh '. venv/bin/activate && python3.7 run.py transform'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_nodes_file(self):
'ENSEMBL:ENSP00000232564', 'ENSEMBL:ENSP00000393379',
'ENSEMBL:ENSP00000371253'],
list(node_df.id.unique()))
self.assertCountEqual('UniprotKB:P84085',
self.assertEqual('UniProtKB:P84085',
node_df.loc[node_df['id'] ==
'ENSEMBL:ENSP00000000233'].xrefs.item())

Expand Down

0 comments on commit c670fd9

Please sign in to comment.