Skip to content
Open
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
24 changes: 12 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Great! You've decided you want to help out. Now what?
All contributions should be linked to issues on the [GitHub issue tracker](https://github.com/openml/openml-python/issues).
In particular for new contributors, the *good first issue* label should help you find
issues which are suitable for beginners. Resolving these issues allows you to start
contributing to the project without much prior knowledge. Your assistance in this area
will be greatly appreciated by the more experienced developers as it helps free up
contributing to the project without much prior knowledge. Your assistance in this area
will be greatly appreciated by the more experienced developers as it helps free up
their time to concentrate on other issues.

If you encounter a particular part of the documentation or code that you want to improve,
Expand All @@ -39,36 +39,36 @@ This is important since you can first get feedback or pointers from experienced
To let everyone know you are working on an issue, please leave a comment that states you will work on the issue
(or, if you have the permission, *assign* yourself to the issue). This avoids double work!

## Contributing Workflow Overview
## Contributing Workflow Overview
To contribute to the openml-python package, follow these steps:

0. Determine how you want to contribute (see above).
1. Set up your local development environment.
1. Fork and clone the `openml-python` repository. Then, create a new branch from the ``main`` branch. If you are new to `git`, see our [detailed documentation](#basic-git-workflow), or rely on your favorite IDE.
1. Fork and clone the `openml-python` repository. Then, create a new branch from the ``main`` branch. If you are new to `git`, see our [detailed documentation](#basic-git-workflow), or rely on your favorite IDE.
2. [Install the local dependencies](#install-local-dependencies) to run the tests for your contribution.
3. [Test your installation](#testing-your-installation) to ensure everything is set up correctly.
4. Implement your contribution. If contributing to the documentation, see [here](#contributing-to-the-documentation).
5. [Create a pull request](#pull-request-checklist).
5. [Create a pull request](#pull-request-checklist).

### Install Local Dependencies

We recommend following the instructions below to install all requirements locally.
However, it is also possible to use the [openml-python docker image](https://github.com/openml/openml-python/blob/main/docker/readme.md) for testing and building documentation. Moreover, feel free to use any alternative package managers, such as `pip`.


1. To ensure a smooth development experience, we recommend using the `uv` package manager. Thus, first install `uv`. If any Python version already exists on your system, follow the steps below, otherwise see [here](https://docs.astral.sh/uv/getting-started/installation/).
1. To ensure a smooth development experience, we recommend using the `uv` package manager. Thus, first install `uv`. If any Python version already exists on your system, follow the steps below, otherwise see [here](https://docs.astral.sh/uv/getting-started/installation/).
```bash
pip install uv
```
2. Create a virtual environment using `uv` and activate it. This will ensure that the dependencies for `openml-python` do not interfere with other Python projects on your system.
2. Create a virtual environment using `uv` and activate it. This will ensure that the dependencies for `openml-python` do not interfere with other Python projects on your system.
```bash
uv venv --seed --python 3.8 ~/.venvs/openml-python
uv venv --seed --python 3.11 ~/.venvs/openml-python
source ~/.venvs/openml-python/bin/activate
pip install uv # Install uv within the virtual environment
```
3. Then install openml with its test dependencies by running
```bash
uv pip install -e .[test]
uv pip install -e ".[test]"
```
from the repository folder.
Then configure the pre-commit to be able to run unit tests, as well as [pre-commit](#pre-commit-details) through:
Expand Down Expand Up @@ -119,7 +119,7 @@ Drafts often benefit from the inclusion of a
[task list](https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments)
in the PR description.

---
---

# Appendix

Expand Down Expand Up @@ -157,7 +157,7 @@ local disk:
git checkout -b feature/my-feature
```

Always use a ``feature`` branch. It's good practice to never work on the ``main`` branch!
Always use a ``feature`` branch. It's good practice to never work on the ``main`` branch!
To make the nature of your pull request easily visible, please prepend the name of the branch with the type of changes you want to merge, such as ``feature`` if it contains a new feature, ``fix`` for a bugfix, ``doc`` for documentation and ``maint`` for other maintenance on the package.

4. Develop the feature on your feature branch. Add changed files using ``git add`` and then ``git commit`` files:
Expand Down Expand Up @@ -189,7 +189,7 @@ Before each commit, it will automatically run:
if the resulting code is very bloated, consider a (small) refactor.
- [mypy](https://mypy.readthedocs.io/en/stable/) a static type checker.
In particular, make sure each function you work on has type hints.

If you want to run the pre-commit tests without doing a commit, run:
```bash
$ make check
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies = [
"pyarrow",
"tqdm", # For MinIO download progress bars
]
requires-python = ">=3.10,<3.15"
requires-python = ">=3.10,<3.15"
maintainers = [
{ name = "Pieter Gijsbers", email="p.gijsbers@tue.nl"},
{ name = "Lennart Purucker"},
Expand Down Expand Up @@ -63,6 +63,8 @@ openml = "openml.cli:main"

[project.optional-dependencies]
test=[
"openml",
"minio",
"nbconvert",
"jupyter_client",
"matplotlib",
Expand All @@ -78,10 +80,8 @@ test=[
"mypy",
"ruff",
"requests-mock",
"openml-sklearn",
"packaging",
"pytest-mock",
"openml-sklearn",
]
examples=[
"matplotlib",
Expand Down
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import shutil
from pathlib import Path
import pytest
import openml_sklearn
#import openml_sklearn

import openml
from openml.testing import TestBase
Expand Down Expand Up @@ -295,11 +295,11 @@ def with_test_cache(test_files_directory, request):
openml.config.set_root_cache_directory(_root_cache_directory)
if tmp_cache.exists():
shutil.rmtree(tmp_cache)


@pytest.fixture
def static_cache_dir():
return Path(__file__).parent / "files"
return Path(__file__).parent / "files"

@pytest.fixture
def workdir(tmp_path):
Expand Down