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

Wip - Puts issue #4118 under test - test min similarities #4179

Closed

Conversation

doublethefish
Copy link
Contributor

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

Puts issue #4118 under test …
1b477cd
Taken in isolation, this commit may appear heavy-weight. The intent here
is to have a linter run and retain all state information about that run
so we can inspect what happened.

What this commit shows is that the checkers the linter knows about have
the right config, but still multi-job [MJ] runs are incorrect.
see: assert checker.config.min_similarity_lines == min_similarity_lines

I think the MJ failiures are because SimilarChecker.reduce_map_data()
constructs a new SimilarChecker and then the linter doesn't call
set_option().

The process by which the set_option() calls are made in the normal run
is opaque to me, but perhaps someone else has a better idea(?).

Type of Changes

Type
🐛 Bug fix
✨ New feature
🔨 Refactoring
📜 Docs

Related Issue

@doublethefish doublethefish force-pushed the wip/test_min-similarities branch 2 times, most recently from 9ce0ef2 to 98d4037 Compare March 3, 2021 14:09
@coveralls
Copy link

coveralls commented Mar 3, 2021

Coverage Status

Coverage remained the same at 91.435% when pulling 49d6750 on doublethefish:wip/test_min-similarities into 394060e on PyCQA:master.

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.

Thank you for working on this one, you're really starting to feel like the multi-processing expert around here 😄

tests/checkers/unittest_similar.py Outdated Show resolved Hide resolved
@shvenkat
Copy link
Contributor

shvenkat commented Mar 4, 2021

Just saw this... I came across the same issue, and proposed a fix in #4178.

@doublethefish
Copy link
Contributor Author

Just saw this... I came across the same issue, and proposed a fix in #4178.

Thank you so much for highlighting that, I had completely missed the PR. Legend. :)

@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 2.7.3, 2.7.4 Mar 7, 2021
Taken in isolation, this commit may appear heavy-weight. The intent here
is to have a linter run and retain all state information about that run
so we can inspect what happened.

What this commit shows is that the checkers the linter knows about have
the right config, but still multi-job [MJ] runs are incorrect.
    see: assert checker.config.min_similarity_lines == min_similarity_lines

I think the MJ failiures are because SimilarChecker.reduce_map_data()
constructs a new SimilarChecker and then the linter doesn't call
set_option().

The process by which the set_option() calls are made in the normal run
is opaque to me, but perhaps someone else has a better idea(?).
@doublethefish
Copy link
Contributor Author

I am happy for these tests to go in now. Thoughts?

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.

Nice tests, they will definitely help with multi-processing issues.



@pytest.mark.xfail
@pytest.mark.parametrize("min_similarity_lines", [0, 1, 4, 1000])
Copy link
Member

Choose a reason for hiding this comment

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

👍

Partially tests bug #4118 and #4173"""
config_file = tmp_path / "setup.cfg"

source_streams = [
Copy link
Member

Choose a reason for hiding this comment

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

Could we create a source_streams fixture ? I've seen this part + the check three times :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, if I get time :)

tests/test_config.py Outdated Show resolved Hide resolved
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 2.7.4, 2.7.5 Mar 30, 2021
@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 2.8.0, 2.8.1 Apr 24, 2021
@bentheadset
Copy link

The open bugs only appear to reference py 2.x - I see the same issue on py3.8. Is this expected to fix both, or should i open a new bug?

also, I see this is ! wip and approved - i'm not familiar with pylint release cadence, approximately when would this end up in pypi?

@Pierre-Sassoulas
Copy link
Member

@bentheadset 2.7.0 in the issue is a version of pylint, not python we're only supporting python 3.6 to 3.9 right now. Regarding the MR we'll merge it once the test pass. And it's going to be in the next release of pylint, we don't have a set schedule for that.

@Pierre-Sassoulas
Copy link
Member

@doublethefish should we close this MR in favor of #4175 ?

@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.10.0 milestone Jul 28, 2021
@Pierre-Sassoulas
Copy link
Member

I'm closing in order to cleanup the PR lists please do not hesitate to reopen a new one if necessary.

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

Successfully merging this pull request may close these issues.

Pylint 2.7.0 seems to ignore the min-similarity-lines setting
5 participants