diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d194525ef..bcecd1bac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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, @@ -39,16 +39,16 @@ 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 @@ -56,19 +56,19 @@ We recommend following the instructions below to install all requirements locall 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: @@ -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 @@ -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: @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 47013271d..e747dc43c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"}, @@ -63,6 +63,8 @@ openml = "openml.cli:main" [project.optional-dependencies] test=[ + "openml", + "minio", "nbconvert", "jupyter_client", "matplotlib", @@ -78,10 +80,8 @@ test=[ "mypy", "ruff", "requests-mock", - "openml-sklearn", "packaging", "pytest-mock", - "openml-sklearn", ] examples=[ "matplotlib", diff --git a/tests/conftest.py b/tests/conftest.py index 2a7a6dcc7..c4c84eaf3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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 @@ -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):