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

Workflow and packaging improvements #4116

Merged
merged 13 commits into from
Feb 28, 2021
Merged

Workflow and packaging improvements #4116

merged 13 commits into from
Feb 28, 2021

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Feb 21, 2021

Steps

  • Add yourself to CONTRIBUTORS if you are a new contributor.
  • Add a ChangeLog entry describing what your PR does.
  • If it's a new feature or an important bug fix, add a What's New entry in doc/whatsnew/<current release.rst>.
  • Write a good description on what the PR does.

Description

Replaces: #4111
It started with just some CI improvements, but got a bit bigger in the end.

Since almost all changes are workflow related it should be possible to later include the MR in the 2.7.1 release.

Changes

  • CI: Improve usage of pinned astroid version
  • CI: Add caching for Windows job (whole suite now takes 4:30 - 5:00, instead of 7:00min)
  • Fixed some tests that occurred during the Windows CI run
  • CI: Use specific versions for Github Actions
  • Update requirements
    • Pin all test requirements to current versions
    • Rename requirements _test_pypy.txt to requirements_test_min.txt
    • Moved some dependencies from min to test
    • Updated coverage dependency to ==5.4.0, instead of <5.0
    • Use pytest-cov as wrapper for coverage
    • Pin docs requirements to current versions
  • Add dependabot config. The bot will open MRs once dependency updates are available
  • Update mypy pre-commit hook
  • Update tox config to use requirements files
  • Update metadata license to use the correct SPDX tag: GPL-2.0-or-later
  • Update readme badges

Important!
I've configured dependabot to add the dependency label to each MR it opens. This label needs to be created for it to work properly.

Type of Changes

Type
🐛 Bug fix
✨ New feature
🔨 Refactoring
📜 Docs

Related Issue

@cdce8p cdce8p mentioned this pull request Feb 21, 2021
4 tasks
@coveralls
Copy link

coveralls commented Feb 21, 2021

Coverage Status

Coverage increased (+0.06%) to 91.51% when pulling 2711cda on cdce8p:improve-ci into 8cbcf87 on PyCQA:master.

@cdce8p
Copy link
Member Author

cdce8p commented Feb 21, 2021

We should probably also update the Testing and Contributing docs at some point 🤔

@cdce8p
Copy link
Member Author

cdce8p commented Feb 22, 2021

@Pierre-Sassoulas I noticed an issue with pinning the astroid dependency. Pip now complains when if I want to install the latest astroid master commit in my dev environment. That's because 2.5.0 is incompatible with the version in the astroid master branch 2.5-dev (shouldn't that be 2.6-dev anyway?).

https://github.com/PyCQA/astroid/blob/5192907ff22fc0383206c0e5bbe3e1635d6c7132/astroid/__pkginfo__.py#L27

I see two solutions here:

  1. Leave the astroid version at 2.5 until the next release
  2. OR change pylint install_requires to something like astroid>= 2.5 after a release and then back to a specific version for a new one. Here the astroid version would need to be set to 2.6-dev.

Option 2 might be the better one IMO. For testing it should be enough to loosen the requirement in the master branch. Updating the release branches (2.7, ...) can happen once a new version of astroid is released. What is your opinion?

--
cc: @hippo91

@Pierre-Sassoulas
Copy link
Member

I think we disabled the benchmark tests in Github Actions at some point, and we should launch them at least once, I'll create an issue.

@Pierre-Sassoulas
Copy link
Member

#4119

@cdce8p
Copy link
Member Author

cdce8p commented Feb 22, 2021

I think we disabled the benchmark tests in Github Actions at some point, and we should launch them at least once, I'll create an issue.

I haven't added them since they did not run before either. Just pushed a commit to include them. I'll check what's causing the issue later. Interestingly tox -e benchmark runs without issues on my machine.

@hippo91
Copy link
Contributor

hippo91 commented Feb 22, 2021

@cdce8p @Pierre-Sassoulas may i change the astroid master version to 2.6-dev?
@cdce8p i just saw your PR in astroid.

@Pierre-Sassoulas
Copy link
Member

I'll check what's causing the issue later. Interestingly tox -e benchmark runs without issues on my machine.

It's a problem with astroid 2.5.0 see #4119 (comment)

Astroid 2.4.2 is sufficient for pylint to pass all pylint tests in python 3.8, I guess 3.9 is another matter. I did not have time to bisect the bug in astroid yet.

@cdce8p
Copy link
Member Author

cdce8p commented Feb 22, 2021

I'll check what's causing the issue later. Interestingly tox -e benchmark runs without issues on my machine.

It's a problem with astroid 2.5.0 see #4119 (comment)

I though so, but tox was using astroid==2.5.0 and I also ran it just with pytest and astroid==2.6.0-dev and it worked fine. A bit strange since I would have though Linux and MacOS would behave similarly.

Anyway, I've removed the benchmark job for now. Will open a new one MR, once the issue is fixed.
It wouldn't make sense to hold this one just because of it, I think.

@cdce8p
Copy link
Member Author

cdce8p commented Feb 23, 2021

Rebase to catch up with current master (which added the benchmark CI job).

ChangeLog Outdated Show resolved Hide resolved
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I like the use of requirement file in tox in particular. I might have missed something as this is hard to review. I'll wait for other reviewers to check as well because continuous integration tests are really important.

@cdce8p cdce8p mentioned this pull request Feb 28, 2021
4 tasks
@Pierre-Sassoulas Pierre-Sassoulas merged commit 64a25b9 into pylint-dev:master Feb 28, 2021
@cdce8p cdce8p deleted the improve-ci branch February 28, 2021 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants