Repository: AUTODIAL/AutoEIS (language: python)

Issue:
Requirements files need to be unified in pyproject.toml
Having them in one place makes things less error-prone.


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index 40f6cc80..a5b333a2 100644
--- a/.github/workflows/gh-pages.yml
+++ b/.github/workflows/gh-pages.yml
@@ -21,13 +21,11 @@ jobs:
       - name: "Install AutoEIS"
         run: |
             python -m pip install --upgrade pip
-            pip install -r requirements.txt
-            pip install . --no-deps
+            pip install -e .[doc]
 
       # Build the documentation
       - name: Build the documentation
         run: |
-          pip install -r doc/requirements.txt
           cd doc
           make html
 
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 1994fc4d..0d79ff3f 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -37,9 +37,8 @@ jobs:
       - name: "Install AutoEIS"
         run: |
             python -m pip install --upgrade pip
-            pip install -r requirements.txt
-            pip install . --no-deps
+            pip install -e .[test]
             python -m autoeis install
       - name: "Run tests"
         run: |
-          pytest .
+          pytest -v .
diff --git a/doc/requirements.txt b/doc/requirements.txt
deleted file mode 100644
index ad1dcf96..00000000
--- a/doc/requirements.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-furo
-linkify-it-py
-myst-parser
-sphinx
-sphinx-copybutton
-sphinx-autodoc2
diff --git a/pyproject.toml b/pyproject.toml
index 4c144f95..4099da48 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -49,7 +49,18 @@ dependencies = [
     "seaborn",
     "tqdm",
 ]
-
+[project.optional-dependencies]
+test = [
+  "pytest",
+]
+doc = [
+    "furo",
+    "linkify-it-py",
+    "myst-parser",
+    "sphinx",
+    "sphinx-copybutton",
+    "sphinx-autodoc2",
+]
 [project.urls]
 "Homepage" = "https://github.com/AUTODIAL/AutoEIS"
 "Bug Tracker" = "https://github.com/AUTODIAL/AutoEIS/issues"
diff --git a/requirements.txt b/requirements.txt
deleted file mode 100644
index 4061e305..00000000
--- a/requirements.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-arviz
-click
-dill
-impedance
-ipython
-ipywidgets
-jax
-jaxlib
-julia
-matplotlib
-mpire
-numpy
-numpyro
-pandas
-pyparsing
-pytest
-rich
-scikit-learn
-seaborn
-tqdm


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 01bb8759..55574c4a 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -33,9 +33,8 @@ jobs:
       - name: "Install AutoEIS"
         run: |
             python -m pip install --upgrade pip
-            pip install -r requirements.txt
-            pip install . --no-deps
+            pip install -e .[test]
             python -m autoeis install
       - name: "Run tests"
         run: |
-          pytest .
+          pytest -v .