Skip to content
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

add python_paths option to config #43

Merged
merged 4 commits into from
Jul 1, 2020
Merged

add python_paths option to config #43

merged 4 commits into from
Jul 1, 2020

Conversation

joezuntz
Copy link
Collaborator

Add feature to temporarily add extra paths to sys.path during pipeline execution, and then remove them afterwards.

Address #42

@codecov
Copy link

codecov bot commented Jun 24, 2020

Codecov Report

Merging #43 into master will increase coverage by 0.32%.
The diff coverage is 95.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #43      +/-   ##
==========================================
+ Coverage   83.91%   84.24%   +0.32%     
==========================================
  Files           9       10       +1     
  Lines        1082     1111      +29     
==========================================
+ Hits          908      936      +28     
- Misses        174      175       +1     
Impacted Files Coverage Δ
ceci/main.py 88.37% <90.47%> (-0.38%) ⬇️
ceci/utils.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3148b71...67592ba. Read the comment docs.

@@ -123,39 +122,54 @@ def run(pipeline_config_filename, extra_config=None, dry_run=False):
else:
raise ValueError("Unknown pipeline launcher {launcher_name}")

# Run the pre-script. Since it's an error for this to fail (because
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost all of this is just an indentation change, to put the main block inside the with statement.

Copy link
Member

@EiffL EiffL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been looking at this for a while today, sorry it took long. So my hesitation with approving is adding paths at the pipeline level. If I read correctly that's what is happening at the pipeline runner stage.

Allowing for custom paths is good, but should typically be done at the stage level rather than the pipeline level. For instance if you have a pipeline runner that farms out tasks to several nodes, it should be at the stage level that we should make sure the paths are correctly set.

So, I'm gonna go ahead and approve it, and open an issue for later to move the PATH definition at the stage level. Unless it's easy do that as part this PR ^^'

@joezuntz
Copy link
Collaborator Author

joezuntz commented Jul 1, 2020

Thanks - this is useful! I think there are cases for doing this at both levels.

At the pipeline level you may want to import pipeline stages from packages in multiple directories to include in the pipeline. This case came up for FlexZPipe.

I agree it also worth thinking about passing these to stage level too - will have a think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants