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.rst
+12-7Lines changed: 12 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,11 @@ Alternatively, you can locally install patches like this::
36
36
pip install -e .[dev]
37
37
# for usage without virtualenv, add --user
38
38
39
+
Please install pre-commit locally to run the linters before committing::
40
+
41
+
pipx install pre-commit
42
+
pre-commit install
43
+
39
44
Pull requests
40
45
-------------
41
46
@@ -66,9 +71,9 @@ You can test your changes under your local python environment by running the tes
66
71
pytest
67
72
# lint the code
68
73
pylint cpplint.py
69
-
flake8
74
+
pre-commit run --all-files
70
75
71
-
Alternatively, you can run `tox` to automatically run all tests and lints. Use `-e ` followed by the python runner and version (which you must have installed) to automatically generate the testing environment and run the above tests and lints in it. For example, `tox -e py39` does the steps in Python 3.9, `tox -e py312` does the steps in Python 3.12, and `tox -e pypy3` does the steps using the latest version of the pypy interpreter.
76
+
Alternatively, you can run `tox` to automatically run all tests and lints. Use `-e ` followed by the python runner and version (which you must have installed) to automatically generate the testing environment and run the above tests and lints in it. For example, `tox -e py39` does the steps in Python 3.9, `tox -e py313` does the steps in Python 3.13, and `tox -e pypy3` does the steps using the latest version of the pypy interpreter.
72
77
73
78
Releasing
74
79
=========
@@ -116,14 +121,14 @@ To incorporate google's changes:
116
121
git fetch google gh-pages
117
122
118
123
## Merge workflow (clean, no new commits)
119
-
git checkout master -b updates
124
+
git checkout develop -b updates
120
125
git merge google/gh-pages # this will have a lot of conflicts
121
126
# ... solve conflicts
122
127
git merge -- continue
123
128
124
129
## Rebase workflow (dirty, creates new commits)
125
130
git checkout -b updates FETCH_HEAD
126
-
git rebase master# this will have a lot of conflicts, most of which can be solved with the next command (run repeatedly)
131
+
git rebase develop# this will have a lot of conflicts, most of which can be solved with the next command (run repeatedly)
127
132
# solve conflicts with files deleted in our fork (this is idempotent and safe to be called. when cpplint.py has conflicts, it will do nothing)
128
133
git status | grep 'new file:'| awk '{print $3}'| xargs -r git rm --cached ; git status | grep 'deleted by us'| awk '{print $4}'| xargs -r git rm
129
134
git status --untracked-files=no | grep 'nothing to commit'&& git rebase --skip
@@ -132,7 +137,7 @@ To incorporate google's changes:
132
137
# check github action
133
138
git push origin --delete updates
134
139
135
-
git rebase updates master
140
+
git rebase updates develop
136
141
git branch -D updates
137
142
git push
138
143
@@ -156,5 +161,5 @@ To compare this for with upstream (after git fetch):
0 commit comments