Skip to content

Commit

Permalink
Merge pull request #23 from compomics/dev
Browse files Browse the repository at this point in the history
v2.0.0-beta.2
  • Loading branch information
RalfG authored Jan 26, 2021
2 parents ff4a8d7 + 487bada commit 67d5b81
Show file tree
Hide file tree
Showing 46 changed files with 3,986 additions and 1,725 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,32 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install setuptools wheel pytest twine
# - name: Build and publish to PyPI
# env:
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# run: |
# python setup.py sdist bdist_wheel
# twine upload dist/*
- name: Build and publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
- name: Test built package
run: |
pip install dist/ms2rescore-*.whl
pytest
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: python-package
path: dist/*

- uses: pypa/gh-action-pypi-publish@master
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
19 changes: 11 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
name: Tests
name: Test

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
test:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel flake8 pytest
- name: Lint with flake8
run: |
# 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: Build and install ms2rescore package
run: |
pip install .
- name: Test with pytest
run: |
pytest
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Others
data/
data/*
steps.txt
old_files/
prepare_pin_files.py
Expand Down Expand Up @@ -99,4 +99,6 @@ ENV/
.ropeproject

# vscode
.vscode/
.vscode/
.pytest_cache/v/cache/nodeids
.pytest_cache/v/cache/stepwise
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include ms2rescore/package_data/**/*
include ms2rescore/package_data/*
Loading

0 comments on commit 67d5b81

Please sign in to comment.