Skip to content

Commit

Permalink
MRG: upgrade the project! (#4)
Browse files Browse the repository at this point in the history
* add makefile; add github CI; run black

* fix

* more fix
  • Loading branch information
ctb authored May 20, 2024
1 parent 6880e35 commit 6b35f4c
Show file tree
Hide file tree
Showing 7 changed files with 297 additions and 119 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "run/test examples"
on:
pull_request:
push:
branches: [latest]
jobs:
mamba:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: setup conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: 3.12
channels: conda-forge,bioconda
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
mamba-version: "*"
activate-environment: sourmash_dev
auto-activate-base: false

- run: conda info
- run: conda list
- run: conda config --show

- name: install dependencies
shell: bash -l {0}
run: mamba env update -n sourmash_dev -f environment.yml

- name: install package
shell: bash -l {0}
run: pip install .

- name: build examples
shell: bash -l {0}
run: make cleanrun
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
__pycache__
*.egg-info/
build
dist
.snakemake
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
all: test
.PHONY: dist test_workflow

all: test_workflow

test:
python -m pytest
Expand All @@ -8,3 +10,12 @@ install-dev:

install:
python -m pip install .

test_workflow:
cd test_workflow && make

cleanrun:
cd test_workflow && make cleanall

dist:
python -m build
11 changes: 11 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: pangenomics_dev
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- sourmash>=4.8.8,<5
- pip
- pytest
- make
- snakemake-minimal
Loading

0 comments on commit 6b35f4c

Please sign in to comment.