Repository: MDAnalysis/membrane-curvature (language: python)

Issue:
MDA>=2.0.0 version added to `install_requires`
This PR fixes #46 

- [x] In `setup.py`, three packages were added to install requires:
- 'numpy>=1.20.2',
- 'mdanalysis>=2.0.0',
- 'mdanalysistests>=2.0.0'.


- [x] For NumPy:
- Check if installed.
- Check `Python>=3.6`

@IAlibay, would you please confirm no more changes are needed here at the moment?


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml
index 10e643e..1aecd03 100644
--- a/.github/workflows/CI.yaml
+++ b/.github/workflows/CI.yaml
@@ -17,20 +17,25 @@ concurrency:
   group: "${{ github.ref }}-${{ github.head_ref }}"
   cancel-in-progress: true
 
+
 jobs:
   test:
-    name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
+    name: "Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}"
     runs-on: ${{ matrix.os }}
     strategy:
       fail-fast: false
       matrix:
         os: [macOS-latest, ubuntu-latest, windows-latest]
-        python-version-min: [3.6, 3.7]
         python-version: [3.7, 3.8, 3.9]
-        
+        env_file: [env, ]
+        include:
+          - name: minimum_requirements
+            os: ubuntu-latest
+            python-version: 3.6
+            env_file: min
 
     steps:
-    - uses: actions/checkout@v1
+    - uses: actions/checkout@v2
 
     - name: Additional info about the build
       shell: bash
@@ -39,23 +44,19 @@ jobs:
         df -h
         ulimit -a
 
-
     # More info on options: https://github.com/conda-incubator/setup-miniconda
     # An environment for the minimum versions 
     - uses: conda-incubator/setup-miniconda@v2
       with:
-        python-version: ${{ matrix.python-version-min }}
-        environment-file: devtools/conda-envs/test_min.yaml
+        python-version: ${{ matrix.python-version }}
+        environment-file: devtools/conda-envs/test_${{ matrix.env_file }}.yaml
         channels: conda-forge, defaults
-
         activate-environment: test
         auto-update-conda: false
         auto-activate-base: false
         show-channel-urls: true
-        mamba-version: "*"   
     
     - name: Install package
-
       # conda setup requires this special shell
       shell: bash -l {0}
       run: |
@@ -65,7 +66,6 @@ jobs:
     - name: Run tests
       # conda setup requires this special shell
       shell: bash -l {0}
-
       run: |
         pytest -v --cov=membrane_curvature --cov-report=xml --color=yes membrane_curvature/tests/
 
@@ -75,39 +75,5 @@ jobs:
         file: ./coverage.xml
         flags: unittests
         name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
+        fail_ci_if_error: True
 
-
-    # Another environment for the the highest versions
-    - uses: conda-incubator/setup-miniconda@v2
-      with:
-        python-version: ${{ matrix.python-version }}
-        environment-file: devtools/conda-envs/test_env.yaml
-        channels: conda-forge, defaults
-
-        activate-environment: test
-        auto-update-conda: false
-        auto-activate-base: false
-        show-channel-urls: true
-        mamba-version: "*"
-
-    - name: Install package
-
-      # conda setup requires this special shell
-      shell: bash -l {0}
-      run: |
-        python -m pip install . --no-deps
-        conda list
-
-    - name: Run tests
-      # conda setup requires this special shell
-      shell: bash -l {0}
-
-      run: |
-        pytest -v --cov=membrane_curvature --cov-report=xml --color=yes membrane_curvature/tests/
-
-    - name: CodeCov
-      uses: codecov/codecov-action@v1
-      with:
-        file: ./coverage.xml
-        flags: unittests
-        name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
diff --git a/setup.py b/setup.py
index 7a1016d..3b7d5a7 100644
--- a/setup.py
+++ b/setup.py
@@ -12,17 +12,12 @@
 needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
 pytest_runner = ['pytest-runner'] if needs_pytest else []
 
-if __name__ == "__main__":
-
+try:
     with open("README.md", "r") as handle:
         long_description = handle.read()
+except:
+    long_description = "\n".join(short_description[2:])
 
-    # set requirements
-    install_requires = [
-        'numpy>=1.19.5',
-        'mdanalysis>=2.0.0b0',
-        'mdanalysistests>=2.0.0b0',
-    ]
 
 setup(
     # Self-descriptive entries which should always be present
@@ -47,11 +42,19 @@
     include_package_data=True,
 
     # Allows `setup.py test` to work correctly with pytest
-    setup_requires=['numpy>=1.19.5'] + pytest_runner,
+    setup_requires=[] + pytest_runner,
 
     # Additional entries you may want simply uncomment the lines you want and fill in the data
     # url='http://www.my_package.com',  # Website
-    # install_requires=[],              # Required packages, pulls from pip if needed; do not use for Conda deployment
+    install_requires=[
+        'numpy>=1.16.0',
+        'mdanalysis>=2.0.0b0',
+    ],
+
+    # packages required to run tests
+    tests_require=[
+        'pytest',
+    ],
     # platforms=['Linux',
     #            'Mac OS-X',
     #            'Unix',


Test patch:
diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml
index 88e3288..c89ab14 100644
--- a/devtools/conda-envs/test_env.yaml
+++ b/devtools/conda-envs/test_env.yaml
@@ -5,7 +5,7 @@ channels:
 dependencies:
   - python
   - pip
-  - numpy==1.18.0
+  - numpy
   - sphinx
      # Testing
   - pytest
diff --git a/devtools/conda-envs/test_min.yaml b/devtools/conda-envs/test_min.yaml
index 82a11ae..a3fe95e 100644
--- a/devtools/conda-envs/test_min.yaml
+++ b/devtools/conda-envs/test_min.yaml
@@ -1,12 +1,12 @@
-name: test_min
+name: test
 channels:
   - conda-forge
   - defaults
 dependencies:
   - python
   - pip
-  - sphinx
   - numpy==1.16.0
+  - sphinx
      # Testing
   - pytest
   - pytest-cov
@@ -14,4 +14,4 @@ dependencies:
 
     # Pip-only installs
   - pip:
-    - MDAnalysis==2.0.0b0
\ No newline at end of file
+    - MDAnalysis==2.0.0b0