Skip to content

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.

@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