8000 MAINT Clean-up more unused Makefile targets (#29296) · jeremiedbb/scikit-learn@69b482c · GitHub
[go: up one dir, main page]

Skip to content

Commit 69b482c

Browse files
authored
MAINT Clean-up more unused Makefile targets (scikit-learn#29296)
1 parent 7c5f13b commit 69b482c

File tree

3 files changed

+24
-50
lines changed

3 files changed

+24
-50
lines changed

Makefile

Lines changed: 17 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,30 @@
11
# simple makefile to simplify repetitive build env management tasks under posix
22

3-
# caution: testing won't work on windows, see README
4-
53
PYTHON ?= python
6-
CYTHON ?= cython
7-
PYTEST ?= pytest
84

9-
# skip doctests on 32bit python
10-
BITS := $(shell python -c 'import struct; print(8 * struct.calcsize("P"))')
5+
all:
6+
@echo "Please use 'make <target>' where <target> is one of"
7+
@echo " dev build scikit-learn with Meson"
8+
@echo " clean clean scikit-learn Meson build. Very rarely needed,"
9+
@echo " one use case is when switching back to setuptools"
10+
@echo " dev-setuptools build scikit-learn with setuptools (deprecated)"
11+
@echo " clean-setuptools clean scikit-learn setuptools build (deprecated)"
1112

12-
all: clean inplace test
13+
.PHONY: all
1314

14-
clean:
15-
$(PYTHON) setup.py clean
16-
rm -rf dist
17-
18-
in: inplace # just a shortcut
19-
inplace:
20-
$(PYTHON) setup.py build_ext -i
15+
dev: dev-meson
2116

2217
dev-meson:
2318
pip install --verbose --no-build-isolation --editable . --check-build-dependencies --config-settings editable-verbose=true
2419

20+
clean: clean-meson
21+
2522
clean-meson:
2623
pip uninstall -y scikit-learn
2724

28-
test-code: in
29-
$(PYTEST) --showlocals -v sklearn --durations=20
30-
test-sphinxext:
31-
$(PYTEST) --showlocals -v doc/sphinxext/
32-
test-doc:
33-
ifeq ($(BITS),64)
34-
$(PYTEST) $(shell find doc -name '*.rst' | sort)
35-
endif
36-
test-code-parallel: in
37-
$(PYTEST) -n auto --showlocals -v sklearn --durations=20
38-
39-
test-coverage:
40-
rm -rf coverage .coverage
41-
$(PYTEST) sklearn --showlocals -v --cov=sklearn --cov-report=html:coverage
42-
test-coverage-parallel:
43-
rm -rf coverage .coverage .coverage.*
44-
$(PYTEST) sklearn -n auto --showlocals -v --cov=sklearn --cov-report=html:coverage
45-
46-
test: test-code test-sphinxext test-doc
47-
48-
cython:
49-
python setup.py build_src
50-
51-
doc: inplace
52-
$(MAKE) -C doc html
53-
54-
doc-noplot: inplace
55-
$(MAKE) -C doc html-noplot
25+
dev-setuptools:
26+
$(PYTHON) setup.py build_ext -i
27+
28+
clean-setuptools:
29+
$(PYTHON) setup.py clean
30+
rm -rf dist

build_tools/azure/test_docs.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#!/bin/bash
22

3-
set -e
3+
set -ex
44

5-
if [[ "$DISTRIB" =~ ^conda.* ]]; then
6-
source activate $VIRTUALENV
7-
elif [[ "$DISTRIB" == "ubuntu" || "$DISTRIB" == "pip-free-threaded" ]]; then
8-
source $VIRTUALENV/bin/activate
9-
fi
5+
source build_tools/shared.sh
6+
activate_environment
107

11-
make test-doc
8+
# XXX: for some unknown reason python -m pytest fails here in the CI, can't
9+
# reproduce locally and not worth spending time on this
10+
pytest $(find doc -name '*.rst' | sort)

doc/developers/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ We expect code coverage of new features to be at least around 90%.
10161016
To test code coverage, you need to install the `coverage
10171017
<https://pypi.org/project/coverage/>`_ package in addition to `pytest`.
10181018

1019-
1. Run `make test-coverage`. The output lists for each file the line
1019+
1. Run `pytest --cov sklearn /path/to/tests`. The output lists for each file the line
10201020
numbers that are not tested.
10211021

10221022
2. Find a low hanging fruit, looking at which lines are not tested,

0 commit comments

Comments
 (0)
0