-
Notifications
You must be signed in to change notification settings - Fork 183
install flake8 and pytest plugins from apt instead of pip #641
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,18 @@ RUN apt-get update && apt-get install -q -y --no-install-recommends \ | |
| gnupg2 \ | ||
| libssl-dev \ | ||
| lsb-release \ | ||
| python3-flake8 \ | ||
| python3-flake8-blind-except \ | ||
| python3-flake8-builtins \ | ||
| python3-flake8-class-newline \ | ||
| python3-flake8-comprehensions \ | ||
| python3-flake8-deprecated \ | ||
| python3-flake8-docstrings \ | ||
| python3-flake8-import-order \ | ||
| python3-flake8-quotes \ | ||
| python3-pip \ | ||
| python3-pytest-repeat \ | ||
| python3-pytest-rerunfailures \ | ||
| wget \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
|
|
@@ -46,18 +57,7 @@ ENV ROSDISTRO_INDEX_URL https://raw.githubusercontent.com/osrf/docker_images/mas | |
|
|
||
| # install python packages | ||
| RUN pip3 install -U \ | ||
| argcomplete \ | ||
| flake8 \ | ||
| flake8-blind-except \ | ||
| flake8-builtins \ | ||
| flake8-class-newline \ | ||
| flake8-comprehensions \ | ||
| flake8-deprecated \ | ||
| flake8-docstrings \ | ||
| flake8-import-order \ | ||
| flake8-quotes \ | ||
| pytest-repeat \ | ||
| pytest-rerunfailures | ||
| argcomplete | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there still a reason that argcomplete is soloed out? Looks like its also available upstream: I couldn't find what the build farm does for this, given argcomplete probably isn't used by the buildfarm.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For a long time the version of argcomplete was too low for several ros2cli and/or colcon features. On the other hand if the list of pip packages to install is empty the template will stop installing pip or setuptools altogether that may have side effects so I'd rather not do this here and solely fix the flake8 issue in this PR
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good. |
||
| # This is a workaround for pytest not found causing builds to fail | ||
| # Following RUN statements tests for regression of https://github.com/ros2/ros2/issues/722 | ||
| RUN pip3 freeze | grep pytest \ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
@mikaelarguedas , @ruffsl Sorry to jump out of nowhere here. But few doubts about the linter
flake8-quotes. For the moment I will drop it here in case someone else out there is looking into this as well, soon will open a discussion in the forumsThanks in advance and sorry for the annoyance!
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.
Hi @nachovizzo,
This is not something that is decided on the docker images maintaining side.
This is part of the ROS 2 styleguide: https://docs.ros.org/en/humble/The-ROS2-Project/Contributing/Code-Style-Language-Versions.html?highlight=style%20guide#id4 specifically this line:
"We pick single quotes over double quotes as long as no escaping is necessary."
I think the topic came up a couple times, I remember a thread on discourse a while back to compatible with other linters e.g. black https://discourse.ros.org/t/python-black-formatting/13277
Not sur if this is a satisfactory answer but that's a start :)
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.
@mikaelarguedas 🙌 Thanks! This is what I was missing , this entry point. Thanks a lot