Skip to content

Commit 108fcc1

Browse files
committed
include git pre-hook setup instructions in CONTRIBUTING.md
1 parent 28d61a3 commit 108fcc1

File tree

1 file changed

+43
-23
lines changed

1 file changed

+43
-23
lines changed

CONTRIBUTING.md

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,64 @@
11
# Contributing to automatminer
2+
23
We love your input! We want to make contributing to automatminer as easy and transparent as possible, whether it's:
3-
* Reporting a bug
4-
* Discussing the current state of the code
5-
* Submitting a fix
6-
* Proposing or implementing new features
7-
* Becoming a maintainer
4+
5+
- Reporting a bug
6+
- Discussing the current state of the code
7+
- Submitting a fix
8+
- Proposing or implementing new features
9+
- Becoming a maintainer
810

911
## Reporting bugs, getting help, and discussion
12+
1013
At any time, feel free to start a thread on the automatminer [Discourse forum](https://hackingmaterials.discourse.group/c/matminer/automatminer).
1114

1215
If you are making a bug report, incorporate as many elements of the following as possible to ensure a timely response and avoid the need for followups:
13-
* A quick summary and/or background
14-
* Steps to reproduce - be specific! **Provide sample code.**
15-
* What you expected would happen, compared to what actually happens
16-
* The full stack trace of any errors you encounter
17-
* Notes (possibly including why you think this might be happening, or steps you tried that didn't work)
16+
17+
- A quick summary and/or background
18+
- Steps to reproduce - be specific! **Provide sample code.**
19+
- What you expected would happen, compared to what actually happens
20+
- The full stack trace of any errors you encounter
21+
- Notes (possibly including why you think this might be happening, or steps you tried that didn't work)
1822

1923
We love thorough bug reports as this means the development team can make quick and meaningful fixes. When we confirm your bug report, we'll move it to the GitHub issues where its progress can be further tracked.
2024

21-
## Contributing code modifications or additions through Github
22-
We use github to host code, to track issues and feature requests, as well as accept pull requests.
25+
## Contributing code modifications or additions through GitHub
26+
27+
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
2328

24-
Pull requests are the best way to propose changes to the codebase. Follow the [Github flow](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow) for more information on this procedure.
29+
Pull requests are the best way to propose changes to the codebase. Follow the [GitHub flow](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow) for more information on this procedure.
2530

2631
The basic procedure for making a PR is:
27-
* Fork the repo and create your branch from master.
28-
* Commit your improvements to your branch and push to your Github fork (repo).
29-
* When you're finished, go to your fork and make a Pull Request. It will automatically update if you need to make further changes.
32+
33+
- Fork the repo on GitHub and clone it to your machine.
34+
35+
```sh
36+
git clone https://github.com/<your_github_name>/automatminer
37+
```
38+
39+
- Install both regular and development dependencies and setup the `git` pre-commit hook.
40+
41+
```sh
42+
pip install -r requirements.txt requirement && pre-commit install
43+
```
44+
45+
This step is important as your changes may otherwise contain style violations that will throw errors when running our CI on your pull request.
46+
- Commit your improvements and push to your GitHub fork.
47+
- When you're finished, go to your fork and make a pull request. It will automatically update if you need to make further changes.
3048

3149
### How to Make a **Great** Pull Request
50+
3251
We have a few tips for writing good PRs that are accepted into the main repo:
3352

34-
* Use the Google Code style for all of your code. Find an example [here.](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html)
35-
* Your code should have (4) spaces instead of tabs.
36-
* If needed, update the documentation.
37-
* **Write tests** for new features! Good tests are 100%, absolutely necessary for good code. We use the python `unittest` framework -- see some of the other tests in this repo for examples, or review the [Hitchhiker's guide to python](https://docs.python-guide.org/writing/tests/) for some good resources on writing good tests.
38-
* Understand your contributions will fall under the same license as this repo.
53+
- Use the Google Code style for all of your code. Find an example [here.](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html)
54+
- Your code should have (4) spaces instead of tabs.
55+
- If needed, update the documentation.
56+
- **Write tests** for new features! Good tests are 100%, absolutely necessary for good code. We use the python `unittest` framework -- see some of the other tests in this repo for examples, or review the [Hitchhiker's guide to python](https://docs.python-guide.org/writing/tests/) for some good resources on writing good tests.
57+
- Understand your contributions will fall under the same license as this repo.
3958

40-
When you submit your PR, our CI service will automatically run your tests.
59+
When you submit your PR, our CI service will automatically run your tests.
4160
We welcome good discussion on the best ways to write your code, and the comments on your PR are an excellent area for discussion.
4261

4362
#### References
44-
This document was adapted from the open-source contribution guidelines for Facebook's Draft, as well as briandk's [contribution template](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62).
63+
64+
This document was adapted from the open-source contribution guidelines for Facebook's Draft, as well as briandk's [contribution template](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62).

0 commit comments

Comments
 (0)