Skip to content

Commit 1495f69

Browse files
committed
Merge branch 'for0.21.3' into 0.21.X
2 parents 7813f7e + 08eaecc commit 1495f69

File tree

78 files changed

+1191
-561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1191
-561
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 8 deletions
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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,6 @@ Scikit-learn 0.21 and later require Python 3.5 or newer.
5858
For running the examples Matplotlib >= 1.5.1 is required. A few examples
5959
require scikit-image >= 0.12.3, a few examples require pandas >= 0.18.0.
6060

61-
scikit-learn also uses CBLAS, the C interface to the Basic Linear Algebra
62-
Subprograms library. scikit-learn comes with a reference implementation, but
63-
the system CBLAS will be detected by the build system and used if present.
64-
CBLAS exists in many implementations; see `Linear algebra libraries
65-
<http://scikit-learn.org/stable/modules/computing#linear-algebra-libraries>`_
66-
for known issues.
67-
6861
User installation
6962
~~~~~~~~~~~~~~~~~
7063

@@ -111,8 +104,10 @@ You can check the latest sources with the command::
111104

112105
Contributing
113106
~~~~~~~~~~~~
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
107+
108+
To learn more about making a contribution to scikit-learn, please see our
109+
`Contributing guide
110+
<https://scikit-learn.org/dev/developers/contributing.html>`_.
116111

117112
Testing
118113
~~~~~~~

doc/about.rst

Lines changed: 7 additions & 5 deletions
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

Lines changed: 66 additions & 100 deletions
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
-------
@@ -148,62 +163,68 @@ Then you need to set the following environment variables::
148163

149164
Finally you can build the package using the standard command.
150165

166+
FreeBSD
167+
-------
168+
169+
The clang compiler included in FreeBSD 12.0 and 11.2 base systems does not
170+
include OpenMP support. You need to install the `openmp` library from packages
171+
(or ports)::
172+
173+
sudo pkg install openmp
174+
175+
This will install header files in ``/usr/local/include`` and libs in
176+
``/usr/local/lib``. Since these directories are not searched by default, you
177+
can set the environment variables to these locations::
178+
179+
export CFLAGS="$CFLAGS -I/usr/local/include"
180+
export CXXFLAGS="$CXXFLAGS -I/usr/local/include"
181+
export LDFLAGS="$LDFLAGS -L/usr/local/lib -lomp"
182+
export DYLD_LIBRARY_PATH=/usr/local/lib
183+
184+
Finally you can build the package using the standard command.
185+
186+
For the upcomming FreeBSD 12.1 and 11.3 versions, OpenMP will be included in
187+
the base system and these steps will not be necessary.
188+
189+
151190
Installing build dependencies
152191
=============================
153192

154193
Linux
155194
-----
156195

157-
Installing from source requires you to have installed the scikit-learn runtime
158-
dependencies, Python development headers and a working C/C++ compiler.
159-
Under Debian-based operating systems, which include Ubuntu::
196+
Installing from source without conda requires you to have installed the
197+
scikit-learn runtime dependencies, Python development headers and a working
198+
C/C++ compiler. Under Debian-based operating systems, which include Ubuntu::
160199

161200
sudo apt-get install build-essential python3-dev python3-setuptools \
162-
python3-numpy python3-scipy \
163-
libatlas-dev libatlas3-base
164-
165-
On recent Debian and Ubuntu (e.g. Ubuntu 14.04 or later) make sure that ATLAS
166-
is used to provide the implementation of the BLAS and LAPACK linear algebra
167-
routines::
201+
python3-pip
202+
203+
and then::
168204

169-
sudo update-alternatives --set libblas.so.3 \
170-
/usr/lib/atlas-base/atlas/libblas.so.3
171-
sudo update-alternatives --set liblapack.so.3 \
172-
/usr/lib/atlas-base/atlas/liblapack.so.3
205+
pip3 install numpy scipy cython
173206

174207
.. note::
175208

176209
In order to build the documentation and run the example code contains in
177210
this documentation you will need matplotlib::
178211

179-
sudo apt-get install python-matplotlib
180-
181-
.. note::
182-
183-
The above installs the ATLAS implementation of BLAS
184-
(the Basic Linear Algebra Subprograms library).
185-
Ubuntu 11.10 and later, and recent (testing) versions of Debian,
186-
offer an alternative implementation called OpenBLAS.
187-
188-
Using OpenBLAS can give speedups in some scikit-learn modules,
189-
but can freeze joblib/multiprocessing prior to OpenBLAS version 0.2.8-4,
190-
so using it is not recommended unless you know what you're doing.
212+
pip3 install matplotlib
191213

192-
If you do want to use OpenBLAS, then replacing ATLAS only requires a couple
193-
of commands. ATLAS has to be removed, otherwise NumPy may not work::
214+
When precompiled wheels are not avalaible for your architecture, you can
215+
install the system versions::
194216

195-
sudo apt-get remove libatlas3gf-base libatlas-dev
196-
sudo apt-get install libopenblas-dev
197-
198-
sudo update-alternatives --set libblas.so.3 \
199-
/usr/lib/openblas-base/libopenblas.so.0
200-
sudo update-alternatives --set liblapack.so.3 \
201-
/usr/lib/lapack/liblapack.so.3
217+
sudo apt-get install cython3 python3-numpy python3-scipy python3-matplotlib
202218

203219
On Red Hat and clones (e.g. CentOS), install the dependencies using::
204220

205-
sudo yum -y install gcc gcc-c++ numpy python-devel scipy
221+
sudo yum -y install gcc gcc-c++ python-devel numpy scipy
222+
223+
.. note::
206224

225+
To use a high performance BLAS library (e.g. OpenBlas) see
226+
`scipy installation instructions
227+
<https://docs.scipy.org/doc/scipy/reference/building/linux.html>`_.
207228

208229
Windows
209230
-------
@@ -260,58 +281,3 @@ build step::
260281
python setup.py build --compiler=my_compiler install
261282

262283
where ``my_compiler`` should be one of ``mingw32`` or ``msvc``.
263-
264-
265-
.. _testing:
266-
267-
Testing
268-
=======
269-
270-
Testing scikit-learn once installed
271-
-----------------------------------
272-
273-
Testing requires having `pytest <https://docs.pytest.org>`_ >=\ |PytestMinVersion|\ .
274-
Some tests also require having `pandas <https://pandas.pydata.org/>` installed.
275-
After installation, the package can be tested by executing *from outside* the
276-
source directory::
277-
278-
$ pytest sklearn
279-
280-
This should give you a lot of output (and some warnings) but
281-
eventually should finish with a message similar to::
282-
283-
=========== 8304 passed, 26 skipped, 4659 warnings in 557.76 seconds ===========
284-
285-
Otherwise, please consider posting an issue into the `GitHub issue tracker
286-
<https://github.com/scikit-learn/scikit-learn/issues>`_ or to the
287-
:ref:`mailing_lists` including the traceback of the individual failures
288-
and errors. Please include your operating system, your version of NumPy, SciPy
289-
and scikit-learn, and how you installed scikit-learn.
290-
291-
292-
Testing scikit-learn from within the source folder
293-
--------------------------------------------------
294-
295-
Scikit-learn can also be tested without having the package
296-
installed. For this you must compile the sources inplace from the
297-
source directory::
298-
299-
python setup.py build_ext --inplace
300-
301-
Test can now be run using pytest::
302-
303-
pytest sklearn
304-
305-
This is automated by the commands::
306-
307-
make in
308-
309-
and::
310-
311-
make test
312-
313-
314-
You can also install a symlink named ``site-packages/scikit-learn.egg-link``
315-
to the development folder of scikit-learn with::
316-
317-
pip install --editable .

0 commit comments

Comments
 (0)