Skip to content

Commit 50f8825

Browse files
committed
Make path to pipline code an importable parameter
1 parent f6d237e commit 50f8825

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

countpipe.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
from marshmallow import fields, pre_dump, pre_load
1616
from pprint import pprint
1717

18-
sys.path.insert(0, '/home/david/wprdc-etl') # A path that we need to import code from
18+
from parameters.local_parameters import PATH_TO_PIPELINE
19+
sys.path.insert(0, PATH_TO_PIPELINE)
1920
import pipeline as pl # This comes from the wprdc-etl repository.
2021

2122
from notify import send_to_slack

leasepipe.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
from marshmallow import fields, pre_dump, pre_load
1616
from pprint import pprint
1717

18-
sys.path.insert(0, '/home/david/wprdc-etl') # A path that we need to import code from
18+
from parameters.local_parameters import PATH_TO_PIPELINE
19+
sys.path.insert(0, PATH_TO_PIPELINE)
1920
import pipeline as pl # This comes from the wprdc-etl repository.
2021

2122
from notify import send_to_slack

pipe/pipe_to_CKAN_resource.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77

88
from datetime import datetime
99

10-
sys.path.insert(0, '/home/david/wprdc-etl') # A path that we need to import code from
11-
import pipeline as pl
10+
from parameters.local_parameters import PATH_TO_PIPELINE
11+
sys.path.insert(0, PATH_TO_PIPELINE)
12+
import pipeline as pl # This comes from the wprdc-etl repository.
1213

1314
from marshmallow import fields, post_load, pre_load
1415
from collections import OrderedDict, defaultdict

pipelines.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
import datetime
1515
from marshmallow import fields, pre_dump, pre_load
1616

17-
sys.path.insert(0, '/home/david/wprdc-etl') # A path that we need to import code from
17+
from parameters.local_parameters import PATH_TO_PIPELINE
18+
sys.path.insert(0, PATH_TO_PIPELINE)
1819
import pipeline as pl # This comes from the wprdc-etl repository.
1920

2021
from fetch_terminals import pull_terminals, csv_file_path

reupload.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
from collections import OrderedDict, defaultdict
1717
from pprint import pprint
1818

19-
sys.path.insert(0, '/home/david/wprdc-etl') # A path that we need to import code from
20-
import pipeline as pl
21-
19+
from parameters.local_parameters import PATH_TO_PIPELINE
20+
sys.path.insert(0, PATH_TO_PIPELINE)
21+
import pipeline as pl # This comes from the wprdc-etl repository.
2222

2323
class SplitTransactionsSchemaUp(BaseTransactionsSchema):
2424
"""The split transactions schema handles the case where transactions are to be split between

upload_meter_archive.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
from parameters.local_parameters import SETTINGS_FILE, base_monthly_meters_archive
1313

14-
sys.path.insert(0, '/home/david/wprdc-etl') # A path that we need to import code from
14+
from parameters.local_parameters import PATH_TO_PIPELINE
15+
sys.path.insert(0, PATH_TO_PIPELINE)
1516
import pipeline as pl # This comes from the wprdc-etl repository.
1617

1718
server = "meters-etl"

0 commit comments

Comments
 (0)