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
Add basic VS Code dev container config #4517
base: maintenance
Are you sure you want to change the base?
Conversation
9d599f8
to
aa41215
Compare
Docker on Windows has just really annoyed me, but... The pre-commit install seemed to fail:
And the contents of version information
error information
OctoPrint works, it is slow but I think it's being limited in resources (and the random background CPU of 10% by Docker Desktop 😠 doesn't help). |
Haven't yet had a chance to check, but one thing - I think this should rather go into |
No worries. Retargeted. |
Yes, otherwise any changes that already made it into Also can confirm, after just setting up Docker again on this system (new PC, still finding missing bits and pieces, virtualization was even still disabled and so I just got best friends with the bios again XD) I run into the same issue that @cp2004 encountered. Permission error when version information
error information
I could imagine this is due to this checkout already being set-up in the local environment? So I did a quick check-out of a fresh copy and tried it again, and yep, that's it. So that needs some kind of handling. Also, I think it would make more sense to not start OctoPrint right away but rather ship a ready made launch config so that debugging is easily possible? TODOs/To-Figure-Outs I see here:
|
Excellent, I borked my Windows system so just restoring it and well try and reproduce, but that should be a fairly easy case to fix |
Hahah, I've actually already got the majority of this in another branch. I separated it though as I didn't know how prescriptive you wanted the base container config to be. I'll look at bringing them in once I've found a a nice solution to the |
Sorry, I won't have a chance to test probably until the weekend again. If I do, I'll let you know but it's not looking likely I'll get the chance to work on any OctoPrint related stuff properly for this week. |
"settings": { | ||
"python.defaultInterpreterPath": "/usr/local/bin/python", | ||
"python.formatting.provider": "black", | ||
"python.formatting.blackArgs": ["--config", "black.toml"], |
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.
With the merger of #4511, this is no longer needed.
"python.formatting.blackArgs": ["--config", "black.toml"], |
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", | ||
"python.formatting.blackPath": "/usr/local/py-utils/bin/black", | ||
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", | ||
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit", | ||
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", | ||
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", | ||
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", | ||
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", | ||
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", |
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.
The downside of relying on the ones that came with the container is that there is no control over which versions it uses. Especially with black, mypy & pylint; a single version difference may change behavior quite a bit.
I would applaud/recommend pin/controlling QA tools on a project level; and installing and using them locally.
Took the liberty to convert this to draft/WIP since you are still adding to it. |
Have some spare time today to do some experimenting with this... It seems that the permission errors are because the git checkout (& associated files) are done as
In the I got rid of this line, so it would log in as and run everything as root, and it worked (with adding |
to a large audience (ideally all users of OctoPrint)
made sure your changes don't interfere with current development by
talking it through with the maintainers, e.g. through a
Brainstorming ticket
new feature, or maintenance if it's a bug fix or improvement of
existing functionality for the current stable version (no PRs
against master or anything else please)
(no PRs from your version of master, maintenance or devel please),
e.g. dev/my_new_feature or fix/my_bugfix
no dead code, ideally only one commit - rebase and squash your PR
if necessary!
.less source files, not the .css files (those are generated with
lessc)
have added unit tests
nothing broke
What does this PR do and why is it necessary?
Adds initial VS Code config for dev container environment and launch/task config.
Allows contributors to quickly spin up a clean environment for development on both OctoPrint and plugins
How was it tested? How can it be tested by the reviewer?
Any background context you want to provide?
What are the relevant tickets if any?
Screenshots (if appropriate)
Further notes