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

refactor: failing actions #474

Merged
merged 8 commits into from
Aug 28, 2023
Merged

Conversation

KrishPatel13
Copy link
Collaborator

@KrishPatel13 KrishPatel13 commented Aug 21, 2023

What kind of change does this PR introduce?

Summary

Checklist

  • My code follows the style guidelines of OpenAdapt
  • I have performed a self-review of my code
  • If applicable, I have added tests to prove my fix is functional/effective
  • I have linted my code locally prior to submission
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. README.md, requirements.txt)
  • New and existing unit tests pass locally with my changes

How can your code be run and tested?

Other information

@KrishPatel13 KrishPatel13 self-assigned this Aug 21, 2023
@KrishPatel13 KrishPatel13 marked this pull request as ready for review August 21, 2023 14:37
@KrishPatel13 KrishPatel13 marked this pull request as draft August 21, 2023 14:37
@KrishPatel13 KrishPatel13 marked this pull request as ready for review August 21, 2023 14:53
@KrishPatel13
Copy link
Collaborator Author

KrishPatel13 commented Aug 21, 2023

@Mustaballer I can you let me know do we run Python CI Actions on our side in our pull requests and branches of forked repo. This will help me/all to fix the failing flake 8 tests before we merge the PRs.

image

So that we have the green ticks (as you have for your prs) before we can merge them in :-)

Thank you

@Mustaballer
Copy link
Collaborator

Hey @KrishPatel13 there seems to be a solution to this issue with status checks not running on forked repos here:

WordPress/gutenberg#17324

I will address this in fixing publish GitHub actions

@KrishPatel13
Copy link
Collaborator Author

Github Action Catches this:
image

But in CLI in poetry env:
image

@KrishPatel13
Copy link
Collaborator Author

@Mustaballer What is the issue here 🤔 ?

@KrishPatel13
Copy link
Collaborator Author

KrishPatel13 commented Aug 25, 2023

I just updated this pr's branch to the latest Openadpat::main (after newly merged the pr #234) and noticed a couple of things here:

Issue 1:

Running flake8 locally after the newly merged PR, it shows me so many flake8 errors. See below :

(openadapt-py3.10) PS P:\OpenAdapt AI - MLDS AI\cloned_repo\my_forked\OpenAdapt\openadapt> flake8 .\productivity.py
.\productivity.py:1:1: D212 Multi-line docstring summary should start at the first line
.\productivity.py:76:1: D212 Multi-line docstring summary should start at the first line
.\productivity.py:76:1: D417 Missing argument descriptions in the docstring
.\productivity.py:99:1: D212 Multi-line docstring summary should start at the first line
.\productivity.py:99:1: D417 Missing argument descriptions in the docstring
.\productivity.py:116:1: D212 Multi-line docstring summary should start at the first line
.\productivity.py:116:1: D417 Missing argument descriptions in the docstring
.\productivity.py:133:1: D212 Multi-line docstring summary should start at the first line
.\productivity.py:133:1: D417 Missing argument descriptions in the docstring
.\productivity.py:143:89: E501 line too long (92 > 88 characters)
.\productivity.py:153:1: D205 1 blank line required between summary line and description
.\productivity.py:153:1: D212 Multi-line docstring summary should start at the first line
.\productivity.py:153:1: D415 First line should end with a period, question mark, or exclamation point
.\productivity.py:153:1: D417 Missing argument descriptions in the docstring
.\productivity.py:180:1: D205 1 blank line required between summary line and description
.\productivity.py:180:1: D212 Multi-line docstring summary should start at the first line
.\productivity.py:180:1: D415 First line should end with a period, question mark, or exclamation point
.\productivity.py:180:1: D417 Missing argument descriptions in the docstring
.\productivity.py:181:89: E501 line too long (92 > 88 characters)
.\productivity.py:190:89: E501 line too long (90 > 88 characters)
.\productivity.py:279:1: D205 1 blank line required between summary line and description
.\productivity.py:279:1: D212 Multi-line docstring summary should start at the first line
.\productivity.py:279:1: D415 First line should end with a period, question mark, or exclamation point
.\productivity.py:279:1: D417 Missing argument descriptions in the docstring
.\productivity.py:281:89: E501 line too long (91 > 88 characters)
.\productivity.py:308:1: D205 1 blank line required between summary line and description
.\productivity.py:308:1: D212 Multi-line docstring summary should start at the first line
.\productivity.py:308:1: D415 First line should end with a period, question mark, or exclamation point
.\productivity.py:308:1: D417 Missing argument descriptions in the docstring
.\productivity.py:311:89: E501 line too long (93 > 88 characters)
.\productivity.py:362:1: D212 Multi-line docstring summary should start at the first line
.\productivity.py:362:1: D417 Missing argument descriptions in the docstring
.\productivity.py:384:50: ANN201 Missing return type annotation for public function
.\productivity.py:385:1: D200 One-line docstring should fit on one line with quotes
.\productivity.py:385:1: D212 Multi-line docstring summary should start at the first line
.\productivity.py:406:1: D212 Multi-line docstring summary should start at the first line
.\productivity.py:406:1: D417 Missing argument descriptions in the docstring
.\productivity.py:432:29: ANN201 Missing return type annotation for public function
.\productivity.py:433:1: D205 1 blank line required between summary line and description
.\productivity.py:433:1: D212 Multi-line docstring summary should start at the first line
.\productivity.py:434:89: E501 line too long (96 > 88 characters)
.\productivity.py:656:5: F841 local variable 'result' is assigned to but never used
.\productivity.py:662:18: ANN201 Missing return type annotation for public function
(openadapt-py3.10) PS P:\OpenAdapt AI - MLDS AI\cloned_repo\my_forked\OpenAdapt\openadapt>

But these all were not caught by the github-actions. :( Instead it gave a green tick for it.
image
@Mustaballer what is the issue here, can we investigate this as well 🤔 ?

Issue 2:

Also, I noticed that the order of writing imports was not correct (see : https://github.com/OpenAdaptAI/OpenAdapt/pull/234/files#r1305068187) and/or the pre-commit hook did not isorted the imports successfully ?
@angelala3252 Did you ran pre-commit install and then pushed all of your commits ? If not, then I would strongly encourage to do it as it automatically sorts imports and runs black on your code. It is really helpful :-)

@Mustaballer Do you think that github-actions was not able to point out these 2 issues ? as it gave green ticks :?

@KrishPatel13
Copy link
Collaborator Author

KrishPatel13 commented Aug 25, 2023

Also noticed the commit (266588c) failed black as well :
image
image

But still on openadapt it showed :

image

@angelala3252
Copy link
Collaborator

@KrishPatel13 flake8 errors should be resolved with this new PR #480

@Mustaballer
Copy link
Collaborator

@KrishPatel13 Thanks for taking this PR! Just a suggestion can you rename the PR title to refactor or 'chore', because this should not be triggering a version bump since all we are doing is addressing linting errors. :)

@KrishPatel13 KrishPatel13 changed the title fix: failing actions refactor: failing actions Aug 25, 2023
@KrishPatel13
Copy link
Collaborator Author

@Mustaballer Done! thank you

@KrishPatel13
Copy link
Collaborator Author

@abrichr Ready to be merged!

README.md Outdated Show resolved Hide resolved
@abrichr abrichr merged commit 09f4e71 into OpenAdaptAI:main Aug 28, 2023
@abrichr abrichr deleted the fix/failing_actions branch August 28, 2023 15:12
R-ohit-B-isht pushed a commit to R-ohit-B-isht/OpenAdapt that referenced this pull request Jun 21, 2024
* add missing dicstrings

* make docstring a bit longer

* fix all flake8 errors

* Add documentation on status checks

* Update README.md

---------

Co-authored-by: Mustafa Abdulrahman <[email protected]>
Co-authored-by: Richard Abrich <[email protected]>
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.

4 participants