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

Subprojects? #228

Closed
krlmlr opened this issue Feb 4, 2018 · 8 comments
Closed

Subprojects? #228

krlmlr opened this issue Feb 4, 2018 · 8 comments

Comments

@krlmlr
Copy link
Collaborator

krlmlr commented Feb 4, 2018

Document best practices to run drake subprojects in the context of a larger drake project. Need to wait for an actual use case.

@wlandau
Copy link
Member

wlandau commented Feb 7, 2018

The best practices vignette is a good place for our recommendations. The hard part is deciding what subprojects should look like.

@wlandau
Copy link
Member

wlandau commented Feb 14, 2018

@dapperjapper, do you have more to say on this (from #253)?

@krlmlr
Copy link
Collaborator Author

krlmlr commented Feb 18, 2018

My current use case: checking downstream dependencies (revdepchecks). I have a static basic plan which I use to construct the dependency graph (as a named list). The results from processing this plan are used to create the actual plan, but I also need intermediate results from the basic plan as arguments to rules in the generated plan. I have found that using readd() in rules doesn't work for jobs > 1 (with "error reading from connection"), now trying to include the basic plan when processing the actual plan.

I'm happy to contribute a vignette that describes the process.

I think we should keep this use case in mind when designing the DSL (#233). Ideally, we'll be able to express the entire process (generating dependencies and constructing the plan from these dependencies) in a single drake_plan() call (or equivalent).

@wlandau
Copy link
Member

wlandau commented Feb 18, 2018

I see, your plan is changing as it's executing. My current practice in this situation is to chain several make()s together, but this is suboptimal. Right now, I think #233 is the place to work on that aspect of subprojects.

For readd() in workflow plans, are you passing in an existing cache object? Because I think it needs to call get_cache() or something similar, which calls storr::storr_rds() all over again. Maybe I don't totally understand all the details of the use case, but I am also curious as to why you need readd() as opposed to referencing one of the available target names. I would think that loadd() and readd() in commands would spoof the dependency network.

@krlmlr
Copy link
Collaborator Author

krlmlr commented Feb 28, 2018

I wanted to make the two projects independent of each other, but ultimately decided to include the basic plan into the full plan and avoid readd(). This problem seems to require some more thinking and practice.

@wlandau
Copy link
Member

wlandau commented Mar 2, 2018

Should we table this issue until we solve #233? Even if we document subprojects now, the best practices will change after #233.

@krlmlr
Copy link
Collaborator Author

krlmlr commented Mar 2, 2018

Agree to postpone this.

@wlandau
Copy link
Member

wlandau commented Mar 2, 2018

Sounds good.

@wlandau wlandau closed this as completed Mar 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants