1
0
Fork 0
mirror of synced 2025-01-04 20:22:56 -05:00
dotbot/CONTRIBUTING.md
Anish Athalye abecc97bad Modernize project
This patch adds static typing, and it switches to the Hatch package
manager and its Hatchling build backend.
2024-12-27 22:01:05 -08:00

3.2 KiB

Contributing

All kinds of contributions to Dotbot are greatly appreciated. For someone unfamiliar with the code base, the most efficient way to contribute is usually to submit a feature request or bug report. If you want to dive into the source code, you can submit a patch as well, either working on your own ideas or existing issues.

Feature Requests

Do you have an idea for an awesome new feature for Dotbot? Please submit a feature request. It's great to hear about new ideas.

If you are inclined to do so, you're welcome to fork Dotbot, work on implementing the feature yourself, and submit a patch. In this case, it's highly recommended that you first open an issue describing your enhancement to get early feedback on the new feature that you are implementing. This will help avoid wasted efforts and ensure that your work is incorporated into the code base.

Bug Reports

Did something go wrong with Dotbot? Sorry about that! Bug reports are greatly appreciated!

When you submit a bug report, please include relevant information such as Dotbot version, operating system, configuration file, error messages, and steps to reproduce the bug. The more details you can include, the easier it is to find and fix the bug.

Patches

Want to hack on Dotbot? Awesome!

If there are open issues, you're more than welcome to work on those - this is probably the best way to contribute to Dotbot. If you have your own ideas, that's great too! In that case, before working on substantial changes to the code base, it is highly recommended that you first open an issue describing what you intend to work on.

Patches are generally submitted as pull requests. Patches are also accepted over email.

Any changes to the code base should follow the style and coding conventions used in the rest of the project. The version history should be clean, and commit messages should be descriptive and properly formatted.

Testing

When preparing a patch, it's recommended that you add unit tests that demonstrate the bug is fixed (or that the feature works). You can run tests on your local machine using Hatch:

hatch test

If you prefer to run the tests in an isolated container using Docker, you can do so with the following:

docker run -it --rm -v "${PWD}:/dotbot" -w /dotbot python:3.13-bookworm /bin/bash

After spawning the container, install Hatch with pip install hatch, and then run the tests.

Type checking

You can run type checking with:

hatch run types:check

Formatting and linting

You can run the Ruff formatter and linter with:

hatch fmt

If you have any questions about anything, feel free to ask!