JetBrains-Research / snakecharm

Plugin for PyCharm / IntelliJ IDEA Platform IDEs which adds support for Snakemake language.
MIT License
61 stars 7 forks source link

Unresolved reference 'snakemake' #511

Open iquasere opened 8 months ago

iquasere commented 8 months ago

I never got, on my MacBook Pro M2, snakemake recognized. Is this working as designed? The pipeline runs fine.

image

SnakeCharm version: 2023.2.1

iromeo commented 6 months ago

Hi, as a workaround, you could add manually import snakemake line, it will not affect pipeline, but will help with static code analysis. Snakemake executes a snakemake file in a special environment, where some objects are inserted dynamically, so snakemake module will be available on runtime, but SnakeCharm codeInsight engine doesn't emulates this at the moment.

iromeo commented 5 months ago

@iquasere Is it .smk or Snakefile or just some .py file with wrapper impl?

iquasere commented 5 months ago

Thank you for the answer, @iromeo !

This is happening only for the .py scripts, although the .smk files have another problem, where it doesn't recognize stuff coming from the common.smk script.

image

Still, the most annoying is in the *.py files.

Hi, as a workaround, you could add manually import snakemake line

This turned all the errors into warnings, which is better. I guess it wouldn't make sense to have a params attribute in snakemake's __init__

image