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

add flake8 and pylint to lint workflow #1285

Merged
merged 13 commits into from Jul 1, 2022
Merged

add flake8 and pylint to lint workflow #1285

merged 13 commits into from Jul 1, 2022

Conversation

pindge
Copy link
Contributor

@pindge pindge commented Jun 28, 2022

Reason for this pull request

When commits are checked by pre-commit and flake8 code lint was corrected, it applies to lines that were committed without flake8 causing extra lines of changes shown in a pull request increasing difficulty in reviewing.

Adding flake8 to code lint as part of GitHub action ensures commits with or without pre-commit checks are all passing flake8 code lint.

Proposed changes

  • create lint.yaml for code lint run as part of PR action

  • add flake8 for code lint as per pre-commit hook

  • streamline github action, move pycodestyle and pylint out of build and into lint

  • apply flake8 lint correction to all effected lines

  • add more ignore to setup.cfg

  • Closes Flake is used in pre-commit but not in github action #1284

  • Tests added / passed

  • Fully documented, including docs/about/whats_new.rst for all changes

@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #1285 (d5db048) into develop (7045532) will decrease coverage by 0.04%.
The diff coverage is 79.45%.

@@             Coverage Diff             @@
##           develop    #1285      +/-   ##
===========================================
- Coverage    93.47%   93.43%   -0.05%     
===========================================
  Files          128      128              
  Lines        12958    12953       -5     
===========================================
- Hits         12113    12103      -10     
- Misses         845      850       +5     
Impacted Files Coverage Δ
datacube/api/grid_workflow.py 97.08% <ø> (-0.05%) ⬇️
datacube/drivers/postgis/_schema.py 100.00% <ø> (ø)
datacube/drivers/postgis/sql.py 98.18% <ø> (ø)
datacube/drivers/postgres/_schema.py 100.00% <ø> (ø)
datacube/drivers/postgres/sql.py 98.18% <ø> (ø)
datacube/helpers.py 26.31% <ø> (-7.02%) ⬇️
datacube/index/memory/_fields.py 90.90% <ø> (ø)
datacube/index/memory/_users.py 100.00% <ø> (ø)
datacube/index/null/_users.py 100.00% <ø> (+10.00%) ⬆️
datacube/index/postgis/_metadata_types.py 96.20% <ø> (-0.05%) ⬇️
... and 42 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 7045532...d5db048. Read the comment docs.

@pindge pindge marked this pull request as draft June 28, 2022 23:20
@pindge pindge self-assigned this Jun 28, 2022
@pindge pindge requested a review from SpacemanPaul June 29, 2022 05:37
@pindge pindge marked this pull request as ready for review June 29, 2022 05:37
Copy link
Contributor

@SpacemanPaul SpacemanPaul left a comment

Choose a reason for hiding this comment

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

Some minor comments on a very large but minor PR.

Happy to debate any of them if anybody disagrees with my takes.

datacube/index/memory/_datasets.py Outdated Show resolved Hide resolved
integration_tests/index/test_null_index.py Show resolved Hide resolved
tests/test_geometry.py Outdated Show resolved Hide resolved
@pindge pindge requested a review from SpacemanPaul July 1, 2022 02:57
@pindge pindge merged commit 5456533 into develop Jul 1, 2022
@pindge pindge deleted the add-flake8 branch July 1, 2022 03:11
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.

Flake is used in pre-commit but not in github action
2 participants