Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

Commit 88fd297

Browse files
authored
Use Github Actions to build and test (computational-metabolomics#16)
* Add Github Actions tests * Remove connectivity database tests * Add environment variables for codecov * Test connectivity DB on linux only * Delete RI for windows and macos * Test on MacOS and add Python 3.6, 3.8 * Use with: self.assertWarns
1 parent 1ea6ed4 commit 88fd297

File tree

148 files changed

+86
-18175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+86
-18175
lines changed

.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[run]
2+
omit = tests/*,setup.py,metaboblend/__main__.py

.github/workflows/build-test.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: metaboblend
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, windows-latest, macos-latest]
12+
python-version: [3.6, 3.7, 3.8]
13+
14+
env:
15+
OS: ${{ matrix.os }}
16+
PYTHON: ${{ matrix.python-version }}
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Setup conda - Python ${{ matrix.python-version }}
22+
uses: s-weigand/setup-conda@v1
23+
with:
24+
update-conda: true
25+
python-version: ${{ matrix.python-version }}
26+
conda-channels: anaconda, conda-forge
27+
28+
- name: Install dependencies
29+
run: |
30+
31+
python --version
32+
conda env update --file environment.yml --name base
33+
34+
- name: Lint with flake8
35+
run: |
36+
37+
conda install flake8
38+
39+
# stop build if there are Python syntax errors or undefined names
40+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
41+
42+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
43+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
44+
45+
- name: Test with pytest-cov
46+
run: |
47+
48+
python setup.py install
49+
metaboblend --help
50+
51+
conda install pytest codecov pytest-cov -c conda-forge
52+
pytest --cov ./ --cov-config=.coveragerc --cov-report=xml
53+
54+
- name: Upload code coverage to codecov
55+
uses: codecov/codecov-action@v1
56+
with:
57+
flags: unittests
58+
env_vars: OS,PYTHON
59+
fail_ci_if_error: true
60+
verbose: true

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ ENV/
102102

103103
*~
104104

105-
# ignore lib files for testing
105+
# ignore test files
106106
*/libgcc_s_dw2-1.dll
107-
*/libstdc++-6.dll
107+
*/libstdc++-6.dll
108+
tests/test*

.travis.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

MANIFEST.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
include README.rst
22
include LICENSE
33
include requirements.txt
4-
include examples/*.*
54
include tests/*.py
65
include tests/data/*.*
7-
include tests/results/*.*

README.rst

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MetaboBlend
22
===========
3-
|Version| |Py versions| |Git| |Bioconda| |Build Status (Travis)| |Build Status (AppVeyor)| |License| |RTD doc| |codecov| |binder|
3+
|Version| |Py versions| |Git| |Bioconda| |Build Status| |License| |RTD doc| |codecov| |binder|
44

55
Python package for *de novo* structural elucidation of small molecules in mass spectrometry-based Metabolomics
66

@@ -40,11 +40,8 @@ Licenses
4040
MetaboBlend is licensed under the GNU General Public License v3.0 (see `LICENSE file <https://github.com/computational-metabolomics/metaboblend/blob/master/LICENSE>`_ for licensing information). Copyright © 2019 - 2020 Ralf Weber
4141

4242

43-
.. |Build Status (Travis)| image:: https://img.shields.io/travis/computational-metabolomics/metaboblend.svg?style=flat&maxAge=3600&label=Travis-CI
44-
:target: https://travis-ci.com/computational-metabolomics/metaboblend
45-
46-
.. |Build Status (AppVeyor)| image:: https://img.shields.io/appveyor/ci/RJMW/metaboblend.svg?style=flat&maxAge=3600&label=AppVeyor
47-
:target: https://ci.appveyor.com/project/RJMW/metaboblend/branch/master
43+
.. |Build Status| image:: https://github.com/computational-metabolomics/metaboblend/workflows/metaboblend/badge.svg
44+
:target: https://github.com/computational-metabolomics/metaboblend/actions
4845

4946
.. |Py versions| image:: https://img.shields.io/pypi/pyversions/metaboblend.svg?style=flat&maxAge=3600
5047
:target: https://pypi.python.org/pypi/metaboblend/
@@ -63,10 +60,9 @@ MetaboBlend is licensed under the GNU General Public License v3.0 (see `LICENSE
6360

6461
.. |RTD doc| image:: https://img.shields.io/badge/documentation-RTD-71B360.svg?style=flat&maxAge=3600
6562
:target: https://metaboblend.readthedocs.io/en/latest/
66-
63+
6764
.. |codecov| image:: https://codecov.io/gh/computational-metabolomics/metaboblend/branch/master/graph/badge.svg
6865
:target: https://codecov.io/gh/computational-metabolomics/metaboblend
6966

7067
.. |binder| image:: https://mybinder.org/badge_logo.svg
7168
:target: https://mybinder.org/v2/gh/computational-metabolomics/metaboblend/master?filepath=notebooks%2Fworkflow.ipynb
72-

appveyor.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
- bioconda
55
dependencies:
6-
- python=3.7
6+
- python>=3.6
77
- numpy
88
- scipy
99
- pandas

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ networkx
55
# rdkit
66
biopython
77
matplotlib
8+
# nauty

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727

2828
def main():
2929

30-
setuptools.setup(name="metaboblend",
30+
setuptools.setup(
31+
name="metaboblend",
3132
version=metaboblend.__version__,
3233
description="",
3334
long_description=open('README.rst').read(),

0 commit comments

Comments
 (0)