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
Zero to dev #1387
Zero to dev #1387
Conversation
Looks cool! Unfortunately, I just realized that the remote development extension is not compatible with VS Codium (which I recently started using)... Apart from the non-free issue, I wonder whether explaining users how to install VS Code, the remote developing extension, and Docker, won't be more difficult than explaining how to set up a development environment in the "usual" way 😬 |
Thanks :) Ah pity about VS Codium (although I guess support might come later). As for setting up, I'd see it more of an alternative rather than a replacement for now. If someone has VS Code (quite likely) and Docker already installed, then cloning the repository will result in a pop-up offering to reopen the project in a container - one click and they're good to go. If they don't already have them and want to try this method, there are links to the VS Code (+ extension) and Docker installation instructions in the README which are pretty clear and easy to follow. Maybe just let several methods co-exist and see which naturally has the most uptake after a while? |
No, sure, I wasn't suggesting to not include it (even though I'd like to test it first ;-) ). For the pop-up to appear, what exactly do you need? Only VS Code would be great (if it tells you then to install the rest), but IIUC it is VS Code + Remote extension + Docker, right?
I think it's not a technical issue, but rather one of licencing:
|
Ok cool. Well since you don't have VS Code installed currently, you could be a great guinea pig ;) If you install VS Code first then clone the repo (the landing page has an option to "Clone Git Repository...") see if it recognises the |
Hah, that actually went quite smoothly. With a fresh VS Code install, it indeed asked me to install the remote development extensions and then asked to reload the repo. This triggered a request to install docker, which I duly did. This was the only time when it wasn't as smooth as it could be: I had to trigger the "reload in container" command manually after the docker installation. Then, it started building the container (took a bit over 2 mins on my slow-ish machine with fast internet), and finally it asked for another refresh for pylance. And then I can run stuff via the container, pretty cool! |
Glad to hear it went smoothly! :) Yes, plotting needs a bit of thought. I am generally happy to plot to file and view the png within VS Code or a file browser but I appreciate not everyone will be. I think the easiest solution (rather than needing an X server to forward to) might be to install JupyterLab and encourage people to plot within that. |
What do you think? Is it worth including Jupyter in the container or should we just make do with plots written directly to file? |
Sorry about being slow with this, I've been quite busy with other things...
Would this run the jupyter server in the container and the jupyter interface in Visual Code? If yes, and if it does not need much manual configuration for the user, this would be great. If not, and/or if it needs a lot of manual setup, then it won't probably make things much easier for users. But in general, since the main idea for the docker container is to make it easier for developers, I don't think having easy access to plots is that important. |
Yes (at the cost of a little extra bulk and slightly longer build times but not excessive). I've also added |
Hi Marcel, the container has JupyterLab setup now so that you can do interactive plotting in notebooks all within the container, so I think it's ready to merge now. |
I just tried out the jupyter integration, and I could run a notebook directly in the VS Code setup/container. Great! We should probably make the documentation a bit more discoverable? Not sure whether a README in the What I am not 100% sure about for now is the We should also think about testing all this on our CI infrastructure, but maybe let's postpone this for now (would be good to not have this make our default test suite take even longer...). |
Glad it worked! :) Sure, I can point to that README in the developer docs. Should I just put a sentence or two about 'an easy way to get started' in The Yes, we could publish a Docker I'll add those extra dependencies to Might be worth adding this to the testing infrastructure (if possible) since it doesn't take too long but that could wait a bit if preferred. |
I'd be happy with a simple pointer for now. Maybe we can have a full page when we propose a docker image as a more general solution (i.e. not only in the context of VS Code)
For installing the developer dependencies, you can use the
I think I get this in principle: installing matplotlib and jupyter in the container would mean that re-installing Brian after changes in |
Ok I've added a paragraph with some links to the
I've removed all the dependencies that wouldn't be installed with
The image would need to be rebuilt if the new dependency version were not already satisfied but I guess this would be rare enough not to worry about. |
Hey Marcel, are there any other changes you'd like me to make? |
Nope, looks great to me! |
These are the config files to build a development container automatically after pulling the repo and opening it in VS Code, hopefully lowering the barrier to entry.
Please have a go and let me know what you think @thesamovar @mstimberg !