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

Use pre-commit for CI #9412

Merged
merged 5 commits into from
Oct 12, 2021
Merged

Conversation

vyasr
Copy link
Contributor

@vyasr vyasr commented Oct 11, 2021

Switch CI to use pre-commit to run linters rather than invoking them directly. This centralizes linter version management, simplifies our need to clean up the output of linters for CI, and allows cudf to handle linters independently of the gpuCI containers.

Resolves #9309.

@vyasr vyasr self-assigned this Oct 11, 2021
@vyasr vyasr added 2 - In Progress Currently a work in progress Python Affects Python cuDF API. non-breaking Non-breaking change improvement Improvement / enhancement to an existing function and removed conda labels Oct 11, 2021
@github-actions github-actions bot added conda and removed Python Affects Python cuDF API. labels Oct 11, 2021
@vyasr
Copy link
Contributor Author

vyasr commented Oct 11, 2021

rerun tests

1 similar comment
@vyasr
Copy link
Contributor Author

vyasr commented Oct 11, 2021

rerun tests

@vyasr vyasr added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Oct 11, 2021
@vyasr vyasr marked this pull request as ready for review October 11, 2021 23:19
@vyasr vyasr requested a review from a team as a code owner October 11, 2021 23:19
@codecov
Copy link

codecov bot commented Oct 12, 2021

Codecov Report

Merging #9412 (c86c565) into branch-21.12 (ab4bfaa) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

❗ Current head c86c565 differs from pull request most recent head 698a090. Consider uploading reports for the commit 698a090 to get more accurate results
Impacted file tree graph

@@               Coverage Diff                @@
##           branch-21.12    #9412      +/-   ##
================================================
- Coverage         10.79%   10.73%   -0.06%     
================================================
  Files               116      116              
  Lines             18869    19101     +232     
================================================
+ Hits               2036     2051      +15     
- Misses            16833    17050     +217     
Impacted Files Coverage Δ
python/cudf/cudf/__init__.py 0.00% <0.00%> (ø)
python/cudf/cudf/_lib/__init__.py 0.00% <ø> (ø)
python/cudf/cudf/_lib/strings/__init__.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/_base_index.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/column/categorical.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/column/column.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/column/datetime.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/column/lists.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/column/numerical.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/column/string.py 0.00% <0.00%> (ø)
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7fa2738...698a090. Read the comment docs.

conda/environments/cudf_dev_cuda11.0.yml Outdated Show resolved Hide resolved
conda/environments/cudf_dev_cuda11.2.yml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
vyasr added 2 commits October 12, 2021 12:33
# Conflicts:
#	conda/environments/cudf_dev_cuda11.0.yml
#	conda/environments/cudf_dev_cuda11.2.yml
@vyasr
Copy link
Contributor Author

vyasr commented Oct 12, 2021

@gpucibot merge

@vyasr
Copy link
Contributor Author

vyasr commented Oct 12, 2021

rerun tests

@rapids-bot rapids-bot bot merged commit 1ab315a into rapidsai:branch-21.12 Oct 12, 2021
rapids-bot bot pushed a commit that referenced this pull request Oct 15, 2021
Following up on #9412, this PR updates some pre-commit hook URLs that have moved. This now uses the canonical URLs instead of a redirect.

Note: As of PR #9412, the pre-commit configuration is used for style checks on CI. The versions used by pre-commit are in a separate virtual environment from any linters/formatters in the user's local/conda environment.

I also updated the pinned versions of `flake8`, `pydocstyle`, and `isort`, which are more than a year old. The updates to these hooks do not require any changes to the code for compliance, and I do not anticipate any PR conflicts. Users of pre-commit will be automatically upgraded next time pre-commit runs. I did not upgrade `black` or `mypy`:
- Upgrading `black` to the latest version introduces a relatively large number of small formatting changes and should be handled in a separate PR.
- Upgrading `mypy` to the latest version introduces an issue I reported in #9300 and should be handled in a separate PR.

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Ashwin Srinath (https://github.com/shwina)

URL: #9433
rapids-bot bot pushed a commit that referenced this pull request Oct 21, 2021
…9490)

Some changes in #9412 and #9433 may lead to conflicts in VSCode / rapids-compose behavior for many developers. I am closing my PRs #9448 and #9450 for the same reason. See #9450 (comment) for details.

This PR reverts the problematic parts of #9412 and #9433, and makes the pre-commit configuration and the conda environment pinnings consistent.

Tagging @vyasr @galipremsagar @ajschmidt8 for awareness.

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #9490
@vyasr vyasr deleted the ci/use_precommit branch January 14, 2022 18:00
@bdice bdice mentioned this pull request Sep 7, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PROPOSAL] Always use pre-commit to run Python linters
4 participants