Skip to content

Commit

Permalink
Merge pull request #176 from Knowledge-Graph-Hub/rename_load_command
Browse files Browse the repository at this point in the history
Rename load command to merge
  • Loading branch information
deepakunni3 committed May 25, 2020
2 parents 9468a90 + 7b057e2 commit 0e6714f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ pipeline {
}
}

stage('Load') {
stage('Merge') {
steps {
dir('./gitrepo') {
sh '. venv/bin/activate && python3.7 run.py load'
sh '. venv/bin/activate && python3.7 run.py merge'
sh 'pigz merged-kg.tar'
}
}
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ How do I use this package?
python run.py download
python run.py transform
python run.py load
python run.py merge
Tests Coverage
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from kg_covid_19 import download as kg_download
from kg_covid_19 import transform as kg_transform
from kg_covid_19.edges import make_edges
from kg_covid_19.load_utils.merge_kg import load_and_merge
from kg_covid_19.merge_utils.merge_kg import load_and_merge
from kg_covid_19.query import QUERIES, run_query
from kg_covid_19.transform import DATA_SOURCES

Expand Down Expand Up @@ -69,7 +69,7 @@ def transform(*args, **kwargs) -> None:

@cli.command()
@click.option('yaml', '-y', default="merge.yaml", type=click.Path(exists=True))
def load(yaml: str) -> None:
def merge(yaml: str) -> None:
"""Use KGX to load subgraphs to create a merged graph.
Args:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from click.testing import CliRunner
from unittest import mock

from run import download, transform, load, edges, query
from run import download, transform, merge, edges, query


class TestRun(TestCase):
Expand All @@ -25,7 +25,7 @@ def test_transform(self):
def test_merge_missing_file_error(self):
with self.assertRaises(FileNotFoundError) as context:
result = self.runner.invoke(catch_exceptions=False,
cli=load,
cli=merge,
args=['-y',
'tests/resources/merge_MISSING_FILE.yaml']
)
Expand Down

0 comments on commit 0e6714f

Please sign in to comment.