Skip to content

Commit 214def0

Browse files
authored
DOC Contributing guide update (scikit-learn#13961)
1 parent 6b811ac commit 214def0

File tree

7 files changed

+221
-254
lines changed

7 files changed

+221
-254
lines changed

CONTRIBUTING.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Contributing to scikit-learn
33
============================
44

5+
The latest contributing guide is available in the repository at
6+
`doc/developers/contributing.rst`, or online at:
7+
8+
https://scikit-learn.org/dev/developers/contributing.html
9+
510
There are many ways to contribute to scikit-learn, with the most common ones
611
being contribution of code or documentation to the project. Improving the
712
documentation is no less important than improving the library itself. If you
@@ -22,15 +27,9 @@ up" on issues that others reported and that are relevant to you. It also helps
2227
us if you spread the word: reference the project from your blog and articles,
2328
link to it from your website, or simply star it in GitHub to say "I use it".
2429

25-
Guideline
26-
---------
27-
28-
Full contribution guidelines are available in the repository at
29-
`doc/developers/contributing.rst`, or online at:
30-
31-
http://scikit-learn.org/dev/developers/contributing.html
30+
Quick links
31+
-----------
3232

33-
Quick links to:
3433
* [Submitting a bug report or feature request](http://scikit-learn.org/dev/developers/contributing.html#submitting-a-bug-report-or-a-feature-request)
3534
* [Contributing code](http://scikit-learn.org/dev/developers/contributing.html#contributing-code)
3635
* [Coding guidelines](http://scikit-learn.org/dev/developers/contributing.html#coding-guidelines)

README.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ You can check the latest sources with the command::
111111

112112
Contributing
113113
~~~~~~~~~~~~
114-
To learn more about making a contribution to scikit-learn, please view the contributing document:
115-
https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md
114+
115+
To learn more about making a contribution to scikit-learn, please see our
116+
`Contributing guide
117+
<https://scikit-learn.org/dev/developers/contributing.html>`_.
116118

117119
Testing
118120
~~~~~~~

doc/about.rst

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _about:
2+
13
About us
24
========
35

@@ -14,6 +16,11 @@ release, February the 1st 2010. Since then, several releases have appeared
1416
following a ~3 month cycle, and a thriving international community has
1517
been leading the development.
1618

19+
Governance
20+
----------
21+
The decision making process and governance structure of scikit-learn is laid
22+
out in the :ref:`governance document <governance>`.
23+
1724
Authors
1825
-------
1926

@@ -69,11 +76,6 @@ The following people have been active contributors in the past, but are no longe
6976
- Virgile Fritsch
7077
- Wei Li
7178

72-
Governance
73-
----------
74-
The decision making process and governance structure of scikit-learn is laid
75-
out in the :ref:`governance document <governance>`.
76-
7779
.. _citing-scikit-learn:
7880

7981
Citing scikit-learn

doc/developers/advanced_installation.rst

+25-65
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,26 @@ basis to help users test bleeding edge features or bug fixes::
4444
Building from source
4545
=====================
4646

47+
In the vast majority of cases, building scikit-learn for development purposes
48+
can be done with::
49+
50+
pip install cython pytest flake8
51+
52+
Then, in the main repository::
53+
54+
pip install --editable .
55+
56+
Please read below for details and more advanced instructions.
57+
58+
Dependencies
59+
------------
60+
4761
Scikit-learn requires:
4862

4963
- Python (>= 3.5),
5064
- NumPy (>= 1.11),
51-
- SciPy (>= 0.17).
65+
- SciPy (>= 0.17),
66+
- Joblib (>= 0.11).
5267

5368
.. note::
5469

@@ -93,12 +108,12 @@ If you want to build a stable version, you can ``git checkout <VERSION>``
93108
to get the code for that particular version, or download an zip archive of
94109
the version from github.
95110

96-
If you have all the build requirements installed (see below for details), you
97-
can build and install the package in the following way.
111+
Once you have all the build requirements installed (see below for details),
112+
you can build and install the package in the following way.
98113

99114
If you run the development version, it is cumbersome to reinstall the
100115
package each time you update the sources. Therefore it's recommended that you
101-
install in editable, which allows you to edit the code in-place. This
116+
install in editable mode, which allows you to edit the code in-place. This
102117
builds the extension in place and creates a link to the development directory
103118
(see `the pip docs <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>`_)::
104119

@@ -112,16 +127,16 @@ builds the extension in place and creates a link to the development directory
112127

113128
.. note::
114129

115-
If you decide to do an editable install you have to rerun::
130+
You will have to re-run::
116131

117132
pip install --editable .
118133

119-
every time the source code of a compiled extension is
120-
changed (for instance when switching branches or pulling changes from upstream).
134+
every time the source code of a compiled extension is changed (for
135+
instance when switching branches or pulling changes from upstream).
136+
Compiled extensions are Cython files (ending in `.pyx` or `.pxd`).
121137

122-
On Unix-like systems, you can simply type ``make`` in the top-level folder to
123-
build in-place and launch all the tests. Have a look at the ``Makefile`` for
124-
additional utilities.
138+
On Unix-like systems, you can equivalently type ``make in`` from the
139+
top-level folder. Have a look at the ``Makefile`` for additional utilities.
125140

126141
Mac OSX
127142
-------
@@ -284,58 +299,3 @@ build step::
284299
python setup.py build --compiler=my_compiler install
285300

286301
where ``my_compiler`` should be one of ``mingw32`` or ``msvc``.
287-
288-
289-
.. _testing:
290-
291-
Testing
292-
=======
293-
294-
Testing scikit-learn once installed
295-
-----------------------------------
296-
297-
Testing requires having `pytest <https://docs.pytest.org>`_ >=\ |PytestMinVersion|\ .
298-
Some tests also require having `pandas <https://pandas.pydata.org/>` installed.
299-
After installation, the package can be tested by executing *from outside* the
300-
source directory::
301-
302-
$ pytest sklearn
303-
304-
This should give you a lot of output (and some warnings) but
305-
eventually should finish with a message similar to::
306-
307-
=========== 8304 passed, 26 skipped, 4659 warnings in 557.76 seconds ===========
308-
309-
Otherwise, please consider posting an issue into the `GitHub issue tracker
310-
<https://github.com/scikit-learn/scikit-learn/issues>`_ or to the
311-
:ref:`mailing_lists` including the traceback of the individual failures
312-
and errors. Please include your operating system, your version of NumPy, SciPy
313-
and scikit-learn, and how you installed scikit-learn.
314-
315-
316-
Testing scikit-learn from within the source folder
317-
--------------------------------------------------
318-
319-
Scikit-learn can also be tested without having the package
320-
installed. For this you must compile the sources inplace from the
321-
source directory::
322-
323-
python setup.py build_ext --inplace
324-
325-
Test can now be run using pytest::
326-
327-
pytest sklearn
328-
329-
This is automated by the commands::
330-
331-
make in
332-
333-
and::
334-
335-
make test
336-
337-
338-
You can also install a symlink named ``site-packages/scikit-learn.egg-link``
339-
to the development folder of scikit-learn with::
340-
341-
pip install --editable .

0 commit comments

Comments
 (0)