Trouble getting pyright to see firedrake inside container #4109
Unanswered
abhijit-c
asked this question in
Firedrake support
Replies: 1 comment 1 reply
-
We have recently modified the locations and default user for the docker containers so things may change for you on an update. To fix I can only suggest making sure that your editor is configured using the right Python/venv. It's also possible that editable installs are problematic. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all,
I've been looking to move some of my FEM based research onto firedrake, and have been really enjoying the package. It's fantastic work. With that being said, I usually develop through the conda package manager, so I must admit I'm a little out of my element trying to get development on firedrake working inside a docker container.
So I installed docker and the associated firedrake container, started and entered the container, started the venv, made sure all the tests pass (they did), and was generally able to run code without any issues. However, inside my editor environments, whether vscode outside the container using the built-in container workflow, or running vim inside the container with pyright enabled, my LSP cannot seem to see the firedrake package. It's able to see other packages, like numpy or the tlm-adjoint package that I installed otherwise, but specifically not the main firedrake package.
With that being said, through an ipython console (and, by extension a notebook I imagine) I am able to get completions and documentation.
Attached is an image with the error messages I see. The associated code is
To clarify, this runs perfectly fine. I just can't get in-editor completions / documentation. Not the end of the world, naturally, this was just very nice to have. Has anyone seen an issue like this before or can offer an idea on how to fix it? Or, perhaps, I'm doing docker development entirely wrong and there's a better way to go about this? I appreciate any suggestions.
Beta Was this translation helpful? Give feedback.
All reactions