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

Fix quality #183

Merged
merged 5 commits into from
Oct 12, 2022
Merged

Fix quality #183

merged 5 commits into from
Oct 12, 2022

Conversation

tkkuehn
Copy link
Collaborator

@tkkuehn tkkuehn commented Oct 11, 2022

Proposed changes

Get all our quality checkers passing.

I couldn't get pylint to work properly in pre-commit, but it passes on my machine too.

Types of changes

What types of changes does your code introduce? Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionalitiy)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you are unsure about any of the choices, don't hesitate to ask!

  • Changes have been tested to ensure that fix is effective or that a feature works.
  • Changes pass the unit tests
  • Code has been run through black with the -l 79 flag.
  • I have included necessary documentation or comments (as necessary)
  • Any dependent changes have been merged and published

Notes

All PRs will undergo the unit testing before being reviewed. You may be requested to explain or make additional changes before the PR is accepted.

PR template was adopted from appium

@tkkuehn tkkuehn requested a review from kaitj October 11, 2022 20:51
@tkkuehn tkkuehn temporarily deployed to TEST October 11, 2022 20:51 Inactive
@tkkuehn tkkuehn temporarily deployed to TEST October 11, 2022 20:51 Inactive
@tkkuehn tkkuehn temporarily deployed to TEST October 11, 2022 20:51 Inactive
@kaitj kaitj added bug Something isn't working maintenance Pull requests that maintain the repo and removed bug Something isn't working labels Oct 12, 2022
@kaitj
Copy link
Collaborator

kaitj commented Oct 12, 2022

Will take a closer look later this morning, but I think it's failing because of the two errors being thrown in the pylint on actions. We could either:

  1. Have it always return non-zero exit code (I don't love this idea)
  2. Or add an ignore for those errors for those classes / functions (I think I would lean towards this).

Copy link
Collaborator

@kaitj kaitj left a comment

Choose a reason for hiding this comment

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

Looks good overall. Few minor things:

  1. Pylint precommit (see comment)
  2. We probably don't want the .json and .fcsv files to be linted, which it looks like they were in this case.

The request for change is related to the linted fiducial files. Could probably just remove them from the PR and update the linters to ignore those files.

# hooks:
# - id: flake8

# Pylint needs to be installed locally for precommit
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not opposed to not including the pylint in the pre-commit but just wondering if there was any particular reason for removing it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I couldn't get it to work properly -- precommit didn't seem to play nicely with my local installation of pylint. It wouldn't pick up the pylint_flask_sqlalchemy plugin and ignored the # pylint: disable=... directives I added, leading it to fail every time (similar to what happened in the GH action).

test/test_model.py Outdated Show resolved Hide resolved
@tkkuehn
Copy link
Collaborator Author

tkkuehn commented Oct 12, 2022

Will take a closer look later this morning, but I think it's failing because of the two errors being thrown in the pylint on actions.

I think the pylint_flask_sqlalchemy dependency I added should fix this (at least it does on my machine). However, it clearly doesn't on the GH action, either because it's malfunctioning or the config in the pyproject.toml isn't being used for pylint. In any case, just adding the ignores inline is probably easiest.

@kaitj
Copy link
Collaborator

kaitj commented Oct 12, 2022

Will take a closer look later this morning, but I think it's failing because of the two errors being thrown in the pylint on actions.

I think the pylint_flask_sqlalchemy dependency I added should fix this (at least it does on my machine). However, it clearly doesn't on the GH action, either because it's malfunctioning or the config in the pyproject.toml isn't being used for pylint. In any case, just adding the ignores inline is probably easiest.

Hmm okay, I'll play around with it a little more this morning and see if I can get that part working then.

@tkkuehn tkkuehn temporarily deployed to TEST October 12, 2022 13:34 Inactive
@tkkuehn tkkuehn temporarily deployed to TEST October 12, 2022 13:34 Inactive
@tkkuehn tkkuehn temporarily deployed to TEST October 12, 2022 13:34 Inactive
@tkkuehn tkkuehn temporarily deployed to TEST October 12, 2022 13:52 Inactive
@tkkuehn tkkuehn temporarily deployed to TEST October 12, 2022 13:52 Inactive
@tkkuehn tkkuehn temporarily deployed to TEST October 12, 2022 13:52 Inactive
@kaitj kaitj temporarily deployed to TEST October 12, 2022 14:30 Inactive
@kaitj kaitj temporarily deployed to TEST October 12, 2022 14:30 Inactive
@kaitj kaitj temporarily deployed to TEST October 12, 2022 14:30 Inactive
@github-actions github-actions bot requested a review from kaitj October 12, 2022 14:33
@kaitj kaitj merged commit 0a5874f into master Oct 12, 2022
@kaitj kaitj deleted the fix-quality branch October 12, 2022 14:44
@kaitj kaitj temporarily deployed to TEST October 12, 2022 14:44 Inactive
@kaitj kaitj temporarily deployed to TEST October 12, 2022 14:44 Inactive
@kaitj kaitj temporarily deployed to TEST October 12, 2022 14:44 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Pull requests that maintain the repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants