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 CONTRIBUTING file and pre-commit hook instructions #87

Merged
merged 7 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributing to JAXsim :rocket:

Hello Contributor,

We're thrilled that you're considering contributing to JAXsim!
Here's a brief guide to help you seamlessly become a part of our project.

## Development Environment :hammer_and_wrench:

Make sure your development environment is set up.
Follow the installation instructions in the [README](./README.md) to get JAXsim and its dependencies up and running.

To ensure consistency and maintain code quality, we recommend using the pre-commit hook with the following configuration.
This will help catch issues before they become a part of the project.

### Setting Up Pre-commit Hook :fishing_pole_and_fish:

`pre-commit` is a tool that manages pre-commit hooks for your project.
It will run checks on your code before you commit it, ensuring that it meets the project's standards.
You should have it already installed if you followed the installation instructions in the [README](./README.md).

Run the following command to install the hooks:

```bash
pre-commit install
```

### Using Pre-commit Hook :vertical_traffic_light:

Before making any commits, the pre-commit hook will automatically run.
If it finds any issues, it will prevent the commit and provide instructions on how to fix them.

To get your commit through without fixing the issues, use the `--no-verify` flag:

```bash
git commit -m "Your commit message" --no-verify
```

To manually run the pre-commit hook at any time, use:

```bash
pre-commit run --all-files
```

## Making Changes :construction:

Before submitting a pull request, create an issue to discuss your changes if major changes are involved.
This helps us understand your needs and provide feedback.
Clearly describe your pull request, referencing any related issues.
Follow the [PEP 8](https://peps.python.org/pep-0008/) style guide and include relevant tests.

## Testing :test_tube:

Your code will be tested with the CI/CD pipeline before merging.
Feel free to add new ones or update the existing tests in the [workflows](./github/workflows) folder to cover your changes.

## Documentation :book:

Update the documentation in the [docs](./docs) folder and the [README](./README.md) to reflect your changes, if necessary.
There is no need to build the documentation locally; it will be automatically built and deployed with your pull request, where a preview link will be provided.

## Code Review :eyes:

Expect feedback during the code review process.
Address comments and make necessary changes.
This collaboration ensures quality.
Please keep the commit history clean, or squash commits if necessary.

## License :scroll:

JAXsim is under the [BSD 3-Clause License](./LICENSE).
By contributing, you agree to the same license.

Thank you for contributing to JAXsim! Your efforts are appreciated.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ Here below we summarize the differences between the projects:

## Contributing

Pull requests are welcome.
For major changes, please open an issue first to discuss what you would like to change.
We welcome contributions from the community.
Please read the [contributing guide](./CONTRIBUTING.md) to get started.

## Citing

Expand Down
Loading