Skip to content
21 changes: 11 additions & 10 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: docs

on:
push:
branches: [main, dev]
branches: [main, dev, upgrade_ci]
workflow_dispatch:

jobs:
Expand All @@ -15,25 +15,26 @@ jobs:

steps:
- name: check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: set up Conda/Mamba
uses: conda-incubator/setup-miniconda@v2
- name: set up Miniforge with ZARP-cli environment
uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.10"
mamba-version: "*"
environment-file: install/environment.dev.yml
miniforge-version: latest
conda-remove-defaults: true
channel-priority: strict
auto-update-conda: true
activate-environment: zarp-cli
environment-file: install/environment.dev.root.yml
auto-activate-base: false
activate-environment: zarp-cli

- name: display environment info
- name: display Conda and environment info
run: |
conda info -a
conda list

- name: cache build artifacts
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ github.ref }}
path: .cache
Expand Down
71 changes: 37 additions & 34 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,29 @@ jobs:

steps:
- name: check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: set up Conda/Mamba
uses: conda-incubator/setup-miniconda@v2
- name: set up Miniforge with ZARP-cli environment
uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.10"
mamba-version: "*"
auto-update-conda: true
activate-environment: zarp-cli
environment-file: install/environment.dev.yml
miniforge-version: latest
conda-remove-defaults: true
channel-priority: strict
auto-update-conda: true
auto-activate-base: false
activate-environment: zarp-cli

- name: display environment info
- name: display Conda and environment info
run: |
conda info -a
conda list

- name: Install Apptainer
uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.3.6

- name: flake8
run: flake8

Expand All @@ -43,31 +49,32 @@ jobs:
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: [ '3.9', '3.10' ]
name: unit-testing-Python-${{ matrix.python-version }}

steps:
- name: check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: set up Conda/Mamba
uses: conda-incubator/setup-miniconda@v2
- name: set up Miniforge with ZARP-cli environment
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
environment-file: install/environment.dev.yml
miniforge-version: latest
conda-remove-defaults: true
channel-priority: strict
auto-update-conda: true
activate-environment: zarp-cli
environment-file: install/environment.dev.root.yml
auto-activate-base: false
activate-environment: zarp-cli

- name: display environment info
- name: display Conda and environment info
run: |
conda info -a
conda list

- name: Install Apptainer
uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.3.6

- name: run unit tests
run: |
coverage run --source zarp -m pytest && coverage xml
Expand All @@ -85,27 +92,23 @@ jobs:
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: [ '3.9', '3.10' ]
name: integration-testing-Python-${{ matrix.python-version }}

steps:
- name: check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: set up Conda/Mamba
uses: conda-incubator/setup-miniconda@v2
- name: set up Miniforge with ZARP-cli environment
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
environment-file: install/environment.dev.yml
miniforge-version: latest
conda-remove-defaults: true
channel-priority: strict
auto-update-conda: true
activate-environment: zarp-cli
environment-file: install/environment.dev.root.yml
auto-activate-base: false
activate-environment: zarp-cli

- name: display environment info
- name: display Conda and environment info
run: |
conda info -a
conda list
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/initialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The following configuration options are available.
| `zarp_directory` | Path to the local copy of the [ZARP workflow repository][zarp] | `../zarp` relative to the location of the ZARP-cli repository |
| `execution_mode` | Trigger a full _ZARP-cli_ run (`RUN`), a dry run (`DRY_RUN`; external tools are not actually run, only logs what _would be_ run; useful for testing) or prepare a _ZARP_ run (`PREPARE_RUN`; _ZARP-cli_ is run normally, including all external tools, up until the point of the execution of the actual _ZARP_ workflow; use to manually check metadata table before _ZARP_ execution) | `RUN` |
| `cores` | Number of CPU cores that Snakemake is run with when executing _ZARP_ and the auxiliary workflows (fetching libraries from [SRA][sra], inferring metadata) | `1` |
| `dependency_embedding` | Whether Snakemake should use `CONDA` or containers (`SINGULARITY`) to manage dependencies of each workflow step/rule | `CONDA` |
| `dependency_embedding` | Whether Snakemake should use `CONDA` or containers (`APPTAINER`) to manage dependencies of each workflow step/rule | `CONDA` |
| `genome_assemblies_map` | A headerless 3-column semicolon-separated mapping table of organism/source trivial names (e.g., `homo_sapiens`), optional comma-separated aliases such as NCBI taxon IDs and/or organism/source short names (e.g., `7227,dmelanogaster`) and a corresponding genome assembly name (e.g., `GRCm39`); a table in the required format is shipped with _ZARP_cli_ in the the default location; it can be amended with additional aliases; note that for [`genomepy`][genomepy] to be able to pull genome annotations for organisms/sources that [HTSinfer][htsinfer] inferred, NCBI taxon ID aliases are _required_ | `./data/genome_assemblies.csv` relative to the location of the ZARP-cli repository |
| `resources_version` | Whether to always download the latest available version of genome annotations for a given organism/source from Ensembl (enter `None`; default) or whether to use a specific version of the corresponding Ensembl database (e.g., `100`); note that the different Ensembl databases (e.g., for fungi, plants) use a different versioning scheme, so pinning a particular database version may lead to unexpected outcomes | `None` |
| `rule_config` | A configuration file for the _ZARP_ workflow that sets specific parameters for each workflow step ("rule"); see [ZARP][zarp] documentation for details | `None` |
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Installation requires the following:
- Linux (tested with Ubuntu 20.04; macOS has not been tested yet)
- [Conda][conda] (tested with `conda 22.11.1`)
- [Mamba][mamba] (tested with `mamba 1.3.0`)
- [Singularity][singularity] (tested with `singularity 3.8.6`; not required
- [Apptainer][apptainer] (tested with `apptainer 1.3.6`; not required
if you have root permissions on the machine you would like to install
_ZARP-cli_ on; in that case, choose one of the `.root.` environment file
flavors [below](#3-set-up-environment))
Expand Down
4 changes: 2 additions & 2 deletions docs/includes/references.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[apptainer]: <https://apptainer.org/>
[bioanalyzer]: <https://www.agilent.com/en/product/automated-electrophoresis/bioanalyzer-systems>
[conda]: <https://docs.conda.io/projects/conda/en/latest/index.html>
[contact]: <mailto:zavolab-biozentrum@unibas.ch>
Expand All @@ -9,7 +10,6 @@
[kallisto]: <https://github.com/pachterlab/kallisto>
[mamba]: <https://github.com/mamba-org/mamba>
[salmon]: <https://github.com/COMBINE-lab/salmon>
[singularity]: <https://sylabs.io/singularity/>
[snakemake]: <https://github.com/snakemake/snakemake>
[snakemake-profiles]: <https://snakemake.readthedocs.io/en/stable/executing/cli.html#profiles>
[sra]: <https://www.ncbi.nlm.nih.gov/sra>
Expand All @@ -21,4 +21,4 @@
[zarp-qa]: <https://github.com/zavolanlab/zarp/discussions>
[zarp-supplementary]: <https://zenodo.org/records/10797372.
Comment thread
uniqueg marked this conversation as resolved.
Outdated
[zavolab-gh]: <https://github.com/zavolanlab>
[zenodo]: <https://zenodo.org/>
[zenodo]: <https://zenodo.org/>
33 changes: 0 additions & 33 deletions install/environment.dev.root.yml

This file was deleted.

12 changes: 4 additions & 8 deletions install/environment.dev.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
name: zarp-cli
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::genomepy >=0.15.0
- bioconda::snakemake >=8
- addict >=2.4.0
- bidict >=0.22.0
- black >=20.8b1
- coverage>=5.4
- email-validator >=1.2.1
- flake8>=3.8.4
- flake8-docstrings >=1.6.0
- genomepy >=0.15.0
- jsonref >=0.2
- mypy >=0.812
- numpy >=1.22, <1.25
Expand All @@ -22,11 +19,10 @@ dependencies:
- pygments >=2.8.0
- pylint >=2.7.1
- pytest >=6.2.2
- python >=3.9, <=3.10
- python >=3.11
- python-semantic-release >=7.15.0
- rich >=12.5.1
- snakemake >=7.19.1
- types-PyYAML >=6.0.11
- types-pyyaml >=6.0.11
- pip:
- -e ..

22 changes: 0 additions & 22 deletions install/environment.root.yml

This file was deleted.

10 changes: 3 additions & 7 deletions install/environment.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
name: zarp-cli
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- biconda::genomepy >=0.15.0
Comment thread
uniqueg marked this conversation as resolved.
Outdated
- bioconda::snakemake >=8
- addict >=2.4.0
- bidict >=0.22.0
- email-validator >=1.2.1
- genomepy >=0.15.0
- jsonref >=0.2
- numpy >=1.22, <1.25
- pandas >=1.3.5, <1.4.0
- pip >=22.1
- pydantic >=1.9.2, <2.0.0
- pygments >=2.8.0
- python >=3.9, <=3.10
- python >=3.11
- rich >=12.5.1
- snakemake >=7.19.1
- pip:
- -e ..
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""ZARP CLI package definition."""
"""ZARP-cli package definition."""

from pathlib import Path

Expand Down Expand Up @@ -32,8 +32,7 @@
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Utilities",
],
Expand Down
2 changes: 1 addition & 1 deletion tests/config/test_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def test_process_arguments_execution_mode(self, test_input):

@pytest.mark.parametrize(
"test_input",
["CONDA", "SINGULARITY"],
["CONDA", "APPTAINER"],
)
def test_process_arguments_dependency_embedding(self, test_input):
"""Test method ``.process_arguments()``.
Expand Down
4 changes: 2 additions & 2 deletions tests/snakemake/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_compile_command_config_file(self, tmpdir):
config_file = create_config_file(dir=Path(tmpdir))
run_config = default_run_config.copy(deep=True)
run_config.dependency_embedding = (
DependencyEmbeddingStrategies.SINGULARITY
DependencyEmbeddingStrategies.APPTAINER
)
my_run = SnakemakeExecutor(
run_config=run_config,
Expand Down Expand Up @@ -92,7 +92,7 @@ def test_compile_command_profile(self, tmpdir):
"dependency_embedding",
[
DependencyEmbeddingStrategies.CONDA,
DependencyEmbeddingStrategies.SINGULARITY,
DependencyEmbeddingStrategies.APPTAINER,
],
)
def test_compile_command_dep_embedding(self, dependency_embedding, tmpdir):
Expand Down
4 changes: 2 additions & 2 deletions zarp/config/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ class DependencyEmbeddingStrategies(Enum):

Attributes:
CONDA: Use binaries from Conda.
SINGULARITY: Use Singularity containers.
APPTAINER: Use Apptainer (formerly Singularity) containers.
"""

CONDA = "CONDA"
SINGULARITY = "SINGULARITY"
APPTAINER = "APPTAINER"


class ExecModes(Enum):
Expand Down
Loading
Loading