Skip to content

Commit

Permalink
Merge pull request #27 from arogozhnikov/dev
Browse files Browse the repository at this point in the history
Update github workflows and move to pyproject.toml
  • Loading branch information
arogozhnikov authored Feb 28, 2024
2 parents a82618d + 9d19b60 commit 770d9e0
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/python_badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 8 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: publish
name: Deploy to pypi

on:
release:
Expand All @@ -9,20 +9,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Install dependencies
run: |
pip install .
- name: Publish to PyPi
pip install . && pip install hatch
- name: Publish einops to PyPi
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
HATCH_INDEX_USER: "__token__"
HATCH_INDEX_AUTH: ${{ secrets.PYPI_TOKEN }}
run: |
source deploy_to_pypi.sh
hatch run pypi:deploy
9 changes: 4 additions & 5 deletions .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ on: push
jobs:
run-my-tests:
name: Run tests
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: '3.10'
- name: Install package and dependencies
run: |
python -m pip install pytest
Expand Down
2 changes: 1 addition & 1 deletion demuxalot/cellranger_specific.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
This file defines callbacks that are optimized for cellranger
and can overcome some of issues in cellranger output.
and can overcome some of the issues in cellranger output.
If some other aligner is used, you can use simpler callbacks (e.g. using only mapq).
"""
Expand Down
3 changes: 1 addition & 2 deletions examples/1-plain_demultiplexing.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""
Simple demultiplexing
with known genotypes.
Simple demultiplexing with known genotypes.
"""
from demuxalot import Demultiplexer, BarcodeHandler, ProbabilisticGenotypes, count_snps

Expand Down
73 changes: 73 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[build-system]
requires = ["hatchling>=1.21.0"]
build-backend = "hatchling.build"

[project]
name = "demuxalot"

description = "Scalable and reliable demulitplexing for single-cell RNA sequencing."
readme = "README.md"
requires-python = ">=3.8"

keywords = [
"genotype learning",
"single cell RNA sequencing",
"demultiplexing",
"bayesian modelling",
]

license = { text = "MIT" }

classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
]

dependencies = [
"pysam", # reads BAM files (alignment)
"scipy",
"numpy",
"joblib", # multiprocessing in separate processes
"pandas",
"pyarrow", # required to read and write parquet files
]
dynamic = ["version"]
authors = [{ name = "Alex Rogozhnikov, System1 Biosciences" }]

[project.urls]
Homepage = "https://github.com/arogozhnikov/demuxalot"

[tool.setuptools]
packages = ["demuxalot"]

[tool.hatch.version]
path = "demuxalot/__init__.py"

[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/.idea",
"/.pytest_cache",
"/build",
"/dist",
"/tests",
"/examples",
]

[tool.hatch.build.targets.wheel]
# should use packages from main section


[tool.hatch.envs.pypi.scripts]
# hatch run pypi:deploy_test
deploy_test = "hatch build --clean && hatch publish -r test"
deploy = "hatch build --clean && hatch publish"


[tool.hatch.envs.testing.scripts]
# hatch run testing:test
test = "pytest tests"


[tool.ruff]
line-length = 120
24 changes: 0 additions & 24 deletions setup.py

This file was deleted.

0 comments on commit 770d9e0

Please sign in to comment.