From 6f5ab0ae5c74d7ef1222a1620bf6b56190469dd7 Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby Date: Fri, 16 Feb 2024 21:25:05 +0100 Subject: [PATCH] move to a src layout. --- {modopt/examples => examples}/README.rst | 0 {modopt/examples => examples}/__init__.py | 0 {modopt/examples => examples}/conftest.py | 0 .../example_lasso_forward_backward.py | 0 pyproject.toml | 9 ++------- {modopt => src/modopt}/__init__.py | 0 {modopt => src/modopt}/base/__init__.py | 0 {modopt => src/modopt}/base/backend.py | 0 {modopt => src/modopt}/base/np_adjust.py | 0 {modopt => src/modopt}/base/observable.py | 0 {modopt => src/modopt}/base/transform.py | 0 {modopt => src/modopt}/base/types.py | 0 {modopt => src/modopt}/base/wrappers.py | 0 {modopt => src/modopt}/interface/__init__.py | 0 {modopt => src/modopt}/interface/errors.py | 0 {modopt => src/modopt}/interface/log.py | 0 {modopt => src/modopt}/math/__init__.py | 0 {modopt => src/modopt}/math/convolve.py | 0 {modopt => src/modopt}/math/matrix.py | 0 {modopt => src/modopt}/math/metrics.py | 0 {modopt => src/modopt}/math/stats.py | 0 {modopt => src/modopt}/opt/__init__.py | 0 {modopt => src/modopt}/opt/algorithms/__init__.py | 0 {modopt => src/modopt}/opt/algorithms/admm.py | 0 {modopt => src/modopt}/opt/algorithms/base.py | 0 .../modopt}/opt/algorithms/forward_backward.py | 0 .../modopt}/opt/algorithms/gradient_descent.py | 0 {modopt => src/modopt}/opt/algorithms/primal_dual.py | 0 {modopt => src/modopt}/opt/cost.py | 0 {modopt => src/modopt}/opt/gradient.py | 0 {modopt => src/modopt}/opt/linear/__init__.py | 0 {modopt => src/modopt}/opt/linear/base.py | 0 {modopt => src/modopt}/opt/linear/wavelet.py | 0 {modopt => src/modopt}/opt/proximity.py | 0 {modopt => src/modopt}/opt/reweight.py | 0 {modopt => src/modopt}/plot/__init__.py | 0 {modopt => src/modopt}/plot/cost_plot.py | 0 {modopt => src/modopt}/signal/__init__.py | 0 {modopt => src/modopt}/signal/filter.py | 0 {modopt => src/modopt}/signal/noise.py | 0 {modopt => src/modopt}/signal/positivity.py | 0 {modopt => src/modopt}/signal/svd.py | 0 {modopt => src/modopt}/signal/validation.py | 0 {modopt => src/modopt}/signal/wavelet.py | 0 {modopt/tests => tests}/test_algorithms.py | 0 {modopt/tests => tests}/test_base.py | 0 {modopt/tests => tests}/test_helpers/__init__.py | 0 {modopt/tests => tests}/test_helpers/utils.py | 0 {modopt/tests => tests}/test_math.py | 0 {modopt/tests => tests}/test_opt.py | 0 {modopt/tests => tests}/test_signal.py | 0 51 files changed, 2 insertions(+), 7 deletions(-) rename {modopt/examples => examples}/README.rst (100%) rename {modopt/examples => examples}/__init__.py (100%) rename {modopt/examples => examples}/conftest.py (100%) rename {modopt/examples => examples}/example_lasso_forward_backward.py (100%) rename {modopt => src/modopt}/__init__.py (100%) rename {modopt => src/modopt}/base/__init__.py (100%) rename {modopt => src/modopt}/base/backend.py (100%) rename {modopt => src/modopt}/base/np_adjust.py (100%) rename {modopt => src/modopt}/base/observable.py (100%) rename {modopt => src/modopt}/base/transform.py (100%) rename {modopt => src/modopt}/base/types.py (100%) rename {modopt => src/modopt}/base/wrappers.py (100%) rename {modopt => src/modopt}/interface/__init__.py (100%) rename {modopt => src/modopt}/interface/errors.py (100%) rename {modopt => src/modopt}/interface/log.py (100%) rename {modopt => src/modopt}/math/__init__.py (100%) rename {modopt => src/modopt}/math/convolve.py (100%) rename {modopt => src/modopt}/math/matrix.py (100%) rename {modopt => src/modopt}/math/metrics.py (100%) rename {modopt => src/modopt}/math/stats.py (100%) rename {modopt => src/modopt}/opt/__init__.py (100%) rename {modopt => src/modopt}/opt/algorithms/__init__.py (100%) rename {modopt => src/modopt}/opt/algorithms/admm.py (100%) rename {modopt => src/modopt}/opt/algorithms/base.py (100%) rename {modopt => src/modopt}/opt/algorithms/forward_backward.py (100%) rename {modopt => src/modopt}/opt/algorithms/gradient_descent.py (100%) rename {modopt => src/modopt}/opt/algorithms/primal_dual.py (100%) rename {modopt => src/modopt}/opt/cost.py (100%) rename {modopt => src/modopt}/opt/gradient.py (100%) rename {modopt => src/modopt}/opt/linear/__init__.py (100%) rename {modopt => src/modopt}/opt/linear/base.py (100%) rename {modopt => src/modopt}/opt/linear/wavelet.py (100%) rename {modopt => src/modopt}/opt/proximity.py (100%) rename {modopt => src/modopt}/opt/reweight.py (100%) rename {modopt => src/modopt}/plot/__init__.py (100%) rename {modopt => src/modopt}/plot/cost_plot.py (100%) rename {modopt => src/modopt}/signal/__init__.py (100%) rename {modopt => src/modopt}/signal/filter.py (100%) rename {modopt => src/modopt}/signal/noise.py (100%) rename {modopt => src/modopt}/signal/positivity.py (100%) rename {modopt => src/modopt}/signal/svd.py (100%) rename {modopt => src/modopt}/signal/validation.py (100%) rename {modopt => src/modopt}/signal/wavelet.py (100%) rename {modopt/tests => tests}/test_algorithms.py (100%) rename {modopt/tests => tests}/test_base.py (100%) rename {modopt/tests => tests}/test_helpers/__init__.py (100%) rename {modopt/tests => tests}/test_helpers/utils.py (100%) rename {modopt/tests => tests}/test_math.py (100%) rename {modopt/tests => tests}/test_opt.py (100%) rename {modopt/tests => tests}/test_signal.py (100%) diff --git a/modopt/examples/README.rst b/examples/README.rst similarity index 100% rename from modopt/examples/README.rst rename to examples/README.rst diff --git a/modopt/examples/__init__.py b/examples/__init__.py similarity index 100% rename from modopt/examples/__init__.py rename to examples/__init__.py diff --git a/modopt/examples/conftest.py b/examples/conftest.py similarity index 100% rename from modopt/examples/conftest.py rename to examples/conftest.py diff --git a/modopt/examples/example_lasso_forward_backward.py b/examples/example_lasso_forward_backward.py similarity index 100% rename from modopt/examples/example_lasso_forward_backward.py rename to examples/example_lasso_forward_backward.py diff --git a/pyproject.toml b/pyproject.toml index 71bdce82..7c9b21a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,9 +26,6 @@ dev=["black", "pytest<8.0.0", "pytest-cases", "pytest-cov", "pytest-sugar", "ruf [build-system] requires=["setuptools", "setuptools-scm[toml]", "wheel"] -[tool.setuptools] -packages=["modopt"] - [tool.coverage.run] omit = ["*tests*", "*__init__*", "*setup.py*", "*_version.py*", "*example*"] @@ -38,12 +35,10 @@ exclude_lines = ["pragma: no cover", "raise NotImplementedError"] [tool.black] -[tool.ruff] - -src=["modopt"] +[lint] select = ["E", "F", "B", "Q", "UP", "D", "NPY", "RUF"] -[tool.ruff.pydocstyle] +[lint.pydocstyle] convention="numpy" [tool.isort] diff --git a/modopt/__init__.py b/src/modopt/__init__.py similarity index 100% rename from modopt/__init__.py rename to src/modopt/__init__.py diff --git a/modopt/base/__init__.py b/src/modopt/base/__init__.py similarity index 100% rename from modopt/base/__init__.py rename to src/modopt/base/__init__.py diff --git a/modopt/base/backend.py b/src/modopt/base/backend.py similarity index 100% rename from modopt/base/backend.py rename to src/modopt/base/backend.py diff --git a/modopt/base/np_adjust.py b/src/modopt/base/np_adjust.py similarity index 100% rename from modopt/base/np_adjust.py rename to src/modopt/base/np_adjust.py diff --git a/modopt/base/observable.py b/src/modopt/base/observable.py similarity index 100% rename from modopt/base/observable.py rename to src/modopt/base/observable.py diff --git a/modopt/base/transform.py b/src/modopt/base/transform.py similarity index 100% rename from modopt/base/transform.py rename to src/modopt/base/transform.py diff --git a/modopt/base/types.py b/src/modopt/base/types.py similarity index 100% rename from modopt/base/types.py rename to src/modopt/base/types.py diff --git a/modopt/base/wrappers.py b/src/modopt/base/wrappers.py similarity index 100% rename from modopt/base/wrappers.py rename to src/modopt/base/wrappers.py diff --git a/modopt/interface/__init__.py b/src/modopt/interface/__init__.py similarity index 100% rename from modopt/interface/__init__.py rename to src/modopt/interface/__init__.py diff --git a/modopt/interface/errors.py b/src/modopt/interface/errors.py similarity index 100% rename from modopt/interface/errors.py rename to src/modopt/interface/errors.py diff --git a/modopt/interface/log.py b/src/modopt/interface/log.py similarity index 100% rename from modopt/interface/log.py rename to src/modopt/interface/log.py diff --git a/modopt/math/__init__.py b/src/modopt/math/__init__.py similarity index 100% rename from modopt/math/__init__.py rename to src/modopt/math/__init__.py diff --git a/modopt/math/convolve.py b/src/modopt/math/convolve.py similarity index 100% rename from modopt/math/convolve.py rename to src/modopt/math/convolve.py diff --git a/modopt/math/matrix.py b/src/modopt/math/matrix.py similarity index 100% rename from modopt/math/matrix.py rename to src/modopt/math/matrix.py diff --git a/modopt/math/metrics.py b/src/modopt/math/metrics.py similarity index 100% rename from modopt/math/metrics.py rename to src/modopt/math/metrics.py diff --git a/modopt/math/stats.py b/src/modopt/math/stats.py similarity index 100% rename from modopt/math/stats.py rename to src/modopt/math/stats.py diff --git a/modopt/opt/__init__.py b/src/modopt/opt/__init__.py similarity index 100% rename from modopt/opt/__init__.py rename to src/modopt/opt/__init__.py diff --git a/modopt/opt/algorithms/__init__.py b/src/modopt/opt/algorithms/__init__.py similarity index 100% rename from modopt/opt/algorithms/__init__.py rename to src/modopt/opt/algorithms/__init__.py diff --git a/modopt/opt/algorithms/admm.py b/src/modopt/opt/algorithms/admm.py similarity index 100% rename from modopt/opt/algorithms/admm.py rename to src/modopt/opt/algorithms/admm.py diff --git a/modopt/opt/algorithms/base.py b/src/modopt/opt/algorithms/base.py similarity index 100% rename from modopt/opt/algorithms/base.py rename to src/modopt/opt/algorithms/base.py diff --git a/modopt/opt/algorithms/forward_backward.py b/src/modopt/opt/algorithms/forward_backward.py similarity index 100% rename from modopt/opt/algorithms/forward_backward.py rename to src/modopt/opt/algorithms/forward_backward.py diff --git a/modopt/opt/algorithms/gradient_descent.py b/src/modopt/opt/algorithms/gradient_descent.py similarity index 100% rename from modopt/opt/algorithms/gradient_descent.py rename to src/modopt/opt/algorithms/gradient_descent.py diff --git a/modopt/opt/algorithms/primal_dual.py b/src/modopt/opt/algorithms/primal_dual.py similarity index 100% rename from modopt/opt/algorithms/primal_dual.py rename to src/modopt/opt/algorithms/primal_dual.py diff --git a/modopt/opt/cost.py b/src/modopt/opt/cost.py similarity index 100% rename from modopt/opt/cost.py rename to src/modopt/opt/cost.py diff --git a/modopt/opt/gradient.py b/src/modopt/opt/gradient.py similarity index 100% rename from modopt/opt/gradient.py rename to src/modopt/opt/gradient.py diff --git a/modopt/opt/linear/__init__.py b/src/modopt/opt/linear/__init__.py similarity index 100% rename from modopt/opt/linear/__init__.py rename to src/modopt/opt/linear/__init__.py diff --git a/modopt/opt/linear/base.py b/src/modopt/opt/linear/base.py similarity index 100% rename from modopt/opt/linear/base.py rename to src/modopt/opt/linear/base.py diff --git a/modopt/opt/linear/wavelet.py b/src/modopt/opt/linear/wavelet.py similarity index 100% rename from modopt/opt/linear/wavelet.py rename to src/modopt/opt/linear/wavelet.py diff --git a/modopt/opt/proximity.py b/src/modopt/opt/proximity.py similarity index 100% rename from modopt/opt/proximity.py rename to src/modopt/opt/proximity.py diff --git a/modopt/opt/reweight.py b/src/modopt/opt/reweight.py similarity index 100% rename from modopt/opt/reweight.py rename to src/modopt/opt/reweight.py diff --git a/modopt/plot/__init__.py b/src/modopt/plot/__init__.py similarity index 100% rename from modopt/plot/__init__.py rename to src/modopt/plot/__init__.py diff --git a/modopt/plot/cost_plot.py b/src/modopt/plot/cost_plot.py similarity index 100% rename from modopt/plot/cost_plot.py rename to src/modopt/plot/cost_plot.py diff --git a/modopt/signal/__init__.py b/src/modopt/signal/__init__.py similarity index 100% rename from modopt/signal/__init__.py rename to src/modopt/signal/__init__.py diff --git a/modopt/signal/filter.py b/src/modopt/signal/filter.py similarity index 100% rename from modopt/signal/filter.py rename to src/modopt/signal/filter.py diff --git a/modopt/signal/noise.py b/src/modopt/signal/noise.py similarity index 100% rename from modopt/signal/noise.py rename to src/modopt/signal/noise.py diff --git a/modopt/signal/positivity.py b/src/modopt/signal/positivity.py similarity index 100% rename from modopt/signal/positivity.py rename to src/modopt/signal/positivity.py diff --git a/modopt/signal/svd.py b/src/modopt/signal/svd.py similarity index 100% rename from modopt/signal/svd.py rename to src/modopt/signal/svd.py diff --git a/modopt/signal/validation.py b/src/modopt/signal/validation.py similarity index 100% rename from modopt/signal/validation.py rename to src/modopt/signal/validation.py diff --git a/modopt/signal/wavelet.py b/src/modopt/signal/wavelet.py similarity index 100% rename from modopt/signal/wavelet.py rename to src/modopt/signal/wavelet.py diff --git a/modopt/tests/test_algorithms.py b/tests/test_algorithms.py similarity index 100% rename from modopt/tests/test_algorithms.py rename to tests/test_algorithms.py diff --git a/modopt/tests/test_base.py b/tests/test_base.py similarity index 100% rename from modopt/tests/test_base.py rename to tests/test_base.py diff --git a/modopt/tests/test_helpers/__init__.py b/tests/test_helpers/__init__.py similarity index 100% rename from modopt/tests/test_helpers/__init__.py rename to tests/test_helpers/__init__.py diff --git a/modopt/tests/test_helpers/utils.py b/tests/test_helpers/utils.py similarity index 100% rename from modopt/tests/test_helpers/utils.py rename to tests/test_helpers/utils.py diff --git a/modopt/tests/test_math.py b/tests/test_math.py similarity index 100% rename from modopt/tests/test_math.py rename to tests/test_math.py diff --git a/modopt/tests/test_opt.py b/tests/test_opt.py similarity index 100% rename from modopt/tests/test_opt.py rename to tests/test_opt.py diff --git a/modopt/tests/test_signal.py b/tests/test_signal.py similarity index 100% rename from modopt/tests/test_signal.py rename to tests/test_signal.py