Skip to content

Commit

Permalink
limit scikit-learn version so numpy won't be upgraded too high. Add s…
Browse files Browse the repository at this point in the history
…phinx rtd theme.
  • Loading branch information
taoliu committed Feb 14, 2024
1 parent e984754 commit d7c044d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 16 deletions.
35 changes: 21 additions & 14 deletions .github/workflows/build-and-test-MACS3-non-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ jobs:
apt-get update -qq -y
apt-get install apt-utils
apt-get install -yq libblas3 liblapack3 libblas-dev liblapack-dev
# we rely on Debian/Linux python packages for numpy/scipy/sklearn
# we rely on Debian/Ubuntu/Linux python packages for
# numpy/scipy/sklearn
# in Ubuntu 22
# numpy: 1.21.5
# scipy: 1.8.0
# sklearn: 0.23.2
# cython: 0.29.28
apt-get install -yq python3 python3-pip python3-venv python3-wheel python3-numpy python3-scipy python3-sklearn cython3
apt-get install -yq procps zlib1g zlib1g-dev gfortran
run: |
Expand All @@ -75,7 +81,7 @@ jobs:
# let's create virtualenv
python3 -m venv --system-site-packages macsenv
# virtualenv --python=python3.11 --system-site-packages macsenv
# activate macsenv
source macsenv/bin/activate
# copy source code over
Expand All @@ -85,25 +91,26 @@ jobs:
# let's make sure this file is gone...
rm -f no-global-site-packages.txt
# pip will be upgraded
python3 -m pip install --upgrade pip
# since we require Cython3, cython will be upgraded to
# version > 3.0
# --upgrade-strategy only-if-needed flag is used so that
# we only upgrade libs if necessary. In this case, Cython,
# Numpy, setuptools will be upgraded.
if [ -f requirements.txt ]; then
pip3 install --upgrade-strategy only-if-needed -r requirements.txt;
fi
# upgrade pip
# pip install --progress-bar off --upgrade pip
# install dependencies that are not in Debian/Linux
# pip install --upgrade-strategy only-if-needed --progress-bar off Cython
# pip install --upgrade-strategy only-if-needed --progress-bar off hmmlearn
# pip install --upgrade-strategy only-if-needed --progress-bar off cykhash
# pip install --upgrade --progress-bar off pytest
# install MACS3; only-if-needed won't try to upgrade Debian/Linux python3 libs
# pip install --upgrade-strategy only-if-needed --no-build-isolation --progress-bar off .
pip install --upgrade-strategy only-if-needed .
# pip install --upgrade-strategy only-if-needed
# --no-build-isolation --progress-bar off .
# Because we already upgraded the libraries in previous
# step, I don't expect to see any dependencies will be
# upgraded here.
pip3 install --upgrade-strategy only-if-needed .
# run test
pytest --runxfail && cd test && ./cmdlinetest-nohmmratac macs3
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-MACS3-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx myst-parser # Add other dependencies you might have
pip install sphinx myst-parser sphinx-rtd-theme # Add other dependencies you might have
- name: Build Sphinx Documentation
run: |
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[build-system]
requires=['setuptools>=60.0', 'numpy==1.24', 'cykhash>=2.0,<3.0', 'Cython~=3.0', 'hmmlearn>=0.3']
requires=['setuptools>=60.0', 'numpy==1.24', 'cykhash>=2.0,<3.0', 'Cython~=3.0', 'scikit-learn<1.4'
,'hmmlearn>=0.3']
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Cython~=3.0
numpy==1.24
scikit-learn<1.4
hmmlearn>=0.3
cykhash>=2.0,<3.0
pytest>=7.0
Expand Down

0 comments on commit d7c044d

Please sign in to comment.