Skip to content

Commit

Permalink
Merge pull request #19 from GuilhemSempere/feat/actions
Browse files Browse the repository at this point in the history
added github actions to create release / build & publish pypi package
  • Loading branch information
GuilhemSempere authored Jul 24, 2024
2 parents a304ca2 + bac6b0b commit 7cf997d
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 9 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish Python 🐍 mbctools 📦 to PyPI

permissions:
contents: write

on:
workflow_dispatch:

jobs:
build-n-publish:
name: Build and publish Python 🐍 mbctools 📦 to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Extract version
id: get_version
run: |
VERSION=$(grep -oP "__version__ = \"\K[^\"]*" mbctools.py)
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.get_version.outputs.VERSION }}
release_name: ${{ steps.get_version.outputs.VERSION }}
body: |
New release of mbctools version ${{ steps.get_version.outputs.VERSION }}
PyPI package: https://pypi.org/project/mbctools/${{ steps.get_version.outputs.VERSION }}/
draft: false
prerelease: false
12 changes: 3 additions & 9 deletions mbctools.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/python3

"""
mbctools a cross-platform toolkit to make use of VSEARCH easier and interactive, thus helping analyze
"""mbctools a cross-platform toolkit to make use of VSEARCH easier and interactive, thus helping analyze
metabarcoding data in the best conditions. It assumes VSEARCH is pre-installed and consists in the following MAIN MENU:
1 -> INITIAL ANALYSIS (mandatory)
Expand Down Expand Up @@ -36,12 +35,7 @@
VSEARCH reference:
Rognes T, Flouri T, Nichols B, Quince C, Mahe F (2016). VSEARCH: a versatile open source tool for metagenomics
PeerJ 4:e2584 doi: https://doi.org/10.7717/peerj.2584
metaXplor reference:
Sempéré G, Pétel A, Abbé M, et al (2021) metaXplor: an interactive viral and microbial metagenomic data manager
GigaScience 10:giab001 doi: https://doi.org/10.1093/gigascience/giab001
PeerJ 4:e2584 doi: 10.7717/peerj.2584 https://doi.org/10.7717/peerj.2584
Usage:
=====
Expand Down Expand Up @@ -1839,7 +1833,7 @@ def quit_mbctools():
def printHowToCite():
print(warningStyle + "\nPlease cite this software as follows:" +
citationStyle + "\nmbctools:\tA User-Friendly Metabarcoding and Cross-Platform Pipeline for Analyzing\n\t\tMultiple Amplicon Sequencing Data across a Large Diversity of Organisms" + normalStyle
+ "\nC. Barnabé, G. Sempéré, V. Manzanilla, J. Moo-Millan, A. Amblard-Rambert and E. Waleckx\n" + citationStyle + "bioRxiv, 2024.02.08.579441, https://doi.org/10.1101/2024.02.08.579441" + normalStyle + "\n\n")
+ "\nChristian Barnabé, Guilhem Sempéré, Vincent Manzanilla and Etienne Waleckx.\n" + citationStyle + "https://github.com/GuilhemSempere/mbctools" + normalStyle + "\n\n")


def main_menu1():
Expand Down

0 comments on commit 7cf997d

Please sign in to comment.