-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from Ulthran/master
Add CI/CD
- Loading branch information
Showing
27 changed files
with
1,176 additions
and
636 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: CodeCov | ||
|
||
on: | ||
pull_request: | ||
branches: [master, main] | ||
push: | ||
branches: [master, main] | ||
schedule: | ||
- cron: "0 13 * * 1" | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10' | ||
- name: setup-conda | ||
uses: s-weigand/[email protected] | ||
with: | ||
conda-channels: '' | ||
- name: Install dependencies | ||
run: | | ||
conda install -c bioconda vsearch | ||
python -m pip install --upgrade pip | ||
python -m pip install pytest | ||
python -m pip install pytest-cov | ||
python -m pip install . | ||
- name: Run tests and collect coverage | ||
run: pytest --cov tests | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Super-Linter | ||
|
||
on: | ||
pull_request: | ||
branches: [master, main] | ||
push: | ||
branches: [master, main] | ||
|
||
jobs: | ||
super-linter: | ||
name: Lint Codebase | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Super-Linter | ||
uses: github/super-linter@v4 | ||
env: | ||
VALIDATE_ALL_CODEBASE: true | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
VALIDATE_PYTHON_BLACK: true | ||
|
||
FILTER_REGEX_EXCLUDE: tests/test_align.py | ||
# align.py has some weirdly spaced strings to show alignment | ||
# To reformat, `black . --exclude="test_align.py"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: PyPi | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python -m build | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
branches: [master, main] | ||
push: | ||
branches: [master, main] | ||
schedule: | ||
- cron: "0 13 * * 1" | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: setup-conda | ||
uses: s-weigand/[email protected] | ||
with: | ||
conda-channels: '' | ||
- name: Install dependencies | ||
run: | | ||
conda install -c bioconda vsearch | ||
python -m pip install --upgrade pip | ||
python -m pip install pytest | ||
python -m pip install . | ||
- name: Test with pytest | ||
run: | | ||
pytest -vvl tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,38 +2,39 @@ | |
from setuptools import setup | ||
|
||
PACKAGE_DIR = os.path.abspath(os.path.dirname(__file__)) | ||
README_FP = os.path.join(PACKAGE_DIR, 'README.md') | ||
with open(README_FP, encoding='utf-8') as f: | ||
README_FP = os.path.join(PACKAGE_DIR, "README.md") | ||
with open(README_FP, encoding="utf-8") as f: | ||
long_description = f.read() | ||
|
||
setup(name='unassigner', | ||
version='0.0.5', | ||
description='Bacterial species unassigner', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
author='Kyle Bittinger', | ||
author_email='[email protected]', | ||
url='https://github.com/kylebittinger/unassigner', | ||
packages=['unassigner'], | ||
install_requires=[ | ||
'biopython', | ||
'scipy', | ||
], | ||
entry_points={ | ||
'console_scripts': [ | ||
'unassign=unassigner.command:main', | ||
'trimragged=unassigner.trim:main', | ||
'count_mismatches=unassigner.mismatch_db:main', | ||
'pctid_ani_sample=unassigner.ani:main_sampling', | ||
], | ||
}, | ||
classifiers=[ | ||
'Intended Audience :: Science/Research', | ||
'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)', | ||
'Operating System :: POSIX :: Linux', | ||
'Operating System :: MacOS :: MacOS X', | ||
'Programming Language :: Python :: 3', | ||
'Topic :: Scientific/Engineering :: Bio-Informatics', | ||
], | ||
license='GPLv2+', | ||
setup( | ||
name="unassigner", | ||
version="0.0.5", | ||
description="Bacterial species unassigner", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
author="Kyle Bittinger", | ||
author_email="[email protected]", | ||
url="https://github.com/kylebittinger/unassigner", | ||
packages=["unassigner"], | ||
install_requires=[ | ||
"biopython", | ||
"scipy", | ||
], | ||
entry_points={ | ||
"console_scripts": [ | ||
"unassign=unassigner.command:main", | ||
"trimragged=unassigner.trim:main", | ||
"count_mismatches=unassigner.mismatch_db:main", | ||
"pctid_ani_sample=unassigner.ani:main_sampling", | ||
], | ||
}, | ||
classifiers=[ | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", | ||
"Operating System :: POSIX :: Linux", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: Scientific/Engineering :: Bio-Informatics", | ||
], | ||
license="GPLv2+", | ||
) |
Oops, something went wrong.