Skip to content

Commit

Permalink
Add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maltekuehl committed May 30, 2024
1 parent 56fdefd commit e5f96ad
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 2 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Test & lint package & deploy documentation

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: [3.11.4]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}
- name: Install dependencies
run: |
export FLIT_ROOT_INSTALL=1
python -m pip install --upgrade pip
python -m pip install flit
python -m flit install --deps production
python -m pip install git+https://github.com/complextissue/xpysom.git
python -m pip install black flake8 flake8-docstrings isort flake8-comprehensions mypy
python -m pip install coverage pytest bandit sphinx sphinx-autoapi \
myst-parser pygments sphinx-autodoc-typehints sphinx-rtd-theme furo sphinx_design \
sphinx-copybutton sphinxcontrib-bibtex sphinxcontrib-mermaid nbsphinx pandoc
sudo apt-get update
sudo apt-get install -y pandoc
- name: Format with black
run: |
python -m black .
- name: Lint with flake8
run: |
python -m flake8 pytximport
- name: Check imports with isort
run: |
python -m isort --check-only --diff --recursive pytximport
- name: Type check with mypy
run: |
python -m mypy -p pytximport
- name: Check security with bandit
run: |
python -m bandit --verbose --ini .bandit.ini -ll --recursive pytximport
- name: Test with pytest
run: |
coverage run -m pytest --maxfail=10
coverage xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![Python Version Required](https://img.shields.io/pypi/pyversions/pytximport)](https://pypi.org/project/pytximport/)
[![License](https://img.shields.io/pypi/l/pytximport)](https://github.com/complextissue/pytximport)
[![Documentation Status](https://readthedocs.org/projects/pytximport/badge/?version=latest)](https://pytximport.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/complextissue/pytximport/graph/badge.svg?token=M9JEHJVXYI)](https://codecov.io/gh/complextissue/pytximport)

`pytximport` is a Python package for fast gene count estimation based on transcript abundance, inspired by the `tximport` R package.

Expand Down
1 change: 1 addition & 0 deletions docs/source/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![Python Version Required](https://img.shields.io/pypi/pyversions/pytximport)](https://pypi.org/project/pytximport/)
[![License](https://img.shields.io/pypi/l/pytximport)](https://github.com/complextissue/pytximport)
[![Documentation Status](https://readthedocs.org/projects/pytximport/badge/?version=latest)](https://pytximport.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/complextissue/pytximport/graph/badge.svg?token=M9JEHJVXYI)](https://codecov.io/gh/complextissue/pytximport)

`pytximport` is a Python package for fast gene count estimation based on transcript abundance, inspired by the `tximport` R package.

Expand Down
3 changes: 1 addition & 2 deletions pytximport/core/_tximport.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ def tximport(
return_data: bool = True,
biotype_filter: Optional[List[str]] = None,
) -> Union[xr.Dataset, ad.AnnData, None]:
"""Import transcript-level quantification files and convert them to gene-level expression estimates, correcting
for transcript length differences.
"""Import transcript-level quantification files and convert them to gene-level expression estimates.
Args:
file_paths (List[Union[str, Path]]): The paths to the quantification files.
Expand Down

0 comments on commit e5f96ad

Please sign in to comment.