Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 3 additions & 27 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ following rules before you submit a pull request:

- If your pull request addresses an issue, please use the pull request title
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
created.
created. Make sure the title is descriptive enough to understand what the pull request does!

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

- Add your changes to the changelog in the file doc/progress.rst.

- If any source file is being added to the repository, please add the BSD 3-Clause license to it.


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

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

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

Executing a specific unit test can be done by specifying the module, test case, and test.
To obtain a hierarchical list of all tests, run

```bash
$ pytest --collect-only

<Module 'tests/test_datasets/test_dataset.py'>
<UnitTestCase 'OpenMLDatasetTest'>
<TestCaseFunction 'test_dataset_format_constructor'>
<TestCaseFunction 'test_get_data'>
<TestCaseFunction 'test_get_data_rowid_and_ignore_and_target'>
<TestCaseFunction 'test_get_data_with_ignore_attributes'>
<TestCaseFunction 'test_get_data_with_rowid'>
<TestCaseFunction 'test_get_data_with_target'>
<UnitTestCase 'OpenMLDatasetTestOnTestServer'>
<TestCaseFunction 'test_tagging'>
```

You may then run a specific module, test case, or unit test respectively:
```bash
$ pytest tests/test_datasets/test_dataset.py
Expand Down Expand Up @@ -271,7 +247,7 @@ information.

For building the documentation, you will need to install a few additional dependencies:
```bash
$ pip install -e .[docs]
$ pip install -e .[examples,docs]
```
When dependencies are installed, run
```bash
Expand Down
6 changes: 3 additions & 3 deletions doc/progress.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
.. _progress:

=========
Changelog
Changelog (discontinued after version 0.15.0)
=========

next
~~~~~~
See GitHub releases for the latest changes.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0.15.0
~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions examples/30_extended/flows_and_runs_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
[
(
"categorical",
preprocessing.OneHotEncoder(sparse=False, handle_unknown="ignore"),
preprocessing.OneHotEncoder(handle_unknown="ignore"),
cat, # returns the categorical feature indices
),
(
Expand Down Expand Up @@ -145,7 +145,7 @@
[
(
"categorical",
preprocessing.OneHotEncoder(sparse=False, handle_unknown="ignore"),
preprocessing.OneHotEncoder(handle_unknown="ignore"),
categorical_feature_indices,
),
(
Expand Down
2 changes: 1 addition & 1 deletion examples/30_extended/run_setup_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@


cat_imp = make_pipeline(
OneHotEncoder(handle_unknown="ignore", sparse=False),
OneHotEncoder(handle_unknown="ignore"),
TruncatedSVD(),
)
cont_imp = SimpleImputer(strategy="median")
Expand Down
20 changes: 18 additions & 2 deletions examples/40_paper/2018_kdd_rijn_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

A tutorial on how to reproduce the paper *Hyperparameter Importance Across Datasets*.

This is a Unix-only tutorial, as the requirements can not be satisfied on a Windows machine (Untested on other
systems).
Example Deprecation Warning!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This example is not supported anymore by the OpenML-Python developers. The example is kept for reference purposes but not tested anymore.

Publication
~~~~~~~~~~~
Expand All @@ -14,6 +16,16 @@
| Jan N. van Rijn and Frank Hutter
| In *Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining*, 2018
| Available at https://dl.acm.org/doi/10.1145/3219819.3220058

Requirements
~~~~~~~~~~~~

This is a Unix-only tutorial, as the requirements can not be satisfied on a Windows machine (Untested on other
systems).

The following Python packages are required:

pip install openml[examples,docs] fanova ConfigSpace<1.0
"""

# License: BSD 3-Clause
Expand All @@ -26,6 +38,10 @@
)
exit()

# DEPRECATED EXAMPLE -- Avoid running this code in our CI/CD pipeline
print("This example is deprecated, remove this code to use it manually.")
exit()

import json
import fanova
import matplotlib.pyplot as plt
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ examples=[
"ipykernel",
"seaborn",
]
examples_unix=["fanova"]
docs=[
"sphinx>=3",
"sphinx-gallery",
Expand Down