@@ -181,12 +181,12 @@ Contributing code
181
181
If in doubt about duplicated work, or if you want to work on a non-trivial
182
182
feature, it's recommended to first open an issue in
183
183
the `issue tracker <https://github.com/scikit-learn/scikit-learn/issues >`_
184
- to get some feedbacks from core developers.
185
-
186
- One easy way to find an issue to work on is by applying the "help wanted"
187
- label in your search. This lists all the issues that have been unclaimed
188
- so far. In order to claim an issue for yourself, please comment exactly
189
- ``take `` on it for the CI to automatically assign the issue to you.
184
+ to get some feedbacks from core developers.
185
+
186
+ One easy way to find an issue to work on is by applying the "help wanted"
187
+ label in your search. This lists all the issues that have been unclaimed
188
+ so far. In order to claim an issue for yourself, please comment exactly
189
+ ``take `` on it for the CI to automatically assign the issue to you.
190
190
191
191
How to contribute
192
192
-----------------
@@ -224,6 +224,8 @@ how to set up your git repository:
224
224
for more details about advanced installation, see the
225
225
:ref:`install_bleeding_edge` section.
226
226
227
+ .. _upstream :
228
+
227
229
6. Add the ``upstream `` remote. This saves a reference to the main
228
230
scikit-learn repository, which you can use to keep your repository
229
231
synchronized with the latest changes::
@@ -356,10 +358,13 @@ complies with the following rules before marking a PR as ``[MRG]``. The
356
358
non-regression tests should fail for the code base in the master branch
357
359
and pass for the PR code.
358
360
359
- 5. **Make sure that your PR does not add PEP8 violations **. On a Unix-like
360
- system, you can run `make flake8-diff `. `flake8 path_to_file `, would work
361
- for any system, but please avoid reformatting parts of the file that your
362
- pull request doesn't change, as it distracts from code review.
361
+ 5. **Make sure that your PR does not add PEP8 violations **. To check the
362
+ code that you changed, you can run the following command (see
363
+ :ref: `above <upstream >` to set up the upstream remote)::
364
+
365
+ git diff upstream/master -u -- "*.py" | flake8 --diff
366
+
367
+ or `make flake8-diff ` which should work on unix-like system.
363
368
364
369
6. Follow the :ref: `coding-guidelines `.
365
370
@@ -662,7 +667,7 @@ In general have the following in mind:
662
667
4. 1D or 2D data can be a subset of
663
668
``{array-like, ndarray, sparse matrix, dataframe} ``. Note that ``array-like ``
664
669
can also be a ``list ``, while ``ndarray `` is explicitly only a ``numpy.ndarray ``.
665
- 5. When specifying the data type of a list, use ``of `` as a delimiter:
670
+ 5. When specifying the data type of a list, use ``of `` as a delimiter:
666
671
``list of int ``.
667
672
6. When specifying the dtype of an ndarray, use e.g. ``dtype=np.int32 ``
668
673
after defining the shape:
0 commit comments