Skip to content

Commit 26b67b3

Browse files
doc: Make Docs Work Again and Stop Progress.rst Usage (#1365)
* fix/maint: deprecate outdated examples, discounting progress.rst, and minor fixes to the tests. * doc: update wording to reflect new state
1 parent 1dc97eb commit 26b67b3

6 files changed

Lines changed: 27 additions & 36 deletions

File tree

CONTRIBUTING.md

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ following rules before you submit a pull request:
141141

142142
- If your pull request addresses an issue, please use the pull request title
143143
to describe the issue and mention the issue number in the pull request description. This will make sure a link back to the original issue is
144-
created.
144+
created. Make sure the title is descriptive enough to understand what the pull request does!
145145

146146
- An incomplete contribution -- where you expect to do more work before
147147
receiving a full review -- should be submitted as a `draft`. These may be useful
@@ -174,8 +174,6 @@ following rules before you submit a pull request:
174174
For the Bug-fixes case, at the time of the PR, this tests should fail for
175175
the code base in develop and pass for the PR code.
176176

177-
- Add your changes to the changelog in the file doc/progress.rst.
178-
179177
- If any source file is being added to the repository, please add the BSD 3-Clause license to it.
180178

181179

@@ -201,17 +199,12 @@ Make sure your code has good unittest **coverage** (at least 80%).
201199

202200
Pre-commit is used for various style checking and code formatting.
203201
Before each commit, it will automatically run:
204-
- [black](https://black.readthedocs.io/en/stable/) a code formatter.
202+
- [ruff](https://docs.astral.sh/ruff/) a code formatter and linter.
205203
This will automatically format your code.
206204
Make sure to take a second look after any formatting takes place,
207205
if the resulting code is very bloated, consider a (small) refactor.
208-
*note*: If Black reformats your code, the commit will automatically be aborted.
209-
Make sure to add the formatted files (back) to your commit after checking them.
210206
- [mypy](https://mypy.readthedocs.io/en/stable/) a static type checker.
211207
In particular, make sure each function you work on has type hints.
212-
- [flake8](https://flake8.pycqa.org/en/latest/index.html) style guide enforcement.
213-
Almost all of the black-formatted code should automatically pass this check,
214-
but make sure to make adjustments if it does fail.
215208

216209
If you want to run the pre-commit tests without doing a commit, run:
217210
```bash
@@ -224,23 +217,6 @@ $ pre-commit run --all-files
224217
Make sure to do this at least once before your first commit to check your setup works.
225218

226219
Executing a specific unit test can be done by specifying the module, test case, and test.
227-
To obtain a hierarchical list of all tests, run
228-
229-
```bash
230-
$ pytest --collect-only
231-
232-
<Module 'tests/test_datasets/test_dataset.py'>
233-
<UnitTestCase 'OpenMLDatasetTest'>
234-
<TestCaseFunction 'test_dataset_format_constructor'>
235-
<TestCaseFunction 'test_get_data'>
236-
<TestCaseFunction 'test_get_data_rowid_and_ignore_and_target'>
237-
<TestCaseFunction 'test_get_data_with_ignore_attributes'>
238-
<TestCaseFunction 'test_get_data_with_rowid'>
239-
<TestCaseFunction 'test_get_data_with_target'>
240-
<UnitTestCase 'OpenMLDatasetTestOnTestServer'>
241-
<TestCaseFunction 'test_tagging'>
242-
```
243-
244220
You may then run a specific module, test case, or unit test respectively:
245221
```bash
246222
$ pytest tests/test_datasets/test_dataset.py
@@ -271,7 +247,7 @@ information.
271247

272248
For building the documentation, you will need to install a few additional dependencies:
273249
```bash
274-
$ pip install -e .[docs]
250+
$ pip install -e .[examples,docs]
275251
```
276252
When dependencies are installed, run
277253
```bash

doc/progress.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
.. _progress:
44

55
=========
6-
Changelog
6+
Changelog (discontinued after version 0.15.0)
77
=========
88

9-
next
10-
~~~~~~
9+
See GitHub releases for the latest changes.
10+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1111

1212
0.15.0
1313
~~~~~~

examples/30_extended/flows_and_runs_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
[
102102
(
103103
"categorical",
104-
preprocessing.OneHotEncoder(sparse=False, handle_unknown="ignore"),
104+
preprocessing.OneHotEncoder(handle_unknown="ignore"),
105105
cat, # returns the categorical feature indices
106106
),
107107
(
@@ -145,7 +145,7 @@
145145
[
146146
(
147147
"categorical",
148-
preprocessing.OneHotEncoder(sparse=False, handle_unknown="ignore"),
148+
preprocessing.OneHotEncoder(handle_unknown="ignore"),
149149
categorical_feature_indices,
150150
),
151151
(

examples/30_extended/run_setup_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959

6060
cat_imp = make_pipeline(
61-
OneHotEncoder(handle_unknown="ignore", sparse=False),
61+
OneHotEncoder(handle_unknown="ignore"),
6262
TruncatedSVD(),
6363
)
6464
cont_imp = SimpleImputer(strategy="median")

examples/40_paper/2018_kdd_rijn_example.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
55
A tutorial on how to reproduce the paper *Hyperparameter Importance Across Datasets*.
66
7-
This is a Unix-only tutorial, as the requirements can not be satisfied on a Windows machine (Untested on other
8-
systems).
7+
Example Deprecation Warning!
8+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9+
10+
This example is not supported anymore by the OpenML-Python developers. The example is kept for reference purposes but not tested anymore.
911
1012
Publication
1113
~~~~~~~~~~~
@@ -14,6 +16,16 @@
1416
| Jan N. van Rijn and Frank Hutter
1517
| In *Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining*, 2018
1618
| Available at https://dl.acm.org/doi/10.1145/3219819.3220058
19+
20+
Requirements
21+
~~~~~~~~~~~~
22+
23+
This is a Unix-only tutorial, as the requirements can not be satisfied on a Windows machine (Untested on other
24+
systems).
25+
26+
The following Python packages are required:
27+
28+
pip install openml[examples,docs] fanova ConfigSpace<1.0
1729
"""
1830

1931
# License: BSD 3-Clause
@@ -26,6 +38,10 @@
2638
)
2739
exit()
2840

41+
# DEPRECATED EXAMPLE -- Avoid running this code in our CI/CD pipeline
42+
print("This example is deprecated, remove this code to use it manually.")
43+
exit()
44+
2945
import json
3046
import fanova
3147
import matplotlib.pyplot as plt

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ examples=[
8686
"ipykernel",
8787
"seaborn",
8888
]
89-
examples_unix=["fanova"]
9089
docs=[
9190
"sphinx>=3",
9291
"sphinx-gallery",

0 commit comments

Comments
 (0)