Repository: pierreablin/picard (language: python)

Issue:
Requirements are not automatically installed when running a pip install
When installing into a Docker image, we get: 

```
Python 3.8.10 (default, May 12 2021, 15:46:43) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import picard
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/site-packages/picard/__init__.py", line 23, in <module>
    from .dropin_sklearn import Picard  # noqa
  File "/usr/local/lib/python3.8/site-packages/picard/dropin_sklearn.py", line 10, in <module>
    from sklearn.decomposition import FastICA
ModuleNotFoundError: No module named 'sklearn'
``` 

I think that's because the `setup.py` doesn't have a "requires" section, but not sure.


Discussion / hints:

Fix patch:
diff --git a/setup.py b/setup.py
index 893b71a..0c8b10b 100644
--- a/setup.py
+++ b/setup.py
@@ -61,10 +61,12 @@ def package_tree(pkgroot):
                        'Programming Language :: Python :: 3',
                        ],
           platforms='any',
-          python_requires='>=3.6',
+          python_requires='>=3.7',
           install_requires=[
               'numpy',
+              'scipy',
               'numexpr',
+              'sklearn'
           ],
           packages=package_tree('picard'),
           )


Test patch:
diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml
index 9e4e057..e4131fe 100644
--- a/.github/workflows/unittests.yml
+++ b/.github/workflows/unittests.yml
@@ -13,7 +13,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        python: [3.6, 3.8]
+        python: [3.7, 3.8, 3.9]
     steps:
       - uses: actions/checkout@v2
       - uses: conda-incubator/setup-miniconda@v2
@@ -25,10 +25,9 @@ jobs:
           sudo apt-get install octave
           conda --version
           which python
-          conda install --yes --quiet --file requirements.txt
+          python setup.py install
           pip install flake8 check-manifest
           pip install pytest coverage pytest-sugar
-          python setup.py install
       - name: Run Python unit tests
         run: |
           make