Skip to content
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

Update yamllint to be installed using pip #1657

Closed
6 tasks done
yvele opened this issue Sep 24, 2020 · 8 comments
Closed
6 tasks done

Update yamllint to be installed using pip #1657

yvele opened this issue Sep 24, 2020 · 8 comments
Assignees

Comments

@yvele
Copy link

yvele commented Sep 24, 2020

Tool information

  • Tool name: yamllint
  • Tool license: GNU General Public License v3.0
  • Add or update? Update
  • Desired version: Latest
  • Approximate size:

Area for Triage:

Testing and code coverage

Question, Bug, or Feature?:

yamllint #1142 actually is installed using system packages see #1319 (Ubuntu) and #1320 (Windows).

But this doesn't give us the latest stable version of yamllint and is quite outdated.

We talked about that issue with the yamllint team and they suggested to use pip for the installation:

@adrienverge

I'm for using pip: even if someone dedicates time to actively maintain the deb package, it will always be late compared to the PyPi version (which is pushed a few seconds after a release is created).

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Ubuntu 20.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

Can this tool be installed during the build?

pip install yamllint

Tool installation time in runtime

run in 23s on ubuntu-latest

Are you willing to submit a PR?

Yes (but I don't master Windows Server at all...)

@adrienverge
Copy link

For information, and to support this request: the current version installed (.deb) is not actively maintained, and is 19 releases behind the official pip one.

@maxim-lobanov
Copy link
Contributor

@yvele , @adrienverge , thank you for raising this point.

Honestly, we are trying not install tools through pip because it often installs additional dependencies or can stop work properly after switching python using actions/setup-python.
(P.S: We are not Python experts so could be wrong but previously we had similar issues)

I think we can consider using pipx to install CLI tools like yamllint

@yvele
Copy link
Author

yvele commented Sep 24, 2020

I'm not a python expert, @adrienverge do you think pipx will do the job?

@adrienverge
Copy link

I don't know pipx much, but I wouldn't recommend using it. Pip is standard, solid and tested for decades, and if an isolated environment is needed (@maxim-lobanov is it why you propose pipx?) I recommend using a virtualenv (which is a Python standard, like pip).

we are trying not install tools through pip because it often installs additional dependencies

For info, yamllint has only 2 dependencies: pyyaml and pathspec. Hard to do less 😉

@maxim-lobanov
Copy link
Contributor

Hello. @adrienverge @yvele , Ubuntu images with yamlint installed via pip (pipx) was deployed everywhere. Could you please validate that it works as expected for you.
After that we will proceed with the same changes on MacOS / Windows

@yvele
Copy link
Author

yvele commented Oct 28, 2020

I can confirm I have the latest yamllint version 👍 v1.25.0

Thank you @maxim-lobanov

@maxim-lobanov
Copy link
Contributor

Cool, we also changing installation approach on other images for consistency. Will report back when it is done

@nikita-bykov
Copy link
Contributor

Windows and macOS images with yamlint installed via pipx was deployed everywhere also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants