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 run=False description to from_dir #440

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

Zethson
Copy link
Member

@Zethson Zethson commented Oct 2, 2024

We could also add it to all other from_X methods?

Fixes #439

@Zethson Zethson marked this pull request as ready for review October 2, 2024 11:32
@falexwolf
Copy link
Member

Yes.

Just: I dislike the length of the explanation given it holds true for every constructor, in particular for ln.Artifact(..., run: bool | None = False).

So, I think we should have proper documentation across the board and re-use the docstring via {} aka @doc_args; this will be messy and inconsistent otherwise.

@falexwolf
Copy link
Member

Re the content:

Set to False to not associate the :class:~lamindb.Artifact as :attr:ln.Run.output_artifacts. This is useful if you want to register them as :attr:ln.Run.input_artifacts instead.

The thing is that this is only really relevant if ln.track() was called; otherwise run=False merely suppresses the warning about a missing ln.track() statement.

So, we should somehow add this piece of information.

After this refactor here in your nextflow PR (laminlabs/nextflow-lamin@f447359), you'd be no longer strictly required to pass run=False to avoid lineage cycles because ln.context.run is None anyway. It's still good though to have it as you'd get said warning otherwise.

@falexwolf falexwolf marked this pull request as draft October 2, 2024 11:50
Signed-off-by: zethson <[email protected]>
Signed-off-by: zethson <[email protected]>
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.

Document from_dir(run=False)
2 participants