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 developer tools used in CI checks to requirements and add documentation on their use in this project #161

Merged
merged 4 commits into from
Nov 14, 2021

Conversation

goxberry
Copy link
Contributor

As part of work on #160, I realized I wasn't running certain checks the CI was doing, and these checks caused CI testing failures. This pull request attempts to head off that situation in the future by:

  • adding documentation on how to use pre-commit, isort, black, and a Python pyright wrapper to diagnose and fix style errors and static analysis bugs
  • adds these tools to the project developer requirements file
  • also adds numpy to the developer requirements file because it's used in an example

@goxberry
Copy link
Contributor Author

I omitted codespell from the documentation because it was taking a very long time to run, even after adding flags to skip directories. I also omitted pre-commit-hooks from the requirements file because it appeared as though it wasn't possible to run it as a command on the command line, but I could be mistaken.

Copy link
Owner

@joerick joerick left a comment

Choose a reason for hiding this comment

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

Thanks @goxberry ! I was looking for this information earlier in fact!

I think it's perhaps easier to use these tools through the pre-commit tool, which handles the installation and configuration. So I've suggested changing it to that.

README.md Outdated Show resolved Hide resolved
requirements-dev.txt Outdated Show resolved Hide resolved
@goxberry goxberry force-pushed the add-dev-tools-to-requirements-and-docs branch from 9740d31 to 235795a Compare November 8, 2021 03:50
This commit adds a numpy dependency to the requirements-dev.txt file
because numpy is used by one of the examples, and running examples is
useful for testing.
This commit adds the pre-commit package, which is used by the project
in its CI testing. The purpose of adding this package is to enable
developers to run the same tests locally to find and fix errors that
would otherwise be flagged by CI.
This commit adds directions for running CI checks locally to the
project README.md.
This commit adds some additional instructions on using developer tools
to conform to project style checks in CI.
@goxberry goxberry force-pushed the add-dev-tools-to-requirements-and-docs branch from 235795a to 69adad3 Compare November 8, 2021 03:55
@goxberry
Copy link
Contributor Author

goxberry commented Nov 8, 2021

Rebased on more recent version of main.

@goxberry goxberry requested a review from joerick November 8, 2021 03:55
@joerick
Copy link
Owner

joerick commented Nov 14, 2021

Thanks @goxberry !

@joerick joerick merged commit 1727221 into joerick:main Nov 14, 2021
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.

2 participants