Skip to content

Commit

Permalink
Use fixed version numbers in dependencies (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
carnisj authored Mar 21, 2022
1 parent 5525707 commit 9d78468
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 151 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/python-package-3.8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: pip-install

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Cache dependencies
id: myCache
uses: actions/cache@v2
with:
path: /opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
if: steps.myCache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Format the code with black
run: python -m black bcdi --check

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. Use the default of 88 chars
python -m flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
- name: Type check with mypy
run: python -m mypy bcdi

- name: Test with pytest
run: python -m pytest
4 changes: 2 additions & 2 deletions .github/workflows/python-package-3.9.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: python-package-3.9
name: pip-install

on:
push:
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
if: steps.myCache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest black mypy
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Format the code with black
Expand Down
44 changes: 0 additions & 44 deletions .github/workflows/python-package-conda-3.9.yml

This file was deleted.

40 changes: 0 additions & 40 deletions environment.yml

This file was deleted.

62 changes: 31 additions & 31 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
numpy
scipy
scikit-image
matplotlib
hdf5plugin
h5py
traits
importlib_resources
xrayutilities
vtk
fabio
silx
lmfit
moviepy
pillow
tables
pandas
pyqt5
ipywidgets
pyyaml
black
coverage
doit
mypy
pycodestyle
pydocstyle
pyfakefs
sphinx
sphinxcontrib-mermaid
twine
wheel
black==22.1.0
coverage==6.3.2
doit==0.34.2
fabio==0.13.0
h5py==3.6.0
hdf5plugin==3.2.0
importlib-resources==5.4.0
ipywidgets==7.7.0
lmfit==1.0.3
matplotlib==3.5.1
moviepy==1.0.3
mypy==0.941
numpy==1.22.3
pandas==1.4.1
Pillow==9.0.1
pycodestyle==2.8.0
pydocstyle==6.1.1
pyfakefs==4.5.6
PyQt5==5.15.6
PyYAML==6.0
scikit-image==0.19.2
scipy==1.8.0
silx==1.0.0
Sphinx==4.4.0
sphinxcontrib-mermaid==0.7.1
tables==3.7.0
traits==6.3.2
twine==3.8.0
vtk==9.1.0
wheel==0.37.1
xrayutilities==1.7.3
66 changes: 32 additions & 34 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,44 +127,44 @@
6. Creating figures for publication using templates.""",
url="https://github.com/carnisj/bcdi",
project_urls={"Documentation": "https://bcdi.readthedocs.io/en/latest/"},
python_requires=">=3.6*, <3.10",
python_requires="==3.6*, <3.10",
install_requires=[
"numpy",
"scipy",
"scikit-image",
"matplotlib",
"hdf5plugin",
"h5py",
"traits",
"vtk",
"importlib_resources",
"xrayutilities",
"fabio",
"silx",
"pyyaml",
"tables",
"lmfit",
"moviepy",
"pillow",
"pandas",
"pyqt5",
"ipywidgets",
"fabio==0.13.0",
"hdf5plugin==3.2.0",
"h5py==3.6.0",
"importlib-resources==5.4.0",
"ipywidgets==7.7.0",
"lmfit==1.0.3",
"matplotlib==3.5.1",
"moviepy==1.0.3",
"numpy==1.22.3",
"pandas==1.4.1",
"pillow==9.0.1",
"pyqt5==5.15.6",
"pyyaml==6.0",
"scikit-image==0.19.2",
"scipy==1.8.0",
"silx==1.0.0",
"tables==3.7.0",
"traits==6.3.2",
"vtk==9.1.0",
"xrayutilities==1.7.3",
],
extras_require={
"doc": [
"sphinx",
"sphinxcontrib-mermaid",
"sphinx==4.4.0",
"sphinxcontrib-mermaid==0.7.1",
],
"dev": [
"black",
"coverage",
"doit",
"mypy",
"pycodestyle",
"pydocstyle",
"pyfakefs",
"twine",
"wheel",
"black==22.1.0",
"coverage==6.3.2",
"doit==0.34.2",
"mypy==0.941",
"pycodestyle==2.8.0",
"pydocstyle==6.1.1",
"pyfakefs==4.5.6",
"twine==3.8.0",
"wheel==0.37.1",
],
},
classifiers=[
Expand All @@ -183,8 +183,6 @@
# that you indicate whether you support Python 2, Python 3 or both.
# These classifiers are *not* checked by 'pip install'. See instead
# 'python_requires' below.
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Operating System :: OS Independent",
Expand Down

0 comments on commit 9d78468

Please sign in to comment.