Skip to content

Conversation

@nchammas
Copy link
Contributor

@nchammas nchammas commented Mar 14, 2020

What changes were proposed in this pull request?

As discovered here #27910 (comment), pydocstyle tests were not running anywhere (not on Jenkins; not on GitHub).

This PR enables those tests.

It also seems like a large hill to climb to enable any meaningful checks, so we're going to just rip pydocstyle out for now.

Why are the changes needed?

Presumably, we defined those doc style tests because we care about whatever it is they enforce. Since we're not actually testing anything, though, it's better to clear the cruft.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Will check the GitHub workflow logs on this PR.

@nchammas
Copy link
Contributor Author

pydocstyle tests are now running.

@SparkQA
Copy link

SparkQA commented Mar 14, 2020

Test build #119794 has finished for PR 27912 at commit 3f09453.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Mar 14, 2020

Test build #119795 has finished for PR 27912 at commit 0e71162.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

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

@nchammas, my current thought is that:

  • We should exclude the pinning versions at dev/requirements.txt
  • I am less strongly against about pinning versions at Github Actions.
  • It currently ignores so many rules.
    • Can you try to enable some rules? I am sure some rules will be able to enable as of fe75ff8.
    • If there are still many rules to disable, should we maybe just revert pydocstyle itself at this moment?

@nchammas
Copy link
Contributor Author

Here's a count of the errors when I try enabling all the rules:

+------------+-----+
|  error_code|count|
+------------+-----+
|        D100|  483|
|        D101|  327|
|        D102| 2040|
|        D103|  321|
|        D104|   23|
|        D105|  244|
|        D106|   14|
|        D107|  330|
|        D200| 2622|
|        D201|    4|
|        D202|  110|
|        D203|  931|
|        D204|  212|
|        D205| 1767|
|        D207|    6|
|        D208|   30|
|        D209|   19|
|        D210|  164|
|        D211|  116|
|        D212| 5129|
|        D213|  617|
|        D214|    3|
|        D300|   14|
|        D301|   49|
|        D400| 2119|
|        D401| 2743|
|        D402|  304|
|        D403|   80|
|        D404|   34|
|        D405|    4|
|        D406|    7|
|        D407|   11|
|        D412|    4|
|        D413|   11|
|        D415| 2117|
|        D416|    2|
|        D417|    2|
+------------+-----+

So it looks like there are a handful of rules we could perhaps enable, like D206, D215, D302, and D408-D411.

@nchammas
Copy link
Contributor Author

I'd say the high-value rules are the D100s, which cover missing docstrings in public objects, though I wonder what "public" means to pydocstyle: Anything not named with a leading underscore?

We're doing pretty badly in the missing docstring category, so if we aren't interested in making a push to clean up in that area perhaps it would be better to just rip pydocstyle out all together.

@SparkQA
Copy link

SparkQA commented Mar 15, 2020

Test build #119808 has finished for PR 27912 at commit eed7164.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@nchammas
Copy link
Contributor Author

Retest this please.

@SparkQA
Copy link

SparkQA commented Mar 15, 2020

Test build #119815 has finished for PR 27912 at commit eed7164.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

Thanks @nchammas! Shall we revert SPARK-23367 in this PR for now? It should be fine to convert SPARK-31155 to describe the revert of SPARK-23367. cc @holdenk FYI.

@nchammas nchammas changed the title [SPARK-31155] Enable pydocstyle tests [SPARK-31155] Remove pydocstyle tests Mar 16, 2020
Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

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

OK by me either way.

@SparkQA
Copy link

SparkQA commented Mar 16, 2020

Test build #119876 has finished for PR 27912 at commit 18de9d7.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Mar 16, 2020

Test build #119885 has finished for PR 27912 at commit 34ec6a3.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Mar 16, 2020

Jenkins retest this please

Copy link
Member

@BryanCutler BryanCutler left a comment

Choose a reason for hiding this comment

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

Seems ok with me to remove given it's not being used and ignores many useful checks. I would support enabling again if there was an effort to fix some of checks.

@SparkQA
Copy link

SparkQA commented Mar 16, 2020

Test build #119894 has finished for PR 27912 at commit 34ec6a3.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

Merged to master and branch-3.0.

HyukjinKwon pushed a commit that referenced this pull request Mar 17, 2020
### What changes were proposed in this pull request?

As discovered here #27910 (comment), pydocstyle tests were not running anywhere (not on Jenkins; not on GitHub).

~This PR enables those tests.~

It also seems like a [large hill to climb](#27912 (comment)) to enable any meaningful checks, so we're going to just rip pydocstyle out for now.

### Why are the changes needed?

Presumably, we defined those doc style tests because we care about whatever it is they enforce. Since we're not actually testing anything, though, it's better to clear the cruft.

### Does this PR introduce any user-facing change?

No.

### How was this patch tested?

Will check the GitHub workflow logs on this PR.

Closes #27912 from nchammas/SPARK-31155-pydocstyle.

Authored-by: Nicholas Chammas <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
(cherry picked from commit b4748ca)
Signed-off-by: HyukjinKwon <[email protected]>
HyukjinKwon added a commit to databricks/koalas that referenced this pull request Mar 17, 2020
@nchammas nchammas deleted the SPARK-31155-pydocstyle branch March 17, 2020 13:38
@shaneknapp
Copy link
Contributor

shaneknapp commented Mar 17, 2020 via email

sjincho pushed a commit to sjincho/spark that referenced this pull request Apr 15, 2020
### What changes were proposed in this pull request?

As discovered here apache#27910 (comment), pydocstyle tests were not running anywhere (not on Jenkins; not on GitHub).

~This PR enables those tests.~

It also seems like a [large hill to climb](apache#27912 (comment)) to enable any meaningful checks, so we're going to just rip pydocstyle out for now.

### Why are the changes needed?

Presumably, we defined those doc style tests because we care about whatever it is they enforce. Since we're not actually testing anything, though, it's better to clear the cruft.

### Does this PR introduce any user-facing change?

No.

### How was this patch tested?

Will check the GitHub workflow logs on this PR.

Closes apache#27912 from nchammas/SPARK-31155-pydocstyle.

Authored-by: Nicholas Chammas <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
rising-star92 added a commit to rising-star92/databricks-koalas that referenced this pull request Jan 27, 2023
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.

6 participants