-
-
Notifications
You must be signed in to change notification settings - Fork 936
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
chore: add VS Code dev container #2132
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2132 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 55 55
Lines 5553 5553
Branches 880 880
=========================================
Hits 5553 5553 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
I've tried using podman on wsl fedora and everything seems to work but I've had to uncomment This is probably a potman thing only since I think it will not run containers as root contrary to docker. I think we could keep as is. @vytas7 thoughts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As suggested in the issue a couple of lines could be added in the contributing file
looking ok otherwise
dd07103
to
a0752f1
Compare
@CaselIT Thanks for testing! I added some documentation as requested. If you think it's too detailed / wordy, I'm happy to adjust it. |
(It seems that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand, this needs to be enabled manually by the developer, so it shouldn't cause any problems for other VS Code users. So if it can potentially lower the barrier to contribution, why not? 🎉
Yeah, they'll be asked when they open the project in VS Code if they want to reopen it in a Dev Container, but they can just click no. |
Aha, OK, I didn't know that VSCode would ask that question automatically. But let's give it a try, we can always disable this if we get more negative than positive feedback. |
It's just a notification, you can just ignore it too, so it should be fine |
I see; I've just tested it myself for the heck of it, and it should be fine 💯 Let's see if anyone complains 😈 |
Summary of Changes
This adds the required config for VS Code Dev Container support. With this change, opening the repo in VS Code will prompt you to reload the editor and, assuming you have Docker up and running, it will pull the required Docker image and start it. Expect it to download a 1.4GB image. Once the container is running, it will install a bunch of dependencies, including
tox
. It will show you the log as it progresses, but, at the end of the process, VS Code will run in this container in headless mode and you can open a separate terminal in which you can run thetox
command which should complete successfully.I haven't spotted any specific section related to the code editor in the Readme / Contributing docs, so not sure if you'd like to have a paragraph about this feature, or at least mention somewhere that people will want to use VS Code if they wish to leverage this Dev Container setup for their work / tests.
Related Issues
Fixes #1979.
Pull Request Checklist
This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once; it will save you a few review cycles!
If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.
docs/
.docs/
.versionadded
,versionchanged
, ordeprecated
directives.docs/_newsfragments/
, with the file name format{issue_number}.{fragment_type}.rst
. (Runtowncrier --draft
to ensure it renders correctly.)If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!
PR template inspired by the attrs project.