Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/macs3/output vers libs ga #625

Merged
merged 3 commits into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/build-and-test-MACS3-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,31 @@ jobs:
- name: Setup venv
run: |
# create venv
python -m venv macs3venv
python3 -m venv macs3venv
- name: Install dependencies
run: |
# make sure pip is the lastest
source macs3venv/bin/activate
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install --upgrade -r requirements.txt; fi
python3 -m pip install --upgrade pip
python3 -m pip install pytest
if [ -f requirements.txt ]; then python3 -m pip install --upgrade -r requirements.txt; fi
- name: Install MACS
run: |
# we use pip install instead of old fashion setup.py install
source macs3venv/bin/activate
pip install .
python3 -m pip install .
- name: Output versions of installed libraries
run: |
source macs3venv/bin/activate
python3 -m pip freeze
- name: Test with pytest
run: |
source macs3venv/bin/activate
pytest --runxfail && cd test && ./cmdlinetest macs3
- name: Build sdist
run: |
source macs3venv/bin/activate
python setup.py sdist
python3 setup.py sdist
- name: Archive sdist
uses: actions/upload-artifact@v4
with:
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/build-and-test-MACS3-non-x64-others.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
# Create an artifacts directory
setup: |
chmod a+rw ${PWD}

# Mount the current working directory (with checked-out codes) as /MACS3 in the container
dockerRunArgs: |
-v "${PWD}:/MACS3"
Expand Down Expand Up @@ -75,11 +75,15 @@ jobs:

# install dependencies
if [ -f requirements.txt ]; then
pip3 install -r requirements.txt;
python3 -m pip install -r requirements.txt;
fi

# install MACS3
pip3 install .
python3 -m pip install .

# output versions of installed libraries
python3 -m pip freeze

# run test
pytest --runxfail && cd test && ./cmdlinetest macs3

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/build-and-test-MACS3-non-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,15 @@ jobs:

# install dependencies
if [ -f requirements.txt ]; then
pip3 install -r requirements.txt;
python3 -m pip install -r requirements.txt;
fi

# install MACS3
pip3 install .
python3 -m pip install .

# output versions of installed libraries
python3 -m pip freeze

# run test
pytest --runxfail && cd test && ./cmdlinetest macs3

Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/build-and-test-MACS3-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ on:
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
arch: ['x64']
name: Build on x64 with Python ${{ matrix.python-version }}
Expand All @@ -44,17 +44,20 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
${{ runner.os }}-
- name: Install dependencies
run: |
# make sure pip is the lastest
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install --upgrade -r requirements.txt; fi
python3 -m pip install --upgrade pip
python3 -m pip install pytest
if [ -f requirements.txt ]; then python3 -m pip install --upgrade -r requirements.txt; fi
- name: Install MACS
run: |
# we use pip install instead of old fashion setup.py install
pip install .
python3 -m pip install .
- name: Output versions of installed libraries
run: |
python3 -m pip freeze
- name: Test with pytest
run: |
pytest --runxfail
Expand All @@ -63,7 +66,7 @@ jobs:
cd ..
- name: Build sdist
run: |
python setup.py sdist
python3 setup.py sdist
- name: Archive sdist
uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-gh-with-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx myst-parser sphinx-rtd-theme # Add other dependencies you might have
python3 -m pip install --upgrade pip
python3 -m pip install sphinx myst-parser sphinx-rtd-theme # Add other dependencies you might have

- name: Build Sphinx Documentation
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install --upgrade -r requirements.txt; fi
python3 -m pip install --upgrade pip
if [ -f requirements.txt ]; then python3 -m pip install --upgrade -r requirements.txt; fi
# setuptools, wheel and twine are needed to upload to pypi
pip install setuptools wheel twine
python3 -m pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist
twine upload dist/*
python3 setup.py sdist
python3 -m twine upload dist/*
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires=['setuptools>=60.0', 'numpy>=1.24.2', 'scipy>=1.11.4', 'cykhash>=2.0,<3.0', 'Cython~=3.0', 'scikit-learn>=1.2.1', 'hmmlearn>=0.3']
requires=['setuptools>=60.0', 'numpy>=1.24.2', 'scipy>=1.11.4', 'cykhash>=2.0,<3.0', 'Cython~=3.0', 'scikit-learn>=1.2.1', 'hmmlearn==0.3.0']

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Cython~=3.0
numpy>=1.24.2
scipy>=1.11.4
scikit-learn>=1.2.1
hmmlearn>=0.3
hmmlearn==0.3.0
cykhash>=2.0,<3.0
pytest>=7.0
setuptools>=60.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

install_requires = [ "numpy>=1.24.2",
"scipy>=1.11.4",
"hmmlearn>=0.3",
"hmmlearn==0.3.0",
"scikit-learn>=1.2.1",
"cykhash>=2.0,<3.0"]

Expand Down