Run pytest github action on a windows VM #1744
-
Our users and contributors on windows are running into environmental issues. See #1742. Should we expand our tox-pytest action to run on a Windows VM in addition to an ubuntu VM? Have we tried this before @zaneselvans? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Once upon a time, I think probably in response to @grgmiller's early eGrid work, we did make an effort to get all this working under Windows, but eventually I gave up. IIRC there were several issues:
|
Beta Was this translation helpful? Give feedback.
-
We have a few people on our team that use Windows and that need to use PUDL. But when I say use PUDL I don't mean to run the ETL, the functionality they use is more limited:
My preference would be to maintain this level of functionality on Windows directly using mamba/pip as we do now. The reason is that we have some team members on Windows that are new to Python, terminals and such and so it's nice to be able to avoid WSL, docker or anything fancy that I will have to support and troubleshoot for this limited use case. For anything more serious, I think WSL and/or docker make sense. Our issues do not justify the effort of getting PUDL fully functional on Windows and adding it to the tox-pytest action to ensure this is the case. If there's a way to very easily create an action that makes sure that PUDL and its dependencies are installable on Windows, that would be nice, but I realize that the fact that some of the dependencies must be installed by conda probably makes this a lot harder. |
Beta Was this translation helpful? Give feedback.
-
I think that if there were clear instructions on how to get WSL set up that would be helpful. I've never used Linux before so it sounds like there might be a bit of a learning curve, but I'm sure there are resources out there. The only potential challenge is we are currently using some of the pudl analysis functions as a dependency for another project we are developing, and for development/debugging, it is really convenient to be able to reference my local version of the pudl code by installing it in my conda environment using a pip install of |
Beta Was this translation helpful? Give feedback.
-
WSL makes it so you don't have to interact with Linux very much if you don't want to. This lets you spread the learning curve out over a long and mostly voluntary timeline. You can access/manage all your files (on both windows and linux) via the regular file explorer. Networking and disk I/O is all passed through so you don't have to configure anything to access local storage or the internet. Because VSCode is a windows product, it integrates nicely with WSL too (not sure if you use VSCode). As long as you're using pip/conda, I don't think there is much different on the python side of things. I think the only things you would have to do in a linux shell are command line things like managing conda or starting the jupyter server. I very rarely run into something OS specific like file permissions. One performance note: transferring data between Linux/Windows via WSL is slower than reading it natively on either OS. This only matters if you have to read a lot of data (like EPA CEMS). But in that case you will probably want to move or copy the data over to the linux side instead of reading it across from Windows. From what I remember, the main startup hurdle is simply remembering what existing code is written for the conda env in linux vs in windows. For me that problem resolved itself over time, because I put all new code on the linux side. But you could be more proactive than I was and deliberately move things over. The official setup docs from Microsoft look good to me. The default install options (WSL2, Ubuntu) are the ones you want. My only additions would be:
|
Beta Was this translation helpful? Give feedback.
WSL makes it so you don't have to interact with Linux very much if you don't want to. This lets you spread the learning curve out over a long and mostly voluntary timeline.
You can access/manage all your files (on both windows and linux) via the regular file explorer. Networking and disk I/O is all passed through so you don't have to configure anything to access local storage or the internet. Because VSCode is a windows product, it integrates nicely with WSL too (not sure if you use VSCode). As long as you're using pip/conda, I don't think there is much different on the python side of things.
I think…