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

Added pre-commit type-checking #99

Open
wants to merge 1 commit into
base: docbot
Choose a base branch
from

Conversation

miriamcheng
Copy link

@miriamcheng miriamcheng commented Nov 10, 2023

Description

Added pre-commit type-checking using mypy.
Written by Mekaeel and Miriam

Pre-commit type-checks and style-checks (not yet) your code before you commit them. It is recommended that you do this before making commitments.
STEP 1: Install pre-commit
pip install pre-commit
STEP 2: Set up pre-commit hooks: navigate to local repository and activate pre-commit hooks

cd /path/to/your/project
pre-commit install

STEP 3: Test pre-commit hooks
pre-commit run --all-files
By doing this, users can help to identify and fix issues before they are committed to the repository.

Issues Resolved

This contributes to issue #92, but we still need to verify that all types are working. It clearly shows issues for cluster-bootstrapping.py which need to be addressed.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: miriamcheng <mircheng@stanford.edu>
Copy link
Collaborator

@dtaivpp dtaivpp left a comment

Choose a reason for hiding this comment

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

Okay, two small changes and then I think we should be good.

  1. Can we move this into the .pre-commit-config.yaml that lives at demo/.pre-commit-config.yaml?

  2. Lets convert this from a remote hook (using the GitHub repo link) to a local hook (see this documentation). That will probably help solve some issues we may have with modules not getting found.

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