You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+64-1Lines changed: 64 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,70 @@ and including useful supporting information.
13
13
## Contributing code
14
14
Thanks for your interest in contributing code to pymc_bart!
15
15
16
-
* If this is your first time contributing to a project on GitHub, please read through our step by step guide to contributing to pymc_bart
16
+
**If this is your first time contributing to a project on GitHub, please read through our step by step guide to contributing to pymc_bart**
17
+
18
+
### Feature Branch
19
+
20
+
1. From the fork of the pymc_bart repository, create a new branch for your feature.
21
+
22
+
```bash
23
+
git checkout -b feature_branch_name
24
+
```
25
+
26
+
2. Make your changes to the code base.
27
+
28
+
3.Add and commit your changes.
29
+
30
+
```bash
31
+
git add my_modified_file.py
32
+
git commit -m "Added a new feature"
33
+
```
34
+
35
+
4. Push your changes to your fork of the pymc_bart repository.
36
+
37
+
```bash
38
+
git push origin feature_branch_name
39
+
```
40
+
41
+
### Code Style
42
+
43
+
The repository has some code style checks in place. This will happen on every commit of a pull request. If you want to run the checks locally, you can do so by running the following command from the root of the repository:
44
+
45
+
0. Create a virtual environment (optional, but strongly recommended)
46
+
47
+
1. Install pre-commit
48
+
49
+
```bash
50
+
pip install pre-commit
51
+
```
52
+
53
+
2. Set up pre-commit
54
+
55
+
```bash
56
+
pre-commit install
57
+
```
58
+
59
+
3. Run the complete pre-commit hook to check specific files:
60
+
61
+
```bash
62
+
pre-commit run --files pymc_bart/tree.py
63
+
```
64
+
65
+
or all files:
66
+
67
+
```bash
68
+
pre-commit run --all-files
69
+
```
70
+
71
+
**Once you commit something the pre-commit hook will run all the checks**!
72
+
73
+
You can skip this (for example when is WIP) by adding a flag (`-n` means no-verify)
74
+
75
+
```bash
76
+
git commit -m"my message" -n
77
+
```
78
+
79
+
**Remark:** One can, of course, install `ruff` in the Python environment to enable auto-format (for example in VS Code), but this is not strictly necessary. The specific versions of` ruff` and `mypy` must be only specified in `.pre-commit-config.yaml`. It should be the only source of truth! Hence, if you want to install them locally make sure you use the same versions (revisions `rev` in the config file) as in the config file.
17
80
18
81
### Adding new features
19
82
If you are interested in adding a new feature to pymc_bart,
0 commit comments