Repository navigation
Conversation
The RAT and PEP8 checks don’t print a blank line after successful runs. The scalastyle check shouldn’t either.
This guy just runs the pep8 utility on all code in the python directory, minus cloudpickle, which is a 3rd-party library.
This guy just calls scalastyle.
|
QA tests have started for PR 1744. This patch merges cleanly. |
|
QA results for PR 1744: |
Mostly done using autopep8, plus some hand fixes.
|
QA tests have started for PR 1744. This patch DID NOT merge cleanly! |
|
Hey nick - thanks for taking a crack at this. It's great to see us adding more automated code quality checks. Couple things:
|
|
QA results for PR 1744: |
*fingers crossed* I admit I’m not exactly sure how this works… Let’s see if I did the right thing.
|
Hey Pat!
By the way, I'm not sure I resolved my merge conflicts in the best way. Does it look good to you? |
merge upstream changes
|
QA tests have started for PR 1744. This patch merges cleanly. |
|
QA results for PR 1744: |
|
QA tests have started for PR 1744. This patch merges cleanly. |
Minor, I know.
|
QA tests have started for PR 1744. This patch merges cleanly. |
|
QA results for PR 1744: |
|
QA results for PR 1744: |
Everything looks cramped and it’s hard to tell at a glance where sections begin. Adding a blank line between sections should fix that.
See the discussion here: #1744 (comment) Get the pep8 utility at runtime so that it’s not required to be installed on the build server.
|
Patrick, I believe I've addressed the issues you called out. I'm not sure if the approach I took to getting |
|
QA tests have started for PR 1744. This patch merges cleanly. |
Don’t just assume curl got the file alright. Check and exit properly if there were any problems.
|
The line length is already 100 in this PR. |
There was a problem hiding this comment.
this line has 96 characters, need break?
There was a problem hiding this comment.
Ah, no need for the break. I'll fix this. (It's actually 99 characters without the break, I believe.)
There was a problem hiding this comment.
... and it's now 99 characters (as opposed to the original 96) because PEP 8 wants you to put spaces after your commas:
./python/pyspark/tests.py:1018:47: E231 missing whitespace after ','
|
@davies The line length to check for is set to 100 in |
|
Oh, sorry, I saw it break some lines which does not have more than 100 characters. LTGM now, but i'm have some questions about the changes in this PR. Maybe it's not enforced by pep8, just changed to make the code looks better? |
|
LGTM. no more comments. |
The only changes that should be like that are the ones related to the indentation of some of the The remainder of the whitespace changes are indeed mandated by PEP 8. |
Ah yeah, that happened because of a mistake I made when I called |
|
I've made one new commit to address @davies's comments. |
|
Jenkins, retest this please. |
|
QA tests have started for PR 1744. This patch merges cleanly. |
|
QA results for PR 1744: |
|
Ok I'm merging this in master. Thanks, @nchammas. |
|
And branch-1.1 too. |
As described in [SPARK-2627](https://issues.apache.org/jira/browse/SPARK-2627), we'd like Python code to automatically be checked for PEP 8 compliance by Jenkins. This pull request aims to do that. Notes: * We may need to install [`pep8`](https://pypi.python.org/pypi/pep8) on the build server. * I'm expecting tests to fail now that PEP 8 compliance is being checked as part of the build. I'm fine with cleaning up any remaining PEP 8 violations as part of this pull request. * I did not understand why the RAT and scalastyle reports are saved to text files. I did the same for the PEP 8 check, but only so that the console output style can match those for the RAT and scalastyle checks. The PEP 8 report is removed right after the check is complete. * Updates to the ["Contributing to Spark"](https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark) guide will be submitted elsewhere, as I don't believe that text is part of the Spark repo. Author: Nicholas Chammas <nicholas.chammas@gmail.com> Author: nchammas <nicholas.chammas@gmail.com> Closes #1744 from nchammas/master and squashes the following commits: 274b238 [Nicholas Chammas] [SPARK-2627] [PySpark] minor indentation changes 983d963 [nchammas] Merge pull request #5 from apache/master 1db5314 [nchammas] Merge pull request #4 from apache/master 0e0245f [Nicholas Chammas] [SPARK-2627] undo erroneous whitespace fixes bf30942 [Nicholas Chammas] [SPARK-2627] PEP8: comment spacing 6db9a44 [nchammas] Merge pull request #3 from apache/master 7b4750e [Nicholas Chammas] merge upstream changes 91b7584 [Nicholas Chammas] [SPARK-2627] undo unnecessary line breaks 44e3e56 [Nicholas Chammas] [SPARK-2627] use tox.ini to exclude files b09fae2 [Nicholas Chammas] don't wrap comments unnecessarily bfb9f9f [Nicholas Chammas] [SPARK-2627] keep up with the PEP 8 fixes 9da347f [nchammas] Merge pull request #2 from apache/master aa5b4b5 [Nicholas Chammas] [SPARK-2627] follow Spark bash style for if blocks d0a83b9 [Nicholas Chammas] [SPARK-2627] check that pep8 downloaded fine dffb5dd [Nicholas Chammas] [SPARK-2627] download pep8 at runtime a1ce7ae [Nicholas Chammas] [SPARK-2627] space out test report sections 21da538 [Nicholas Chammas] [SPARK-2627] it's PEP 8, not PEP8 6f4900b [Nicholas Chammas] [SPARK-2627] more misc PEP 8 fixes fe57ed0 [Nicholas Chammas] removing merge conflict backups 9c01d4c [nchammas] Merge pull request #1 from apache/master 9a66cb0 [Nicholas Chammas] resolving merge conflicts a31ccc4 [Nicholas Chammas] [SPARK-2627] miscellaneous PEP 8 fixes beaa9ac [Nicholas Chammas] [SPARK-2627] fail check on non-zero status 723ed39 [Nicholas Chammas] always delete the report file 0541ebb [Nicholas Chammas] [SPARK-2627] call Python linter from run-tests 12440fa [Nicholas Chammas] [SPARK-2627] add Scala linter 61c07b9 [Nicholas Chammas] [SPARK-2627] add Python linter 75ad552 [Nicholas Chammas] make check output style consistent (cherry picked from commit d614967) Signed-off-by: Reynold Xin <rxin@apache.org>
|
Thank you @davies @pwendell @JoshRosen and @rxin for reviewing this PR. |
As described in [SPARK-2627](https://issues.apache.org/jira/browse/SPARK-2627), we'd like Python code to automatically be checked for PEP 8 compliance by Jenkins. This pull request aims to do that. Notes: * We may need to install [`pep8`](https://pypi.python.org/pypi/pep8) on the build server. * I'm expecting tests to fail now that PEP 8 compliance is being checked as part of the build. I'm fine with cleaning up any remaining PEP 8 violations as part of this pull request. * I did not understand why the RAT and scalastyle reports are saved to text files. I did the same for the PEP 8 check, but only so that the console output style can match those for the RAT and scalastyle checks. The PEP 8 report is removed right after the check is complete. * Updates to the ["Contributing to Spark"](https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark) guide will be submitted elsewhere, as I don't believe that text is part of the Spark repo. Author: Nicholas Chammas <nicholas.chammas@gmail.com> Author: nchammas <nicholas.chammas@gmail.com> Closes apache#1744 from nchammas/master and squashes the following commits: 274b238 [Nicholas Chammas] [SPARK-2627] [PySpark] minor indentation changes 983d963 [nchammas] Merge pull request apache#5 from apache/master 1db5314 [nchammas] Merge pull request apache#4 from apache/master 0e0245f [Nicholas Chammas] [SPARK-2627] undo erroneous whitespace fixes bf30942 [Nicholas Chammas] [SPARK-2627] PEP8: comment spacing 6db9a44 [nchammas] Merge pull request apache#3 from apache/master 7b4750e [Nicholas Chammas] merge upstream changes 91b7584 [Nicholas Chammas] [SPARK-2627] undo unnecessary line breaks 44e3e56 [Nicholas Chammas] [SPARK-2627] use tox.ini to exclude files b09fae2 [Nicholas Chammas] don't wrap comments unnecessarily bfb9f9f [Nicholas Chammas] [SPARK-2627] keep up with the PEP 8 fixes 9da347f [nchammas] Merge pull request apache#2 from apache/master aa5b4b5 [Nicholas Chammas] [SPARK-2627] follow Spark bash style for if blocks d0a83b9 [Nicholas Chammas] [SPARK-2627] check that pep8 downloaded fine dffb5dd [Nicholas Chammas] [SPARK-2627] download pep8 at runtime a1ce7ae [Nicholas Chammas] [SPARK-2627] space out test report sections 21da538 [Nicholas Chammas] [SPARK-2627] it's PEP 8, not PEP8 6f4900b [Nicholas Chammas] [SPARK-2627] more misc PEP 8 fixes fe57ed0 [Nicholas Chammas] removing merge conflict backups 9c01d4c [nchammas] Merge pull request apache#1 from apache/master 9a66cb0 [Nicholas Chammas] resolving merge conflicts a31ccc4 [Nicholas Chammas] [SPARK-2627] miscellaneous PEP 8 fixes beaa9ac [Nicholas Chammas] [SPARK-2627] fail check on non-zero status 723ed39 [Nicholas Chammas] always delete the report file 0541ebb [Nicholas Chammas] [SPARK-2627] call Python linter from run-tests 12440fa [Nicholas Chammas] [SPARK-2627] add Scala linter 61c07b9 [Nicholas Chammas] [SPARK-2627] add Python linter 75ad552 [Nicholas Chammas] make check output style consistent
…#1744) This PR bumps Boson version to `0.3.2`. Patch list https://github.pie.apple.com/pie/boson/compare/658ed31...9bc6c75
### What changes were proposed in this pull request? This PR aims to upgrade FasterXML Jackson to 2.22.4. ### Why are the changes needed? Jackson 2.22.4 is the latest patch release on the 2.22 line. - https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.22.4 (2026-10-17) - Streaming - [#1683](FasterXML/jackson-core#1683) `ReaderBasedJsonParser` accepts lone surrogates in `\uXXXX` escapes in field names - [#1744](FasterXML/jackson-core#1744) `UTF8DataInputJsonParser` fails on JSON-escaped surrogate pairs in property names - [#1750](FasterXML/jackson-core#1750) `ALLOW_UNESCAPED_CONTROL_CHARS` is ignored for single-quoted string values in UTF-8 byte parsers - [#1742](FasterXML/jackson-core#1742), [#1746](FasterXML/jackson-core#1746), [#1756](FasterXML/jackson-core#1756) Non-blocking parser fixes for escaped surrogate pairs, leading decimal point numbers, and multi-byte UTF-8 characters after a backslash escape - [#1730](FasterXML/jackson-core#1730) `FilteringGeneratorDelegate` handles embedded objects, typed arrays, and raw/binary values consistently - Databind - CVE-2026-110879 [#6287](FasterXML/jackson-databind#6287) Validate type parameters and array element types of type ids - [#6206](FasterXML/jackson-databind#6206) Report a cycle through a `JsonValue` accessor as a `DatabindException` - [#6227](FasterXML/jackson-databind#6227) `BeanDescription.findProperties()` is not thread-safe on a shared, cached instance - [#6249](FasterXML/jackson-databind#6249) Avoid an NPE when the parser reports `VALUE_STRING` with null text - CBOR - CVE-2026-106554 [#821](FasterXML/jackson-dataformats-binary#821) Grow the `CBORParser.TagList` backing array geometrically `jackson-annotations` stays at 2.22 as referenced by `jackson-bom` 2.22.4. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Sonnet 5.5 Closes #60004 from dongjoon-hyun/SPARK-60799. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
…r green (apache#1744) ### What changes were proposed in this pull request? This pull request splits one test of `VarkaEmittedBytesSuite` into seven. It changes test code only. The suite's pin test checks that the emitter still produces the bytes that `sql/varka/emitted_bytes.json` records for every shape. Until now one test computed the whole file: the shapes at the default options at both vector widths, and a digest of every shape for each option arm. - The first new test computes the shapes at the defaults at both widths. - Six more tests compute one share each of the option arms' digests. - Each test computes its share, takes the rest from the committed file, and compares the whole file byte for byte. So the check is the same as before. - A regeneration still computes and writes the file in one test. - Each test reports its time for each group of shapes. ### Why are the changes needed? Each Varka test has a watchdog of 600 seconds. The pin test is near that cap on the slowest class of CI runner, the AMD EPYC 7763. - On 25 November 2026 it took 579.4 seconds on an EPYC 7763 in master's run 45678631423. On faster runners it took 328 seconds in master's run 45667844008 and 295 seconds in apache#1711's Build, on an Intel Xeon 6975P-C. - On 23 November 2026 it took 511 to 551 seconds on EPYC 7763 runners. Then apache#1626 pushed it past the cap, master failed 3 of 3 attempts, and apache#1626 was reverted (`sql/varka/AGENTS.md` records this). - The test's time grows with each coverage row. Two open pull requests add rows: apache#1710 adds 7 and apache#1711 adds 36. With the present 21 seconds of margin, either can turn master red on a slow runner. After the split, no test of the file computes more than one sixth of the option arms' digests. ### Does this PR introduce _any_ user-facing change? No. Test code only. ### How was this patch tested? - `VarkaEmittedBytesSuite` on the laptop (an AMD Ryzen AI 9 HX PRO 370, JDK 25), on this branch merged with master at `2fea7020a8f`: 14 tests pass, and the 2 opt-in audits do not run. The defaults' test takes 8.5 seconds and each of the six parts takes 16.3 to 17.8 seconds. - The same suite on 4 cores of the laptop, on 23 November 2026, as a CI runner has 4 cores: the defaults' test took 11.1 seconds and each part took 26.4 to 29.2 seconds. - The check is unchanged, so `sql/varka/emitted_bytes.json` is not regenerated. - Size: 286 counted lines, in one test file. Known limits, not changed here: - A regeneration computes the whole file in one test under the same watchdog. It takes about one minute on the laptop. - The test "an arm the option matrix runs in another's place emits that arm's bytes" is now the longest of the suite: 35.6 seconds on the laptop. It took 83.2 seconds on a CI runner in apache#1711's Build. **Review.** One `/code-review high` round on 23 November 2026 found 7 points, 1 of them important. The important one is fixed: the list of moved shapes threw a `NullPointerException` when the committed lanes that a test copies had no sequence. Three nits are fixed: the name of the defaults' test, a section header that split unrelated tests, and history in a comment. Three points are trade-offs that stay: the two limits above, and the setup that each part repeats. The only commit since that review is a merge of master, with no conflict. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5, Claude Fable 5.2)
As described in SPARK-2627, we'd like Python code to automatically be checked for PEP 8 compliance by Jenkins. This pull request aims to do that.
Notes:
pep8on the build server.