Skip to content

Commit

Permalink
bring back conda
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Feb 12, 2024
1 parent 2f5f864 commit 6e8ffff
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/dev_envs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,34 @@ jobs:
- name: run tests for 3.10
shell: pixi run bash {0}
run: tox -e py310

mamba:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-14]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: cache conda
uses: actions/cache@v4
env:
CACHE_NUMBER: 0
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}

- name: setup conda
uses: conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a
with:
python-version: "3.10"
miniforge-version: latest
environment-file: dev.yml
activate-environment: sourmash_dev
auto-activate-base: false

- name: run tests for 3.10
shell: bash -l {0}
run: tox -e py310
12 changes: 12 additions & 0 deletions dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: sourmash_dev
channels:
- conda-forge
dependencies:
- clangdev >=16.0.6,<16.1
- cxx-compiler =1.7.*
- git =2.41.0.*
- libclang >=16,<17
- pandoc =3.1.3.*
- python =3.10.*
- rust =1.75.0.*
- tox >=4.11.0,<5
28 changes: 26 additions & 2 deletions doc/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,36 @@ git clone https://github.com/sourmash-bio/sourmash.git
```
sourmash runs under Python 3.10 and later.

We recommend using `pixi` or `Nix` for setting up an environment for developing
We recommend using `conda` for setting up an environment for developing
new features, running tests and code quality checks.
Here are some suggestions on how to set them up (note: you only need one =])
Here are some suggestions on how to set them up

:::{note}
You only need one of these, no need to install them all!
:::

::::{tab-set}

:::{tab-item} conda

Follow the [installation instructions](https://github.com/conda-forge/miniforge#install) for
installing `Miniforge3` (a conda distribution that uses
the [`conda-forge`](https://conda-forge.org/) channel by default).

Once `conda` is installed, run
```
conda create -n sourmash_dev -f dev.yml
```
to create an environment called `sourmash_dev` containing the programs needed
for development.

Once the environment is created, you can activate it for development with
```
conda activate sourmash_dev
```

:::

:::{tab-item} pixi

Follow the [installation instructions](https://github.com/prefix-dev/pixi) for
Expand Down

0 comments on commit 6e8ffff

Please sign in to comment.