Repository: uwefladrich/scriptengine (language: python)

Issue:
Add sphinx theme package as dev requirement
The package `sphinx-rtd-theme` is needed to build the documentation. This should be added as development requirement in `setup.py`.
Fix typos in docs and sources
Hello, I learned about ScriptEngine yesterday at a meeting in the BSC, and started reading the docs last night. I found a couple of typos, so ran the IDE linter over the docs & sources. Let me know if there's any edit in this pull request that is incorrect, and I will edit the commit correcting it.

Cheers,
-Bruno
Add sphinx theme package as dev requirement
The package `sphinx-rtd-theme` is needed to build the documentation. This should be added as development requirement in `setup.py`.


Discussion / hints:

That's great, thanks a lot for contributing @kinow ! :+1: 

I tend to use language support when writing the documentation at least but it appears that I did an imperfect job :grin: 

I think I found just one place where the correction is wrong. Will comment once the checks are passed.


Fix patch:
diff --git a/pyproject.toml b/pyproject.toml
index c1e088f..0b112c6 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -22,6 +22,22 @@
         "jinja2",
     ]
 
+    [project.optional-dependencies]
+        tests = [
+            "coverage",
+            "coveralls",
+            "pytest"
+        ]
+
+        docs = [
+            "sphinx",
+            "sphinx-rtd-theme"
+        ]
+
+        all = [
+            "scriptengine[tests,docs]"
+        ]
+
     [project.urls]
         "Homepage" = "https://github.com/uwefladrich/scriptengine"
         "Bug Tracker" = "https://github.com/uwefladrich/scriptengine/issues"
diff --git a/setup.py b/setup.py
index ac23a6e..a14241c 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,15 @@
 import setuptools
 
 if __name__ == "__main__":
+    tests = [
+        "coverage",
+        "coveralls",
+        "pytest"
+    ]
+    docs = [
+        "sphinx",
+        "sphinx-rtd-theme"
+    ]
     setuptools.setup(
         # The information below is duplicated from pyproject.toml.
         # This is because, for Python 3.6, we are stuck with older versions of
@@ -16,6 +25,11 @@
             "PyYAML",
             "jinja2",
         ],
+        extras_require={
+            "tests": tests,
+            "docs": docs,
+            "all": tests + docs
+        },
         entry_points={
             "console_scripts": [
                 "se = scriptengine.cli.se:main",


Test patch:
diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml
index f358f50..c27b0eb 100644
--- a/.github/workflows/pytest.yml
+++ b/.github/workflows/pytest.yml
@@ -45,8 +45,7 @@ jobs:
         name: Install Dependencies and ScriptEngine
         run: |
           python -m pip install --upgrade pip
-          python -m pip install --editable .
-          python -m pip install pytest
+          python -m pip install --editable .[tests]
       -
         name: Run pytest
         run: pytest
@@ -67,10 +66,7 @@ jobs:
         name: Install Dependencies and ScriptEngine
         run: |
           python -m pip install --upgrade pip
-          python -m pip install --editable .
-          python -m pip install pytest
-          python -m pip install coverage
-          python -m pip install coveralls
+          python -m pip install --editable .[tests]
       -
         name: Run coverage
         run: |