diff --git a/.github/workflows/dev_envs.yml b/.github/workflows/dev_envs.yml index fb82e43b80..a54e908030 100644 --- a/.github/workflows/dev_envs.yml +++ b/.github/workflows/dev_envs.yml @@ -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 diff --git a/dev.yml b/dev.yml new file mode 100644 index 0000000000..75968fe57c --- /dev/null +++ b/dev.yml @@ -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 diff --git a/doc/developer.md b/doc/developer.md index d19118b1da..5e93de594f 100644 --- a/doc/developer.md +++ b/doc/developer.md @@ -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