-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from helicalAI/include-release-build
Include release build
- Loading branch information
Showing
4 changed files
with
144 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
- release | ||
|
||
jobs: | ||
tests: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
name: Release | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- release | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
tests: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements-dev.txt | ||
pip install . | ||
# First download before tests as they make use of the downloaded files | ||
- name: Download all files | ||
run: | | ||
python ci/download_all.py | ||
- name: Execute unittests | ||
run: | | ||
pytest --cov-report=html:html_cov --cov-branch --cov-report term --cov=helical ci/ | ||
- name: Upload coverage report | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-report | ||
path: html_cov/ | ||
|
||
# Does not seem to work but would be nice to have | ||
# - name: Pytest coverage comment | ||
# uses: MishaKav/pytest-coverage-comment@main | ||
# with: | ||
# pytest-coverage-path: ./pytest-coverage.txt | ||
# junitxml-path: ./pytest.xml | ||
|
||
|
||
- name: Execute Geneformer v1 | ||
run: | | ||
python examples/run_models/run_geneformer.py ++model_name="gf-12L-30M-i2048" | ||
- name: Execute Geneformer v2 | ||
run: | | ||
python examples/run_models/run_geneformer.py ++model_name="gf-12L-95M-i4096" | ||
- name: Execute scGPT | ||
run: | | ||
python examples/run_models/run_scgpt.py | ||
- name: Execute UCE | ||
run: | | ||
python examples/run_models/run_uce.py | ||
- name: Execute Hyena | ||
run: | | ||
python examples/run_models/run_hyena_dna.py | ||
- name: Execute benchmarking | ||
run: | | ||
pip install scanorama | ||
python examples/run_benchmark.py | ||
notebooks: | ||
needs: tests | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements-dev.txt | ||
- name: Reduce datasets to speedup checks | ||
run: | | ||
sed -i 's/train\[:65%\]/train\[:5%\]/g' ./examples/notebooks/Cell-Type-Annotation.ipynb | ||
sed -i 's/train\[70%:\]/train\[5%:7%\]/g' ./examples/notebooks/Cell-Type-Annotation.ipynb | ||
sed -i 's/get_anndata_from_hf_dataset(ds\[\\"train\\"\])/get_anndata_from_hf_dataset(ds\[\\"train\\"\])[:100]/g' ./examples/notebooks/Cell-Type-Classification-Fine-Tuning.ipynb | ||
sed -i 's/get_anndata_from_hf_dataset(ds\[\\"test\\"\])/get_anndata_from_hf_dataset(ds\[\\"test\\"\])[:10]/g' ./examples/notebooks/Cell-Type-Classification-Fine-Tuning.ipynb | ||
sed -i 's/list(np.array(train_dataset.obs\[\\"LVL1\\"].tolist()))/list(np.array(train_dataset.obs\[\\"LVL1\\"].tolist()))[:100]/g' ./examples/notebooks/Cell-Type-Classification-Fine-Tuning.ipynb | ||
sed -i 's/list(np.array(test_dataset.obs\[\\"LVL1\\"].tolist()))/list(np.array(test_dataset.obs\[\\"LVL1\\"].tolist()))[:10]/g' ./examples/notebooks/Cell-Type-Classification-Fine-Tuning.ipynb | ||
- name: Run Notebooks | ||
run: | | ||
pytest --durations=0 --nbmake ./examples/notebooks/*.ipynb | ||
release: | ||
needs: notebooks | ||
runs-on: self-hosted | ||
steps: | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install build | ||
- name: Extract version | ||
id: get_version | ||
run: | | ||
# Extract version from setup.py (or adjust for your version file) | ||
VERSION=$(python setup.py --version) | ||
echo "::set-output name=version::$VERSION" | ||
- name: Check if tag exists | ||
id: check_tag | ||
run: | | ||
if git rev-parse "v${{ steps.get_version.outputs.version }}" >/dev/null 2>&1; then | ||
echo "Tag v${{ steps.get_version.outputs.version }} already exists." | ||
exit 1 | ||
fi | ||
- name: Create Git tag | ||
if: steps.check_tag.outcome == 'success' | ||
run: | | ||
git config user.name "github-actions" | ||
git config user.email "[email protected]" | ||
git tag "v${{ steps.get_version.outputs.version }}" | ||
git push origin "v${{ steps.get_version.outputs.version }}" | ||
- name: Build package | ||
run: python -m build | ||
|
||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
from setuptools import setup, find_packages | ||
# from helical.version import __version__ | ||
|
||
setup( | ||
name='helical', | ||
# version=__version__, | ||
|
||
url='https://github.com/helicalAI/helical-package.git', | ||
author='Benoit Putzeys, Maxime Allard', | ||
author_email='[email protected], [email protected]', | ||
|