Skip to content

Commit

Permalink
Merge pull request #11 from cokelaer/main
Browse files Browse the repository at this point in the history
update/add workflows
  • Loading branch information
cokelaer authored Dec 9, 2022
2 parents a89efd6 + 75075f3 commit 912ca4d
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 44 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,51 @@ on:
push:
branches:
- main
- dev
pull_request:
branches-ignore: []
schedule:
- cron: '0 0 * * SUN'

jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python: [3.7, 3.8, 3.9, '3.10']
fail-fast: false

steps:

- uses: actions/checkout@v2
- name: Set up Python 3.8

- name: Setup python 3.X
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
python-version: ${{ matrix.python }}

- name: install package itself
run: |
conda install -c conda-forge mamba --quiet
mamba install -c conda-forge --quiet -y --file=requirements.txt --file=requirements_dev.txt
pip install .[testing]
- name: Lint with flake8
run: |
mamba install flake8
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
pytest --cov-report term-missing --cov=mergegi
- name: coveralls
run: |
echo $COVERALLS_REPO_TOKEN
coveralls --service=github
env:
GITHUB_TOKEN: ${{ github.token }}


39 changes: 39 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish to PyPI
on:
workflow_dispatch:
push:
tags:
- '*'

jobs:
build-n-publish:
name: Build and publish to PyPI and TestPyPI
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@main
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Install package
run: |
pip install build
- name: Build source tarball
run: |
rm -rf dist;
python setup.py sdist
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
recursive-exclude * __pycache__
recursive-exclude * *pyc
recursive-exclude tests *
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

[![Tests](https://github.com/sequana/MergeGI/actions/workflows/main.yml/badge.svg)](https://github.com/sequana/MergeGI/actions/workflows/main.yml)


![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mergegi)

**MergeGI** provides a single command line to merge and select barcoded raw data from [MGI](https://en.mgi-tech.com/products/) sequencing runs into a set of FastQ files ready for subsequent bioinformatics analysis.


Expand All @@ -18,6 +21,14 @@ We provide **MergeGI** as a Python library available on [Pypi](https://pypi.pyth

There is no dependencies except for **click** package so that installation should be straightforward.


For developers:

git clone git@github.com:sequana/MergeGI.git
cd MergeGI
pip install -e .[testing]


## Overview

The main goal of **MergeGI** is to select and merge the FastQ files generated by a MGI sequencer into a list of FastQ files directly usable for subsequent bioinformatics analysis. Why do we need to do this preprocessing ?
Expand Down Expand Up @@ -84,6 +95,16 @@ By default, lanes are merged. If this is not what you want you may disable this
mergegi --samplesheet samplesheet.csv --input-directory mgi_raw_data --output-directory merge_data --paired --no-merge
```

## Changelog


========= ==========================================================================
Version Description
========= ==========================================================================
0.1.0 * simplify the CI action workflow and setup
0.0.1 * first release


## Barcode distribution example

<img src="doc/bccode.png" width="50%">
Expand Down
37 changes: 37 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "MergeGI"
version= "0.1.0"
authors=[
{ name="Sequana Team" }
]
description="Merge MGI fastq files"
readme="README.md"
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: BSD License",
"Operating System :: Unix"
]
license = {text="BSD-4-Clause"}
keywords = ["fastq", "MGI", "merger"]
dependencies = [
"click"
]

[project.optional-dependencies]
testing = ["pytest", "pytest-cov", "coveralls", "pytest-xdist"]

[project.urls]
"Homepage"= "https://github.com/sequana/MergeGI"
"Bug Tracker"= "https://github.com/sequana/MergeGI/issues"

[project.scripts]
mergegi = "mergegi:main"
2 changes: 0 additions & 2 deletions requirements_dev.txt

This file was deleted.

31 changes: 0 additions & 31 deletions setup.py

This file was deleted.

0 comments on commit 912ca4d

Please sign in to comment.