Skip to content

Commit

Permalink
Merge pull request #9 from meyer-lab/UseRye
Browse files Browse the repository at this point in the history
Remove poetry and move to rye
  • Loading branch information
andrewram4287 authored Sep 17, 2024
2 parents 888b96b + e8f44f8 commit 6135ce2
Show file tree
Hide file tree
Showing 6 changed files with 317 additions and 2,408 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ jobs:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: poetry install
- name: Setup rye
uses: eifinger/setup-rye@v4
with:
enable-cache: true
version: '0.39.0'
- name: Setup environment
run: make .venv
- name: Build figures
run: make all
run: make all -j 2
- name: Upload files
uses: actions/upload-artifact@v4
with:
Expand Down
37 changes: 15 additions & 22 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
SHELL := /bin/bash
.PHONY: clean test pyright

.PHONY: clean test

flist = $(wildcard pf2rnaseq/figures/figure*.py)
allOutput = $(patsubst pf2rnaseq/figures/figure%.py, output/figure%.svg, $(flist))
flist = $(wildcard pf2scrnaseq/figures/figure*.py)
allOutput = $(patsubst pf2scrnaseq/figures/figure%.py, output/figure%.svg, $(flist))

all: $(allOutput)

output/figure%.svg: pf2rnaseq/figures/figure%.py
output/figure%.svg: pf2scrnaseq/figures/figure%.py
@ mkdir -p ./output
poetry run fbuild $*
rye run fbuild $*

output/figureCITEseq%.svg: pf2rnaseq/figures/figureCITEseq%.py
@ mkdir -p ./output
poetry run fbuild CITEseq$*
test: .venv
rye run pytest -s -v -x

.venv:
rye sync

test:
poetry run pytest -s -x -v
coverage.xml: .venv
rye run pytest --junitxml=junit.xml --cov=pf2scrnaseq --cov-report xml:coverage.xml

coverage.xml:
poetry run pytest --cov=pf2rnaseq --cov-report=xml
pyright: .venv
rye run pyright pf2scrnaseq

clean:
rm -rf output profile profile.svg
rm -rf factor_cache

testprofile:
poetry run python3 -m cProfile -o profile -m pytest -s -v -x
gprof2dot -f pstats --node-thres=5.0 profile | dot -Tsvg -o profile.svg

mypy:
poetry run mypy --install-types --non-interactive --ignore-missing-imports --check-untyped-defs pf2rnaseq
rm -rf factor_cache
Loading

0 comments on commit 6135ce2

Please sign in to comment.