Closed GKresearch closed 10 months ago
Hey @GKresearch!
Congrats on your first ever PR as a contributor and congrats to me on my first ever "3rd party" slendr PR! :D
Thanks for this!
As I said, I'm a bit swamped right now but will do my best to poke into this maybe next week. What you wrote elsewhere seemed to indicate that you got things working on Windows to a +/- desirable state for you, so hopefully this won't be a hold up for you to move further with your work.
Once I make progress, you will get a ping from this PR. I do think that in addition to running the GitHub Actions testing pipeline on Windows (done on GitHub's servers), it will be useful to run things on a normal Windows computer. So this is one favor I'd ask from you at a later point.
Actually, on a related note -- @GKresearch can I ask how does one run and install SLiM on Windows?
On unix GitHub Actions servers I do this. But in order to plug the result of this PR into their Windows servers, I'll need a way to:
a) install SLiM in an automated way, b) run it from the command line.
I suspect b) is one of the things that your updates deals with.
Hi @bodkan,
I'm happy to run tests if needed on my computer.
You are correct that it my fix is only for b) as far as I am aware. As mentioned briefly, I used conda to download SLiM through the conda-forge channel. The other ways to install SLiM on Windows that I am aware of are the ones mentioned in the SLiM manual which is just to either build from source or through the MSYS installer. I think the easiest way of making an automated SLiM installation is to add the conda-forge channel to you setup_env() command and install SLiM through conda.
Ah, I didn't notice that you mentioned previously that you installed SLiM through conda, sorry about that.
I'm personally not a big conda fan for various socio-technical reasons (I use it inside setup_env()
only as an easy way to get the same compiled Python binary across operating systems)... and I'm hesitant to include this inside setup_env()
because that would make me responsible for debugging related user issues with conda itself (unfortunately there's already quite a lot of this even in the current simple situation)... BUT, you raise an excellent point:
I can install conda and then SLiM really easily on GitHub's Windows servers in an automated way, and then simply pick up the path to the SLiM binary installed in this way. That's a great idea. I seem to remember that slendr's slim()
function has a binary =
argument to set the path manually, if needed.
Thanks so much! It's so nice to have someone to talk through this together. :)
I'll be in touch.
Yeah, I used the slim_path argument myself when running this command since I had trouble adding the slim binary to $PATH.
Hey, sorry for the massive delay with this. Somewhat surprisingly, the spatial SLiM-related slendr features have been less of a focus in the group recently, so I found it hard to dedicate time to this. That said, an important (but long dormant) spatially-explicit project of mine has been raised from the dead, so I hope to finally polish the changes in this PR and merge them into the main slendr branch before the end of the year! I have a student here who is a Windows user, so I will finally have some hands-on opportunity for testing things.
Thanks for your patience! I'll post updates here as they come up.
The work is being continued in #149.
Hi Martin,
Here is my edit to try and get the slim command working in Windows. The primary changes are with the slim command line request with specific changes to the pathing. I hope this pull request works appropriately, let me know if there are any issues.
Couple of notes: I'm on a Windows 11 machine. My slim is held in a conda environment and was downloaded through conda-forge. I call the slim path directly with the "slim_path" option in your slim() R command. I used you setup_env() to get access to the necessary python modules. Other than that, these changes were sufficient to allow me to work through the tutorial that you have on the slendr website. I mention this briefly in notes in the code itself, but I did not test anything regarding the slim gui, this was command line only.
Sincerely, GK