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

Methods from another *.smk files highlighted as unresolved #364

Open
iromeo opened this issue May 18, 2021 · 2 comments
Open

Methods from another *.smk files highlighted as unresolved #364

iromeo opened this issue May 18, 2021 · 2 comments

Comments

@iromeo
Copy link
Contributor

iromeo commented May 18, 2021

Make accessible methods defined in the *.smk files. On runtime everything will be merged to the same file

E.g.

# rules/common.smk
def foo():
 pass

# rules/foo.smk
 a = foo() # <- here complete/resolve `foo`

E.g see https://github.com/snakemake-workflows/dna-seq-gatk-variant-calling, mapping.smk

Method get_trimmed_reads marked as unresolved, although is defined in common.smk

image

@iromeo
Copy link
Contributor Author

iromeo commented Oct 23, 2024

Also make the same for other top-level elements, e.g. variables. Let's take all data from all files as first implementation. It will not show error, when rule uses not yet declared feature, but less paint point for users.

@iromeo
Copy link
Contributor Author

iromeo commented Oct 24, 2024

See

  • PyResolveUtil.addImplicitResolveResults() - get candidates from index (e.g functions), collects imports in current file &
  • ResolveImportUtil.getPathCache(foothold); and QualifiedNameFinder.findImportableQNames
  • PyQualifiedReference.resolveInner()

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

1 participant