Repository: deephyper/deephyper (language: python)

Issue:
Transition package setup to toml
- [x] add`install_requires` of current `setup.py` to `pyproject.toml`.
- [x] add `extras_require` of current `setup.py` to `pyproject.toml` but ignore `EXTRAS["default"]`.
- [x] add `ruff` configuration to `pyproject.toml`.
- [x] add `pytest.ini` to `pyproject.toml`.
- [x] suggest a way to replace the current `Command`s of the `setup.py`
- [ ] consider updating coverage execution
- [x] replace steps 9-11 on [documentation page](https://deephyper.readthedocs.io/en/latest/developer_guides/build_and_release.html) with [source file](https://github.com/deephyper/deephyper/blob/develop/docs/developer_guides/build_and_release.rst)


Discussion / hints:

Fix patch:
diff --git a/MANIFEST.in b/MANIFEST.in
deleted file mode 100644
index 1d0fea5c2..000000000
--- a/MANIFEST.in
+++ /dev/null
@@ -1,3 +0,0 @@
-include README.md LICENSE.md
-recursive-include deephyper *.tmpl
-recursive-include deephyper *.ipynb
\ No newline at end of file
diff --git a/deephyper/__version__.py b/deephyper/__version__.py
deleted file mode 100644
index bb7e93a2f..000000000
--- a/deephyper/__version__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-VERSION = (0, 8, 1)
-
-__version__ = ".".join(map(str, VERSION))
-
-# alpha/beta/rc tags
-__version_suffix__ = ""
diff --git a/docs/developer_guides/build_and_release.rst b/docs/developer_guides/build_and_release.rst
index a8cd27289..1103a5a66 100644
--- a/docs/developer_guides/build_and_release.rst
+++ b/docs/developer_guides/build_and_release.rst
@@ -43,10 +43,12 @@ Then,
 
 **For final release only**:
 
-9. build and publish the wheel to `https://test.pypi.org/`: `python setup.py testupload`
+Follow the instructions in the `Python Packaging User Guide <https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives>`_ to build and publish the package to PyPI.
 
-10. try to install the wheel upload to Test PyPI: `python setup.py testinstall`
+9. Remove old builds that may be in the project root directory with ``rm -rf dist``.
 
-11. build and publish the wheel to `https://pypi.org/`: `python setup.py upload`
+10. Install the latest version of build and twine with ``pip install --upgrade build twine``.
 
-12. try to install the wheel upload to PyPI: `pip install deephyper==$VERSION`
+11. Build the package with ``python -m build``.
+
+12. Upload the built package to PyPI using ``twine upload dist/*``.
diff --git a/pyproject.toml b/pyproject.toml
index 9175a45ba..e8c1a532d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,7 +1,108 @@
 [build-system]
-# Minimum requirements for the build system to execute.
-requires = [
-    "setuptools>=42", 
-    "wheel",
-    "Cython>=0.29.24",
+requires = ["hatchling"]
+build-backend = "hatchling.build"
+
+[project]
+name = "deephyper"
+dynamic = ["version"]
+dependencies = [
+    "ConfigSpace>=1.1.1",
+    "dm-tree",
+    "Jinja2>=3.1.4",
+    "matplotlib",
+    "numpy>=1.26.0",
+    "pandas>=0.24.2",
+    "packaging",
+    "parse",
+    "scikit-learn>=0.23.1",
+    "scipy>=1.10",
+    "tqdm>=4.64.0",
+    "psutil",
+    "pymoo>=0.6.0",
+    "pyyaml"
+]
+requires-python = ">=3.10"
+authors = [
+    {name = "Prasanna Balaprakash", email = "pbalapra@ornl.gov"},
+    {name = "Romain Egele", email = "romainegele@gmail.com"},
+    {name = "Misha Salim"},
+    {name = "Romit Maulik"},
+    {name = "Venkat Vishwanath"},
+    {name = "Stefan Wild"}
+]
+maintainers = [{name = "Prasanna Balaprakash", email = "pbalapra@ornl.gov"}]
+description = "Scalable asynchronous neural architecture and hyperparameter search for deep neural networks"
+readme = "README.md"
+license = {file = "LICENSE.md"}
+classifiers = [
+    "Development Status :: 3 - Alpha",
+    "Programming Language :: Python",
+    "Programming Language :: Python :: 3",
+    "Programming Language :: Python :: 3.10",
+    "Programming Language :: Python :: 3.11",
+    "Programming Language :: Python :: 3.12",
+    "Programming Language :: Python :: 3.13"
+]
+
+[project.optional-dependencies]
+jax-cpu = ["jax[cpu]>=0.3.25", "numpyro[cpu]"]
+jax-cuda = ["jax[cuda]>=0.3.25", "numpyro[cuda]"]
+tf-keras2 = ["tensorflow~=2.17.0", "tensorflow_probability~=0.24.0", "tf-keras~=2.17.0"]
+torch = ["torch>=2.0.0"]
+hpo-tl = ["sdv~=1.15.0"]
+mpi = ["mpi4py>=3.1.3"]
+ray = ["ray[default]>=1.3.0"]
+redis = ["redis"]
+redis-hiredis = ["redis[hiredis]"]
+core = [
+    "deephyper[tf-keras2]",
+    "deephyper[torch]",
+    "deephyper[hpo-tl]",
+    "deephyper[jax-cpu]"
+]
+dev = [
+    "pytest",
+    "tox",
+    "twine",
+    "ruff",
+    "rstcheck",
+    "GitPython",
+    "ipython",
+    "nbsphinx",
+    "sphinx>=5",
+    "sphinx-book-theme==1.1.3",
+    "pydata-sphinx-theme==0.15.4",
+    "sphinx-copybutton",
+    "sphinx-gallery",
+    "sphinx_lfs_content",
+    "sphinx-togglebutton"
+]
+
+[project.scripts]
+deephyper = "deephyper.core.cli._cli:main"
+
+[project.urls]
+Documentation = "http://deephyper.readthedocs.io"
+Changes = "https://github.com/deephyper/deephyper/releases"
+Forum = "https://github.com/deephyper/deephyper/discussions"
+GitHub = "https://github.com/deephyper/deephyper"
+Issues = "https://github.com/deephyper/deephyper/issues"
+
+[tool.hatch.version]
+path = "src/deephyper/__version__.py"
+
+[tool.pytest.ini_options]
+addopts = "--doctest-modules --ignore=deephyper/evaluator --ignore=tests/skopt"
+norecursedirs = ".git _build docs"
+filterwarnings = "ignore:The objective has been evaluated at this point before.:UserWarning"
+markers = [
+    "fast: marks to define a fast test",
+    "slow: marks to define a slow test",
+    "torch: marks to define a test that requires torch installed",
+    "tf_keras2: marks to define a test that requires tf-keras~=2 installed",
+    "ray: marks tests which needs Ray installed",
+    "mpi: marks tests which needs mpi4py and MPI installed",
+    "redis: marks tests which needs Redis installed",
+    "jax: marks tests which needs JAX installed",
+    "sdv: marks tests which needs SDV installed"
 ]
diff --git a/setup.cfg b/setup.cfg
deleted file mode 100644
index 4ff081b42..000000000
--- a/setup.cfg
+++ /dev/null
@@ -1,41 +0,0 @@
-[metadata]
-name = deephyper
-version = attr: deephyper.__version__
-url = https://github.com/deephyper
-project_urls =
-    Documentation = http://deephyper.readthedocs.io
-    Changes = https://github.com/deephyper/deephyper/releases
-    Source Code = https://github.com/deephyper/deephyper
-    Issue Tracker = https://github.com/deephyper/deephyper/issues
-    Discussion = https://github.com/deephyper/deephyper/discussions
-license = BSD 3-clause
-license_files = LICENSE.md
-author =  Prasanna Balaprakash <pbalapra@ornl.gov>, Romain Egele <romainegele@gmail.com>, Misha Salim, Romit Maulik, Venkat Vishwanath, Stefan Wild
-maintainer = Prasanna Balaprakash
-maintainer_email = pbalapra@ornl.gov
-description = Scalable asynchronous neural architecture and hyperparameter search for deep neural networks.
-long_description = file: README.md
-long_description_content_type = text/markdown
-classifiers =
-    Development Status :: 3 - Alpha
-    Programming Language :: Python
-    Programming Language :: Python :: 3
-    Programming Language :: Python :: 3.10
-    Programming Language :: Python :: 3.11
-    Programming Language :: Python :: 3.12
-    Programming Language :: Python :: 3.13
-
-[options]
-packages = find:
-include_package_data = true
-python_requires = >=3.10
-
-[options.packages.find]
-exclude =
-    docs
-    install
-    tests
-
-[options.entry_points]
-console_scripts =
-    deephyper = deephyper.core.cli._cli:main
diff --git a/setup.py b/setup.py
deleted file mode 100644
index 9ce51cf13..000000000
--- a/setup.py
+++ /dev/null
@@ -1,199 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-# Note: To use the 'upload' functionality of this file, you must:
-#   $ pip install twine
-
-import os
-import platform
-import sys
-from shutil import rmtree
-
-from setuptools import Command, setup
-
-# path of the directory where this file is located
-here = os.path.abspath(os.path.dirname(__file__))
-
-# query platform informations, e.g. 'macOS-12.0.1-arm64-arm-64bit'
-platform_infos = platform.platform()
-
-
-# What packages are required for this module to be executed?
-REQUIRED = [
-    "ConfigSpace>=1.1.1",
-    "dm-tree",
-    "Jinja2>=3.1.4",  # Related to security vulnerability: https://security.snyk.io/vuln/SNYK-PYTHON-JINJA2-6809379
-    "matplotlib",
-    "numpy>=1.26.0",
-    "pandas>=0.24.2",
-    "packaging",
-    "parse",
-    "scikit-learn>=0.23.1",
-    "scipy>=1.10",
-    "tqdm>=4.64.0",
-    "psutil",
-    "pymoo>=0.6.0",
-    "pyyaml",
-]
-
-
-# !Requirements for tensorflow with keras 2
-REQUIRED_TF_KERAS_2 = [
-    "tensorflow~=2.17.0",
-    "tensorflow_probability~=0.24.0",
-    "tf-keras~=2.17.0",
-]
-
-# !Requirements for torch
-REQUIRED_TORCH = ["torch>=2.0.0"]
-
-
-# !Transfer Learning for Bayesian Optimization with SVD
-REQUIRED_TL_SDV = ["sdv~=1.15.0"]
-
-
-# What packages are optional?
-EXTRAS = {
-    "jax-cpu": ["jax[cpu]>=0.3.25", "numpyro[cpu]"],
-    "jax-cuda": ["jax[cuda]>=0.3.25", "numpyro[cuda]"],
-    "tf-keras2": REQUIRED_TF_KERAS_2,
-    "torch": REQUIRED_TORCH,
-    "hpo-tl": REQUIRED_TL_SDV,  # Transfer Learning for bayesian optimization,
-    "mpi": ["mpi4py>=3.1.3"],
-    "ray": ["ray[default]>=1.3.0"],
-    "redis": ["redis"],
-    "redis-hiredis": ["redis[hiredis]"],
-    "dev": [
-        # Test
-        "pytest",
-        "tox",
-        # Packaging
-        "twine",
-        # Formatter and Linter
-        "ruff",
-        "rstcheck",
-        # Documentation
-        "GitPython",
-        "ipython",
-        "nbsphinx",
-        "sphinx>=5",
-        "sphinx-book-theme==1.1.3",
-        "pydata-sphinx-theme==0.15.4",
-        "sphinx-copybutton",
-        "sphinx-gallery",
-        "sphinx_lfs_content",  # Try to not use lfs anymore
-        "sphinx-togglebutton",
-    ],
-}
-
-# Default dependencies for DeepHyper
-DEFAULT_DEPENDENCIES = REQUIRED[:]
-DEFAULT_DEPENDENCIES += EXTRAS["tf-keras2"]
-DEFAULT_DEPENDENCIES += EXTRAS["torch"]
-DEFAULT_DEPENDENCIES += EXTRAS["hpo-tl"]
-DEFAULT_DEPENDENCIES += EXTRAS["jax-cpu"]
-EXTRAS["default"] = DEFAULT_DEPENDENCIES
-
-# Useful commands to build/upload the wheel to PyPI
-
-
-class UploadCommand(Command):
-    """Support setup.py upload."""
-
-    description = "Build and publish the package."
-    user_options = []
-
-    @staticmethod
-    def status(s):
-        """Prints things in bold."""
-        print("\033[1m{0}\033[0m".format(s))
-
-    def initialize_options(self):
-        pass
-
-    def finalize_options(self):
-        pass
-
-    def run(self):
-        try:
-            self.status("Removing previous builds…")
-            rmtree(os.path.join(here, "dist"))
-        except OSError:
-            pass
-
-        self.status("Building Source and Wheel (universal) distribution…")
-        os.system("{0} setup.py sdist bdist_wheel --universal".format(sys.executable))
-
-        self.status("Uploading the package to PyPI via Twine…")
-        os.system("twine upload dist/*")
-
-        sys.exit()
-
-
-class TestUploadCommand(Command):
-    """Support setup.py testupload."""
-
-    description = "Build and publish the package to test.pypi."
-    user_options = []
-
-    @staticmethod
-    def status(s):
-        """Prints things in bold."""
-        print("\033[1m{0}\033[0m".format(s))
-
-    def initialize_options(self):
-        pass
-
-    def finalize_options(self):
-        pass
-
-    def run(self):
-        try:
-            self.status("Removing previous builds…")
-            rmtree(os.path.join(here, "dist"))
-        except OSError:
-            pass
-
-        self.status("Building Source and Wheel (universal) distribution…")
-        os.system("{0} setup.py sdist bdist_wheel --universal".format(sys.executable))
-
-        self.status("Uploading the package to PyPI via Twine…")
-        os.system("twine upload --repository-url https://test.pypi.org/legacy/ dist/*")
-
-        sys.exit()
-
-
-class TestInstallCommand(Command):
-    """Support setup.py testinstall"""
-
-    description = "Install deephyper from TestPyPI."
-    user_options = []
-
-    @staticmethod
-    def status(s):
-        """Prints things in bold."""
-        print("\033[1m{0}\033[0m".format(s))
-
-    def initialize_options(self):
-        pass
-
-    def finalize_options(self):
-        pass
-
-    def run(self):
-        self.status("Downloading the package from Test PyPI and installing it")
-        os.system("pip install --index-url https://test.pypi.org/simple/ deephyper")
-
-        sys.exit()
-
-
-# Where the magic happens:
-setup(
-    install_requires=REQUIRED,
-    extras_require=EXTRAS,
-    cmdclass={
-        "upload": UploadCommand,
-        "testupload": TestUploadCommand,
-        "testinstall": TestInstallCommand,
-    },
-)
diff --git a/deephyper/__init__.py b/src/deephyper/__init__.py
similarity index 100%
rename from deephyper/__init__.py
rename to src/deephyper/__init__.py
diff --git a/src/deephyper/__version__.py b/src/deephyper/__version__.py
new file mode 100644
index 000000000..c748d0b3c
--- /dev/null
+++ b/src/deephyper/__version__.py
@@ -0,0 +1,6 @@
+"""Define version number for the package."""
+
+__version__ = "0.8.1"
+
+# alpha/beta/rc tags
+__version_suffix__ = ""
diff --git a/deephyper/analysis/__init__.py b/src/deephyper/analysis/__init__.py
similarity index 100%
rename from deephyper/analysis/__init__.py
rename to src/deephyper/analysis/__init__.py
diff --git a/deephyper/analysis/_matplotlib.py b/src/deephyper/analysis/_matplotlib.py
similarity index 100%
rename from deephyper/analysis/_matplotlib.py
rename to src/deephyper/analysis/_matplotlib.py
diff --git a/deephyper/analysis/_rank.py b/src/deephyper/analysis/_rank.py
similarity index 100%
rename from deephyper/analysis/_rank.py
rename to src/deephyper/analysis/_rank.py
diff --git a/deephyper/analysis/hpo/__init__.py b/src/deephyper/analysis/hpo/__init__.py
similarity index 100%
rename from deephyper/analysis/hpo/__init__.py
rename to src/deephyper/analysis/hpo/__init__.py
diff --git a/deephyper/analysis/hpo/_hpo.py b/src/deephyper/analysis/hpo/_hpo.py
similarity index 100%
rename from deephyper/analysis/hpo/_hpo.py
rename to src/deephyper/analysis/hpo/_hpo.py
diff --git a/deephyper/analysis/hpo/_paxplot.py b/src/deephyper/analysis/hpo/_paxplot.py
similarity index 100%
rename from deephyper/analysis/hpo/_paxplot.py
rename to src/deephyper/analysis/hpo/_paxplot.py
diff --git a/deephyper/core/__init__.py b/src/deephyper/core/__init__.py
similarity index 100%
rename from deephyper/core/__init__.py
rename to src/deephyper/core/__init__.py
diff --git a/deephyper/core/cli/__init__.py b/src/deephyper/core/cli/__init__.py
similarity index 100%
rename from deephyper/core/cli/__init__.py
rename to src/deephyper/core/cli/__init__.py
diff --git a/deephyper/core/cli/_cli.py b/src/deephyper/core/cli/_cli.py
similarity index 100%
rename from deephyper/core/cli/_cli.py
rename to src/deephyper/core/cli/_cli.py
diff --git a/deephyper/core/cli/_hps.py b/src/deephyper/core/cli/_hps.py
similarity index 100%
rename from deephyper/core/cli/_hps.py
rename to src/deephyper/core/cli/_hps.py
diff --git a/deephyper/core/exceptions/__init__.py b/src/deephyper/core/exceptions/__init__.py
similarity index 100%
rename from deephyper/core/exceptions/__init__.py
rename to src/deephyper/core/exceptions/__init__.py
diff --git a/deephyper/core/exceptions/loading.py b/src/deephyper/core/exceptions/loading.py
similarity index 100%
rename from deephyper/core/exceptions/loading.py
rename to src/deephyper/core/exceptions/loading.py
diff --git a/deephyper/core/exceptions/problem.py b/src/deephyper/core/exceptions/problem.py
similarity index 100%
rename from deephyper/core/exceptions/problem.py
rename to src/deephyper/core/exceptions/problem.py
diff --git a/deephyper/core/parser.py b/src/deephyper/core/parser.py
similarity index 100%
rename from deephyper/core/parser.py
rename to src/deephyper/core/parser.py
diff --git a/deephyper/core/utils/__init__.py b/src/deephyper/core/utils/__init__.py
similarity index 100%
rename from deephyper/core/utils/__init__.py
rename to src/deephyper/core/utils/__init__.py
diff --git a/deephyper/core/utils/_capture_std.py b/src/deephyper/core/utils/_capture_std.py
similarity index 100%
rename from deephyper/core/utils/_capture_std.py
rename to src/deephyper/core/utils/_capture_std.py
diff --git a/deephyper/core/utils/_files.py b/src/deephyper/core/utils/_files.py
similarity index 100%
rename from deephyper/core/utils/_files.py
rename to src/deephyper/core/utils/_files.py
diff --git a/deephyper/core/utils/_import.py b/src/deephyper/core/utils/_import.py
similarity index 100%
rename from deephyper/core/utils/_import.py
rename to src/deephyper/core/utils/_import.py
diff --git a/deephyper/core/utils/_introspection.py b/src/deephyper/core/utils/_introspection.py
similarity index 100%
rename from deephyper/core/utils/_introspection.py
rename to src/deephyper/core/utils/_introspection.py
diff --git a/deephyper/core/utils/_timeout.py b/src/deephyper/core/utils/_timeout.py
similarity index 100%
rename from deephyper/core/utils/_timeout.py
rename to src/deephyper/core/utils/_timeout.py
diff --git a/deephyper/core/utils/joblib_utils.py b/src/deephyper/core/utils/joblib_utils.py
similarity index 100%
rename from deephyper/core/utils/joblib_utils.py
rename to src/deephyper/core/utils/joblib_utils.py
diff --git a/deephyper/core/warnings.py b/src/deephyper/core/warnings.py
similarity index 100%
rename from deephyper/core/warnings.py
rename to src/deephyper/core/warnings.py
diff --git a/deephyper/ensemble/__init__.py b/src/deephyper/ensemble/__init__.py
similarity index 100%
rename from deephyper/ensemble/__init__.py
rename to src/deephyper/ensemble/__init__.py
diff --git a/deephyper/ensemble/_ensemble.py b/src/deephyper/ensemble/_ensemble.py
similarity index 100%
rename from deephyper/ensemble/_ensemble.py
rename to src/deephyper/ensemble/_ensemble.py
diff --git a/deephyper/ensemble/aggregator/__init__.py b/src/deephyper/ensemble/aggregator/__init__.py
similarity index 100%
rename from deephyper/ensemble/aggregator/__init__.py
rename to src/deephyper/ensemble/aggregator/__init__.py
diff --git a/deephyper/ensemble/aggregator/_aggregator.py b/src/deephyper/ensemble/aggregator/_aggregator.py
similarity index 100%
rename from deephyper/ensemble/aggregator/_aggregator.py
rename to src/deephyper/ensemble/aggregator/_aggregator.py
diff --git a/deephyper/ensemble/aggregator/_mean.py b/src/deephyper/ensemble/aggregator/_mean.py
similarity index 100%
rename from deephyper/ensemble/aggregator/_mean.py
rename to src/deephyper/ensemble/aggregator/_mean.py
diff --git a/deephyper/ensemble/aggregator/_mixed_categorical.py b/src/deephyper/ensemble/aggregator/_mixed_categorical.py
similarity index 100%
rename from deephyper/ensemble/aggregator/_mixed_categorical.py
rename to src/deephyper/ensemble/aggregator/_mixed_categorical.py
diff --git a/deephyper/ensemble/aggregator/_mixed_normal.py b/src/deephyper/ensemble/aggregator/_mixed_normal.py
similarity index 100%
rename from deephyper/ensemble/aggregator/_mixed_normal.py
rename to src/deephyper/ensemble/aggregator/_mixed_normal.py
diff --git a/deephyper/ensemble/aggregator/_mode.py b/src/deephyper/ensemble/aggregator/_mode.py
similarity index 100%
rename from deephyper/ensemble/aggregator/_mode.py
rename to src/deephyper/ensemble/aggregator/_mode.py
diff --git a/deephyper/ensemble/aggregator/utils.py b/src/deephyper/ensemble/aggregator/utils.py
similarity index 100%
rename from deephyper/ensemble/aggregator/utils.py
rename to src/deephyper/ensemble/aggregator/utils.py
diff --git a/deephyper/ensemble/loss.py b/src/deephyper/ensemble/loss.py
similarity index 100%
rename from deephyper/ensemble/loss.py
rename to src/deephyper/ensemble/loss.py
diff --git a/deephyper/ensemble/selector/__init__.py b/src/deephyper/ensemble/selector/__init__.py
similarity index 100%
rename from deephyper/ensemble/selector/__init__.py
rename to src/deephyper/ensemble/selector/__init__.py
diff --git a/deephyper/ensemble/selector/_greedy.py b/src/deephyper/ensemble/selector/_greedy.py
similarity index 100%
rename from deephyper/ensemble/selector/_greedy.py
rename to src/deephyper/ensemble/selector/_greedy.py
diff --git a/deephyper/ensemble/selector/_online_selector.py b/src/deephyper/ensemble/selector/_online_selector.py
similarity index 100%
rename from deephyper/ensemble/selector/_online_selector.py
rename to src/deephyper/ensemble/selector/_online_selector.py
diff --git a/deephyper/ensemble/selector/_selector.py b/src/deephyper/ensemble/selector/_selector.py
similarity index 100%
rename from deephyper/ensemble/selector/_selector.py
rename to src/deephyper/ensemble/selector/_selector.py
diff --git a/deephyper/ensemble/selector/_topk.py b/src/deephyper/ensemble/selector/_topk.py
similarity index 100%
rename from deephyper/ensemble/selector/_topk.py
rename to src/deephyper/ensemble/selector/_topk.py
diff --git a/deephyper/evaluator/__init__.py b/src/deephyper/evaluator/__init__.py
similarity index 100%
rename from deephyper/evaluator/__init__.py
rename to src/deephyper/evaluator/__init__.py
diff --git a/deephyper/evaluator/_decorator.py b/src/deephyper/evaluator/_decorator.py
similarity index 100%
rename from deephyper/evaluator/_decorator.py
rename to src/deephyper/evaluator/_decorator.py
diff --git a/deephyper/evaluator/_encoder.py b/src/deephyper/evaluator/_encoder.py
similarity index 100%
rename from deephyper/evaluator/_encoder.py
rename to src/deephyper/evaluator/_encoder.py
diff --git a/deephyper/evaluator/_evaluator.py b/src/deephyper/evaluator/_evaluator.py
similarity index 100%
rename from deephyper/evaluator/_evaluator.py
rename to src/deephyper/evaluator/_evaluator.py
diff --git a/deephyper/evaluator/_job.py b/src/deephyper/evaluator/_job.py
similarity index 100%
rename from deephyper/evaluator/_job.py
rename to src/deephyper/evaluator/_job.py
diff --git a/deephyper/evaluator/_mochi_process_pool.py b/src/deephyper/evaluator/_mochi_process_pool.py
similarity index 100%
rename from deephyper/evaluator/_mochi_process_pool.py
rename to src/deephyper/evaluator/_mochi_process_pool.py
diff --git a/deephyper/evaluator/_mpi_comm.py b/src/deephyper/evaluator/_mpi_comm.py
similarity index 100%
rename from deephyper/evaluator/_mpi_comm.py
rename to src/deephyper/evaluator/_mpi_comm.py
diff --git a/deephyper/evaluator/_nest_asyncio.py b/src/deephyper/evaluator/_nest_asyncio.py
similarity index 100%
rename from deephyper/evaluator/_nest_asyncio.py
rename to src/deephyper/evaluator/_nest_asyncio.py
diff --git a/deephyper/evaluator/_process_pool.py b/src/deephyper/evaluator/_process_pool.py
similarity index 100%
rename from deephyper/evaluator/_process_pool.py
rename to src/deephyper/evaluator/_process_pool.py
diff --git a/deephyper/evaluator/_queued.py b/src/deephyper/evaluator/_queued.py
similarity index 100%
rename from deephyper/evaluator/_queued.py
rename to src/deephyper/evaluator/_queued.py
diff --git a/deephyper/evaluator/_ray.py b/src/deephyper/evaluator/_ray.py
similarity index 100%
rename from deephyper/evaluator/_ray.py
rename to src/deephyper/evaluator/_ray.py
diff --git a/deephyper/evaluator/_serial.py b/src/deephyper/evaluator/_serial.py
similarity index 100%
rename from deephyper/evaluator/_serial.py
rename to src/deephyper/evaluator/_serial.py
diff --git a/deephyper/evaluator/_thread_pool.py b/src/deephyper/evaluator/_thread_pool.py
similarity index 100%
rename from deephyper/evaluator/_thread_pool.py
rename to src/deephyper/evaluator/_thread_pool.py
diff --git a/deephyper/evaluator/callback.py b/src/deephyper/evaluator/callback.py
similarity index 100%
rename from deephyper/evaluator/callback.py
rename to src/deephyper/evaluator/callback.py
diff --git a/deephyper/evaluator/mpi.py b/src/deephyper/evaluator/mpi.py
similarity index 100%
rename from deephyper/evaluator/mpi.py
rename to src/deephyper/evaluator/mpi.py
diff --git a/deephyper/evaluator/storage/__init__.py b/src/deephyper/evaluator/storage/__init__.py
similarity index 100%
rename from deephyper/evaluator/storage/__init__.py
rename to src/deephyper/evaluator/storage/__init__.py
diff --git a/deephyper/evaluator/storage/_memory_storage.py b/src/deephyper/evaluator/storage/_memory_storage.py
similarity index 100%
rename from deephyper/evaluator/storage/_memory_storage.py
rename to src/deephyper/evaluator/storage/_memory_storage.py
diff --git a/deephyper/evaluator/storage/_mpi_win_mutable_mapping.py b/src/deephyper/evaluator/storage/_mpi_win_mutable_mapping.py
similarity index 100%
rename from deephyper/evaluator/storage/_mpi_win_mutable_mapping.py
rename to src/deephyper/evaluator/storage/_mpi_win_mutable_mapping.py
diff --git a/deephyper/evaluator/storage/_mpi_win_storage.py b/src/deephyper/evaluator/storage/_mpi_win_storage.py
similarity index 100%
rename from deephyper/evaluator/storage/_mpi_win_storage.py
rename to src/deephyper/evaluator/storage/_mpi_win_storage.py
diff --git a/deephyper/evaluator/storage/_null_storage.py b/src/deephyper/evaluator/storage/_null_storage.py
similarity index 100%
rename from deephyper/evaluator/storage/_null_storage.py
rename to src/deephyper/evaluator/storage/_null_storage.py
diff --git a/deephyper/evaluator/storage/_ray_storage.py b/src/deephyper/evaluator/storage/_ray_storage.py
similarity index 100%
rename from deephyper/evaluator/storage/_ray_storage.py
rename to src/deephyper/evaluator/storage/_ray_storage.py
diff --git a/deephyper/evaluator/storage/_redis_storage.py b/src/deephyper/evaluator/storage/_redis_storage.py
similarity index 100%
rename from deephyper/evaluator/storage/_redis_storage.py
rename to src/deephyper/evaluator/storage/_redis_storage.py
diff --git a/deephyper/evaluator/storage/_shared_memory_storage.py b/src/deephyper/evaluator/storage/_shared_memory_storage.py
similarity index 100%
rename from deephyper/evaluator/storage/_shared_memory_storage.py
rename to src/deephyper/evaluator/storage/_shared_memory_storage.py
diff --git a/deephyper/evaluator/storage/_storage.py b/src/deephyper/evaluator/storage/_storage.py
similarity index 100%
rename from deephyper/evaluator/storage/_storage.py
rename to src/deephyper/evaluator/storage/_storage.py
diff --git a/deephyper/hpo/__init__.py b/src/deephyper/hpo/__init__.py
similarity index 100%
rename from deephyper/hpo/__init__.py
rename to src/deephyper/hpo/__init__.py
diff --git a/deephyper/hpo/_cbo.py b/src/deephyper/hpo/_cbo.py
similarity index 100%
rename from deephyper/hpo/_cbo.py
rename to src/deephyper/hpo/_cbo.py
diff --git a/deephyper/hpo/_eds.py b/src/deephyper/hpo/_eds.py
similarity index 100%
rename from deephyper/hpo/_eds.py
rename to src/deephyper/hpo/_eds.py
diff --git a/deephyper/hpo/_mpi_dbo.py b/src/deephyper/hpo/_mpi_dbo.py
similarity index 100%
rename from deephyper/hpo/_mpi_dbo.py
rename to src/deephyper/hpo/_mpi_dbo.py
diff --git a/deephyper/hpo/_problem.py b/src/deephyper/hpo/_problem.py
similarity index 100%
rename from deephyper/hpo/_problem.py
rename to src/deephyper/hpo/_problem.py
diff --git a/deephyper/hpo/_random.py b/src/deephyper/hpo/_random.py
similarity index 100%
rename from deephyper/hpo/_random.py
rename to src/deephyper/hpo/_random.py
diff --git a/deephyper/hpo/_regevo.py b/src/deephyper/hpo/_regevo.py
similarity index 100%
rename from deephyper/hpo/_regevo.py
rename to src/deephyper/hpo/_regevo.py
diff --git a/deephyper/hpo/_search.py b/src/deephyper/hpo/_search.py
similarity index 100%
rename from deephyper/hpo/_search.py
rename to src/deephyper/hpo/_search.py
diff --git a/deephyper/predictor/__init__.py b/src/deephyper/predictor/__init__.py
similarity index 100%
rename from deephyper/predictor/__init__.py
rename to src/deephyper/predictor/__init__.py
diff --git a/deephyper/predictor/_predictor.py b/src/deephyper/predictor/_predictor.py
similarity index 100%
rename from deephyper/predictor/_predictor.py
rename to src/deephyper/predictor/_predictor.py
diff --git a/deephyper/predictor/sklearn/__init__.py b/src/deephyper/predictor/sklearn/__init__.py
similarity index 100%
rename from deephyper/predictor/sklearn/__init__.py
rename to src/deephyper/predictor/sklearn/__init__.py
diff --git a/deephyper/predictor/sklearn/_predictor_sklearn.py b/src/deephyper/predictor/sklearn/_predictor_sklearn.py
similarity index 100%
rename from deephyper/predictor/sklearn/_predictor_sklearn.py
rename to src/deephyper/predictor/sklearn/_predictor_sklearn.py
diff --git a/deephyper/predictor/tf_keras2/__init__.py b/src/deephyper/predictor/tf_keras2/__init__.py
similarity index 100%
rename from deephyper/predictor/tf_keras2/__init__.py
rename to src/deephyper/predictor/tf_keras2/__init__.py
diff --git a/deephyper/predictor/tf_keras2/_predictor_tf_keras2.py b/src/deephyper/predictor/tf_keras2/_predictor_tf_keras2.py
similarity index 100%
rename from deephyper/predictor/tf_keras2/_predictor_tf_keras2.py
rename to src/deephyper/predictor/tf_keras2/_predictor_tf_keras2.py
diff --git a/deephyper/predictor/torch/__init__.py b/src/deephyper/predictor/torch/__init__.py
similarity index 100%
rename from deephyper/predictor/torch/__init__.py
rename to src/deephyper/predictor/torch/__init__.py
diff --git a/deephyper/predictor/torch/_predictor_torch.py b/src/deephyper/predictor/torch/_predictor_torch.py
similarity index 100%
rename from deephyper/predictor/torch/_predictor_torch.py
rename to src/deephyper/predictor/torch/_predictor_torch.py
diff --git a/deephyper/skopt/__init__.py b/src/deephyper/skopt/__init__.py
similarity index 100%
rename from deephyper/skopt/__init__.py
rename to src/deephyper/skopt/__init__.py
diff --git a/deephyper/skopt/acquisition.py b/src/deephyper/skopt/acquisition.py
similarity index 100%
rename from deephyper/skopt/acquisition.py
rename to src/deephyper/skopt/acquisition.py
diff --git a/deephyper/skopt/benchmarks.py b/src/deephyper/skopt/benchmarks.py
similarity index 100%
rename from deephyper/skopt/benchmarks.py
rename to src/deephyper/skopt/benchmarks.py
diff --git a/deephyper/skopt/callbacks.py b/src/deephyper/skopt/callbacks.py
similarity index 100%
rename from deephyper/skopt/callbacks.py
rename to src/deephyper/skopt/callbacks.py
diff --git a/deephyper/skopt/learning/__init__.py b/src/deephyper/skopt/learning/__init__.py
similarity index 100%
rename from deephyper/skopt/learning/__init__.py
rename to src/deephyper/skopt/learning/__init__.py
diff --git a/deephyper/skopt/learning/forest.py b/src/deephyper/skopt/learning/forest.py
similarity index 100%
rename from deephyper/skopt/learning/forest.py
rename to src/deephyper/skopt/learning/forest.py
diff --git a/deephyper/skopt/learning/gaussian_process/__init__.py b/src/deephyper/skopt/learning/gaussian_process/__init__.py
similarity index 100%
rename from deephyper/skopt/learning/gaussian_process/__init__.py
rename to src/deephyper/skopt/learning/gaussian_process/__init__.py
diff --git a/deephyper/skopt/learning/gaussian_process/gpr.py b/src/deephyper/skopt/learning/gaussian_process/gpr.py
similarity index 100%
rename from deephyper/skopt/learning/gaussian_process/gpr.py
rename to src/deephyper/skopt/learning/gaussian_process/gpr.py
diff --git a/deephyper/skopt/learning/gaussian_process/kernels.py b/src/deephyper/skopt/learning/gaussian_process/kernels.py
similarity index 100%
rename from deephyper/skopt/learning/gaussian_process/kernels.py
rename to src/deephyper/skopt/learning/gaussian_process/kernels.py
diff --git a/deephyper/skopt/learning/gbrt.py b/src/deephyper/skopt/learning/gbrt.py
similarity index 100%
rename from deephyper/skopt/learning/gbrt.py
rename to src/deephyper/skopt/learning/gbrt.py
diff --git a/deephyper/skopt/moo/__init__.py b/src/deephyper/skopt/moo/__init__.py
similarity index 100%
rename from deephyper/skopt/moo/__init__.py
rename to src/deephyper/skopt/moo/__init__.py
diff --git a/deephyper/skopt/moo/_hv.py b/src/deephyper/skopt/moo/_hv.py
similarity index 100%
rename from deephyper/skopt/moo/_hv.py
rename to src/deephyper/skopt/moo/_hv.py
diff --git a/deephyper/skopt/moo/_multiobjective.py b/src/deephyper/skopt/moo/_multiobjective.py
similarity index 100%
rename from deephyper/skopt/moo/_multiobjective.py
rename to src/deephyper/skopt/moo/_multiobjective.py
diff --git a/deephyper/skopt/moo/_pf.py b/src/deephyper/skopt/moo/_pf.py
similarity index 100%
rename from deephyper/skopt/moo/_pf.py
rename to src/deephyper/skopt/moo/_pf.py
diff --git a/deephyper/skopt/optimizer/__init__.py b/src/deephyper/skopt/optimizer/__init__.py
similarity index 100%
rename from deephyper/skopt/optimizer/__init__.py
rename to src/deephyper/skopt/optimizer/__init__.py
diff --git a/deephyper/skopt/optimizer/_pymoo.py b/src/deephyper/skopt/optimizer/_pymoo.py
similarity index 100%
rename from deephyper/skopt/optimizer/_pymoo.py
rename to src/deephyper/skopt/optimizer/_pymoo.py
diff --git a/deephyper/skopt/optimizer/base.py b/src/deephyper/skopt/optimizer/base.py
similarity index 100%
rename from deephyper/skopt/optimizer/base.py
rename to src/deephyper/skopt/optimizer/base.py
diff --git a/deephyper/skopt/optimizer/dummy.py b/src/deephyper/skopt/optimizer/dummy.py
similarity index 100%
rename from deephyper/skopt/optimizer/dummy.py
rename to src/deephyper/skopt/optimizer/dummy.py
diff --git a/deephyper/skopt/optimizer/forest.py b/src/deephyper/skopt/optimizer/forest.py
similarity index 100%
rename from deephyper/skopt/optimizer/forest.py
rename to src/deephyper/skopt/optimizer/forest.py
diff --git a/deephyper/skopt/optimizer/gbrt.py b/src/deephyper/skopt/optimizer/gbrt.py
similarity index 100%
rename from deephyper/skopt/optimizer/gbrt.py
rename to src/deephyper/skopt/optimizer/gbrt.py
diff --git a/deephyper/skopt/optimizer/gp.py b/src/deephyper/skopt/optimizer/gp.py
similarity index 100%
rename from deephyper/skopt/optimizer/gp.py
rename to src/deephyper/skopt/optimizer/gp.py
diff --git a/deephyper/skopt/optimizer/optimizer.py b/src/deephyper/skopt/optimizer/optimizer.py
similarity index 100%
rename from deephyper/skopt/optimizer/optimizer.py
rename to src/deephyper/skopt/optimizer/optimizer.py
diff --git a/deephyper/skopt/plots.py b/src/deephyper/skopt/plots.py
similarity index 100%
rename from deephyper/skopt/plots.py
rename to src/deephyper/skopt/plots.py
diff --git a/deephyper/skopt/sampler/__init__.py b/src/deephyper/skopt/sampler/__init__.py
similarity index 100%
rename from deephyper/skopt/sampler/__init__.py
rename to src/deephyper/skopt/sampler/__init__.py
diff --git a/deephyper/skopt/sampler/base.py b/src/deephyper/skopt/sampler/base.py
similarity index 100%
rename from deephyper/skopt/sampler/base.py
rename to src/deephyper/skopt/sampler/base.py
diff --git a/deephyper/skopt/sampler/grid.py b/src/deephyper/skopt/sampler/grid.py
similarity index 100%
rename from deephyper/skopt/sampler/grid.py
rename to src/deephyper/skopt/sampler/grid.py
diff --git a/deephyper/skopt/sampler/halton.py b/src/deephyper/skopt/sampler/halton.py
similarity index 100%
rename from deephyper/skopt/sampler/halton.py
rename to src/deephyper/skopt/sampler/halton.py
diff --git a/deephyper/skopt/sampler/hammersly.py b/src/deephyper/skopt/sampler/hammersly.py
similarity index 100%
rename from deephyper/skopt/sampler/hammersly.py
rename to src/deephyper/skopt/sampler/hammersly.py
diff --git a/deephyper/skopt/sampler/lhs.py b/src/deephyper/skopt/sampler/lhs.py
similarity index 100%
rename from deephyper/skopt/sampler/lhs.py
rename to src/deephyper/skopt/sampler/lhs.py
diff --git a/deephyper/skopt/sampler/sobol.py b/src/deephyper/skopt/sampler/sobol.py
similarity index 100%
rename from deephyper/skopt/sampler/sobol.py
rename to src/deephyper/skopt/sampler/sobol.py
diff --git a/deephyper/skopt/searchcv.py b/src/deephyper/skopt/searchcv.py
similarity index 100%
rename from deephyper/skopt/searchcv.py
rename to src/deephyper/skopt/searchcv.py
diff --git a/deephyper/skopt/space/__init__.py b/src/deephyper/skopt/space/__init__.py
similarity index 100%
rename from deephyper/skopt/space/__init__.py
rename to src/deephyper/skopt/space/__init__.py
diff --git a/deephyper/skopt/space/space.py b/src/deephyper/skopt/space/space.py
similarity index 100%
rename from deephyper/skopt/space/space.py
rename to src/deephyper/skopt/space/space.py
diff --git a/deephyper/skopt/space/transformers.py b/src/deephyper/skopt/space/transformers.py
similarity index 100%
rename from deephyper/skopt/space/transformers.py
rename to src/deephyper/skopt/space/transformers.py
diff --git a/deephyper/skopt/utils.py b/src/deephyper/skopt/utils.py
similarity index 100%
rename from deephyper/skopt/utils.py
rename to src/deephyper/skopt/utils.py
diff --git a/deephyper/stopper/__init__.py b/src/deephyper/stopper/__init__.py
similarity index 100%
rename from deephyper/stopper/__init__.py
rename to src/deephyper/stopper/__init__.py
diff --git a/deephyper/stopper/_asha_stopper.py b/src/deephyper/stopper/_asha_stopper.py
similarity index 100%
rename from deephyper/stopper/_asha_stopper.py
rename to src/deephyper/stopper/_asha_stopper.py
diff --git a/deephyper/stopper/_const_stopper.py b/src/deephyper/stopper/_const_stopper.py
similarity index 100%
rename from deephyper/stopper/_const_stopper.py
rename to src/deephyper/stopper/_const_stopper.py
diff --git a/deephyper/stopper/_idle_stopper.py b/src/deephyper/stopper/_idle_stopper.py
similarity index 100%
rename from deephyper/stopper/_idle_stopper.py
rename to src/deephyper/stopper/_idle_stopper.py
diff --git a/deephyper/stopper/_lcmodel_stopper.py b/src/deephyper/stopper/_lcmodel_stopper.py
similarity index 100%
rename from deephyper/stopper/_lcmodel_stopper.py
rename to src/deephyper/stopper/_lcmodel_stopper.py
diff --git a/deephyper/stopper/_median_stopper.py b/src/deephyper/stopper/_median_stopper.py
similarity index 100%
rename from deephyper/stopper/_median_stopper.py
rename to src/deephyper/stopper/_median_stopper.py
diff --git a/deephyper/stopper/_stopper.py b/src/deephyper/stopper/_stopper.py
similarity index 100%
rename from deephyper/stopper/_stopper.py
rename to src/deephyper/stopper/_stopper.py
diff --git a/deephyper/stopper/integration/__init__.py b/src/deephyper/stopper/integration/__init__.py
similarity index 100%
rename from deephyper/stopper/integration/__init__.py
rename to src/deephyper/stopper/integration/__init__.py
diff --git a/deephyper/stopper/integration/deepxde.py b/src/deephyper/stopper/integration/deepxde.py
similarity index 100%
rename from deephyper/stopper/integration/deepxde.py
rename to src/deephyper/stopper/integration/deepxde.py
diff --git a/deephyper/stopper/integration/tf_keras2.py b/src/deephyper/stopper/integration/tf_keras2.py
similarity index 100%
rename from deephyper/stopper/integration/tf_keras2.py
rename to src/deephyper/stopper/integration/tf_keras2.py
diff --git a/deephyper/stopper/lce/__init__.py b/src/deephyper/stopper/lce/__init__.py
similarity index 100%
rename from deephyper/stopper/lce/__init__.py
rename to src/deephyper/stopper/lce/__init__.py
diff --git a/deephyper/stopper/lce/_bayesian_regression.py b/src/deephyper/stopper/lce/_bayesian_regression.py
similarity index 100%
rename from deephyper/stopper/lce/_bayesian_regression.py
rename to src/deephyper/stopper/lce/_bayesian_regression.py
diff --git a/tox.ini b/tox.ini
index a0b87a804..99353806f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -9,6 +9,6 @@ deps = pytest
        coverage
 commands =
     # NOTE: you can run any command line tool here - not just tests
-    coverage run --source=deephyper/ -m pytest --run fast,hpo tests/
+    coverage run -m pytest --run fast,hpo tests/
     coverage html
     coverage xml


Test patch:
diff --git a/.github/workflows/checks-tests.yml b/.github/workflows/checks-tests.yml
index ef87ec6aa..39f5019aa 100644
--- a/.github/workflows/checks-tests.yml
+++ b/.github/workflows/checks-tests.yml
@@ -8,7 +8,7 @@ jobs:
 
   checks-tests:
 
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
     strategy:
       matrix:
         python-version:
@@ -32,10 +32,10 @@ jobs:
           pip install tox ruff
 
       - name: Run linter checks with ruff
-        run: ruff check examples deephyper
+        run: ruff check examples src
 
       - name: Run formatter checks with ruff
-        run: ruff format --check examples deephyper
+        run: ruff format --check examples src
 
       - name: Run tests with tox
         run: tox -e py3
diff --git a/pytest.ini b/pytest.ini
deleted file mode 100644
index 3089a1307..000000000
--- a/pytest.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-[pytest]
-addopts = --doctest-modules --ignore=deephyper/evaluator --ignore=tests/skopt
-norecursedirs = .git _build docs
-markers =
-    fast: marks to define a fast test
-    slow: marks to define a slow test
-    torch: marks to define a test that requires torch installed.
-    tf_keras2: marks to define a test that requires tf-keras~=2 installed.
-    ray: marks tests which needs Ray installed.
-    mpi: marks tests which needs mpi4py and MPI installed.
-    redis: marks tests which needs Redis installed
-    jax: marks tests which needs JAX installed
-    sdv: marks tests which needs SDV installed
-filterwarnings =
-    ignore:The objective has been evaluated at this point before.:UserWarning
\ No newline at end of file
diff --git a/deephyper/test/__init__.py b/src/deephyper/test/__init__.py
similarity index 100%
rename from deephyper/test/__init__.py
rename to src/deephyper/test/__init__.py
diff --git a/deephyper/test/_command.py b/src/deephyper/test/_command.py
similarity index 100%
rename from deephyper/test/_command.py
rename to src/deephyper/test/_command.py
diff --git a/deephyper/test/_parse_result.py b/src/deephyper/test/_parse_result.py
similarity index 100%
rename from deephyper/test/_parse_result.py
rename to src/deephyper/test/_parse_result.py