From 6986e38ce290c7672836348e0de36fab68be03f9 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Mon, 28 Oct 2024 14:18:16 +0100 Subject: [PATCH] :bug: fix installation issue of pimms on PR using colab image (#82) * :bug: fix installation issue of pimms on PR - solved by installing directly from GitHub PullRequest --- .github/workflows/ci.yaml | 16 ++++++++-------- .github/workflows/test_pkg_on_colab.yaml | 11 ++++++++--- pimmslearn/__init__.py | 1 + 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7cb8b26a3..a0d594b5e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,7 +27,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Miniconda uses: conda-incubator/setup-miniconda@v3 - with: + with: python-version: ${{ matrix.python-version }} channel-priority: strict environment-file: snakemake_env.yml @@ -42,21 +42,21 @@ jobs: conda env export --no-builds conda env export --no-builds > environment_w_versions.yml - name: Dry-Run demo workflow (integration test) - run: | + run: | cd project snakemake -p -c1 --configfile config/single_dev_dataset/example/config.yaml --use-conda -n - name: Run demo workflow (integration test) continue-on-error: true - run: | + run: | cd project snakemake -p -c4 -k --configfile config/single_dev_dataset/example/config.yaml --use-conda - name: Run demo workflow again (in case of installation issues) continue-on-error: true - run: | + run: | cd project snakemake -p -c4 -k --configfile config/single_dev_dataset/example/config.yaml --use-conda - name: Run demo workflow again (in case of installation issues) - one thread - run: | + run: | cd project snakemake -p -c1 --configfile config/single_dev_dataset/example/config.yaml --use-conda - name: Archive results @@ -92,13 +92,13 @@ jobs: - name: Install pytest run: pip install pytest pytest-cov - + - name: Run pytest run: pytest . - name: Install papermill run: pip install papermill ipykernel - + - name: View papermill help message for notebooks (as scripts) run: | cd project @@ -123,7 +123,7 @@ jobs: steps: - uses: actions/checkout@v4 - + - uses: actions/setup-python@v5 with: python-version: "3.8" diff --git a/.github/workflows/test_pkg_on_colab.yaml b/.github/workflows/test_pkg_on_colab.yaml index 6109c0810..5f6fafe3a 100644 --- a/.github/workflows/test_pkg_on_colab.yaml +++ b/.github/workflows/test_pkg_on_colab.yaml @@ -19,9 +19,13 @@ jobs: - uses: actions/checkout@v4 - name: Install pimms-learn (from branch) and papermill if: github.event_name == 'pull_request' - run: | - pip install . - pip install papermill + run: | + echo $GITHUB_REF + pip install git+https://github.com/RasmussenLab/pimms.git@$GITHUB_REF + pip install papermill + cd project + echo python3 -c "import pimmslearn; print(pimmslearn.__version__)" + python3 -c "import pimmslearn; print(pimmslearn.__version__)" - name: Install pimms-learn (from PyPI) and papermill if: github.event_name == 'schedule' run: | @@ -29,6 +33,7 @@ jobs: - name: Run tutorial run: | cd project + which papermill papermill 04_1_train_pimms_models.ipynb 04_1_train_pimms_models_output.ipynb papermill 04_1_train_pimms_models.ipynb 04_1_train_pimms_models_no_val.ipynb -p sample_splits False diff --git a/pimmslearn/__init__.py b/pimmslearn/__init__.py index 95021ccad..262462099 100644 --- a/pimmslearn/__init__.py +++ b/pimmslearn/__init__.py @@ -17,6 +17,7 @@ import njab +import pimmslearn.io import pimmslearn.logging import pimmslearn.nb import pimmslearn.pandas