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 pre-commit hooks & BSD 3-Clause license #206

Merged
merged 9 commits into from
Dec 14, 2024

Conversation

amalnanavati
Copy link
Contributor

@amalnanavati amalnanavati commented Dec 11, 2024

Description

This PR adds pre-commit hooks to this repository. This ensures consistent formatting and style throughout the repository. After the PR gets merged in, I'll be able to configure this repository to automatically run the pre-commit hooks on every PR.

Related PRs:

Testing procedure

Although in theory this should not change any functionality, we must check. Thus:

  • Start the demo in real: python3 src/ada_Feeding/start.py
  • Eat a whole bite, verify everything works as expected.
  • Start the demo in mock: python3 src/ada_Feeding/start.py --sim mock
  • Go through a whole bite, verify everything works as expected.

Before opening a pull request

  • pre-commit run --all-files
  • Run your code through pylint. pylint --recursive=y --rcfile=.pylintrc .. All warnings but fixme must be addressed.

Before Merging

  • Squash & Merge

@amalnanavati amalnanavati changed the title Add pre-commit hooks Add pre-commit hooks & BSD-Clause 3 license Dec 11, 2024
@amalnanavati amalnanavati changed the title Add pre-commit hooks & BSD-Clause 3 license Add pre-commit hooks & BSD 3-Clause license Dec 11, 2024
@amalnanavati
Copy link
Contributor Author

Note to reviewers: the main files to review are .pre-commit-config.yaml, the files in .github, and other new files. Other files were auto-modified by pre-commit hooks and have too many subtle spelling and formatting changes to reasonably review.

Copy link
Contributor

@jjaime2 jjaime2 left a comment

Choose a reason for hiding this comment

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

Seems good, just want to make sure our READMEs are still readable after this PR gets merged.

ada_feeding/README.md Outdated Show resolved Hide resolved
ada_feeding/ada_feeding/behaviors/ros/time.py Show resolved Hide resolved
ada_feeding_perception/README.md Outdated Show resolved Hide resolved
.github/workflows/pre-commit.yaml Show resolved Hide resolved
@amalnanavati amalnanavati requested a review from jjaime2 December 12, 2024 00:48
Copy link
Contributor

@jjaime2 jjaime2 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

@amalnanavati amalnanavati merged commit 6d8a5f3 into ros2-devel Dec 14, 2024
1 check passed
@amalnanavati amalnanavati deleted the amaln/pre-commit branch December 14, 2024 01:13
amalnanavati added a commit that referenced this pull request Dec 19, 2024
* Add pre-commit hooks

* Fix unknown module issue from msgs

* Hardcode pylint version for consistency

* Add ros2-devel to workflow branches

* Remove pylint from workflow due to inconsistent errors between remote and local

* Add license

* Fix README numbering

* Fix LICENSE numbering

* Add license header to yaml files as well
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