Skip to content

Commit

Permalink
BLD+TST Simplify building
Browse files Browse the repository at this point in the history
The instructions still dated from before conda was so well established

Change testing to match and test on all platforms (linux, macosx, and
Windows)
  • Loading branch information
luispedro committed Jun 26, 2024
1 parent 2ab41c9 commit 6050aa7
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 96 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Build Status

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version:
- "3.6"
- "3.7"
Expand All @@ -21,18 +23,23 @@ jobs:
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"

- name: Build environment
activate-environment: test
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- name: Install dependencies
shell: bash -l {0}
run : |
conda install -c bioconda -c conda-forge \
ngless pyrodigal megahit paladin pandas atomium tzlocal \
"scikit-learn<1.3.0" "joblib<1.3.0"
conda install pytest
pip install .
- name: Test with pytest
shell: bash -l {0}
run: |
conda install -y mamba -n base -c conda-forge
PYTHON_VERSION=${{ matrix.python-version }} ./install.sh
source /usr/share/miniconda3/bin/activate envs/Macrel_env/
# Using conda/mamba to install pytest can cause other packages to be downgraded!
pip install pytest
python -m pytest macrel/tests
- name: Test Macrel
- name: Test Macrel CLI
shell: bash -l {0}
run: |
source /usr/share/miniconda3/bin/activate envs/Macrel_env/
./run-tests.sh
python -m pytest macrel/tests
23 changes: 16 additions & 7 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,26 @@ conda install -c bioconda macrel

## Install from source

If you want to use an unreleased version from Github, for example, we provide a
script using _conda_ (in particular, using
[bioconda](https://bioconda.github.io/) and
[conda-forge](https://conda-forge.org/)) to install all dependencies in a
Macrel-specific environment:
If you want to use an unreleased version from Github, or tweak the code, we still recommend conda to manage the dependencies. You can install from source by running:

```bash
git clone https://github.com/BigDataBiology/Macrel
cd macrel
./install.sh
conda activate envs/Macrel_env

conda create -n macrel_env
conda activate macrel_env
conda install -y \
ngless \
pyrodigal \
megahit \
paladin \
pandas \
"scikit-learn<1.3.0" \
"joblib<1.3.0" \
atomicwrites \
tzlocal

pip install .
```

Thereafter, to use macrel, activate this environment.
Expand Down
73 changes: 0 additions & 73 deletions install.sh

This file was deleted.

5 changes: 0 additions & 5 deletions recipe/build.sh

This file was deleted.

0 comments on commit 6050aa7

Please sign in to comment.