-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Features/#59 move resource management to importlib resources #119
base: dev
Are you sure you want to change the base?
Changes from 1 commit
6dc6872
cc48272
94aa973
213ba84
5b67185
c818704
3e98797
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,16 +12,25 @@ | |
import egon.data.processing.openstreetmap as process_osm | ||
import egon.data.importing.zensus as import_zs | ||
|
||
from importlib_resources import files | ||
|
||
# Prepare connection to db for operators | ||
airflow_db_connection() | ||
|
||
print('*-*-*-*-*-*') | ||
print(os.path.abspath(os.path.join(os.path.dirname( | ||
__file__ ), '..', '..', 'processing', 'vg250'))) | ||
print(files('egon.data.processing').joinpath('vg250')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since you removed those changes in a later commit, I think you committed them by accident and know that such debug statements usually shouldn't be part of published commits. But now that I see how you used those statements, let me point out, that you could also have tried them out in an interactive console session, obviating the need to write them into a file in the first place. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. |
||
|
||
with airflow.DAG( | ||
"egon-data-processing-pipeline", | ||
description="The eGo^N data processing DAG.", | ||
default_args={"start_date": days_ago(1)}, | ||
template_searchpath=[ | ||
os.path.abspath(os.path.join(os.path.dirname( | ||
__file__ ), '..', '..', 'processing', 'vg250')) | ||
#os.path.abspath(os.path.join(os.path.dirname( | ||
# __file__ ), '..', '..', 'processing', 'vg250')) | ||
files('egon.data.processing').joinpath('vg250') | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think |
||
], | ||
is_paused_upon_creation=False, | ||
schedule_interval=None, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a third party library import. According to "CONTRIBUTING.rst" this should be placed in a section between builtin imports and package local imports. But I see that others messed up the import order before you already.
Also, the
importlib-resources
package should be added to the depen dencies in "setup.py".There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! thanks.