Skip to content

Commit d4b5a14

Browse files
author
Nathaniel Saul
committed
migrate to ghactions for ci/cd
1 parent 76b2b5a commit d4b5a14

File tree

6 files changed

+85
-45
lines changed

6 files changed

+85
-45
lines changed

.github/workflows/python-app.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python application
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: [3.6, 3.7, 3.8]
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install flake8 Cython ripser
29+
pip install -e ".[testing]"
30+
- name: Lint with flake8
31+
run: |
32+
# stop the build if there are Python syntax errors or undefined names
33+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
34+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
35+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
36+
- name: Test with pytest
37+
run: |
38+
pytest --cov persim
39+
- name: Upload coverage results
40+
run: |
41+
bash <(curl -s https://codecov.io/bash)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: '3.x'
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install setuptools wheel twine
24+
- name: Build and publish
25+
env:
26+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
27+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
28+
run: |
29+
python setup.py sdist bdist_wheel
30+
twine upload dist/*

.readthedocs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
3+
python:
4+
version: 3.7
5+
install:
6+
- requirements: docs/requirements.txt
7+
- method: pip
8+
path: .
9+
extra_requirements:
10+
- docs

.travis.yml

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

Makefile

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

setup.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@
3636
],
3737
extras_require={ # use `pip install -e ".[testing]"``
3838
'testing': [
39-
'pytest'
39+
'pytest',
40+
'pytest-cov'
4041
],
4142
'docs': [ # `pip install -e ".[docs]"``
4243
'sktda_docs_config'
4344
]
4445
},
45-
python_requires='>=2.7,!=3.1,!=3.2,!=3.3',
46+
python_requires='>=3.6',
4647
classifiers=[
4748
'Development Status :: 3 - Alpha',
4849
'Intended Audience :: Science/Research',
@@ -52,12 +53,9 @@
5253
'Topic :: Scientific/Engineering :: Information Analysis',
5354
'Topic :: Scientific/Engineering :: Mathematics',
5455
'License :: OSI Approved :: MIT License',
55-
'Programming Language :: Python :: 2.7',
56-
'Programming Language :: Python :: 3',
57-
'Programming Language :: Python :: 3.4',
58-
'Programming Language :: Python :: 3.5',
5956
'Programming Language :: Python :: 3.6',
6057
'Programming Language :: Python :: 3.7',
58+
'Programming Language :: Python :: 3.8',
6159
],
6260
keywords='persistent homology, persistence images, persistence diagrams, topology data analysis, algebraic topology, unsupervised learning, sliced wasserstein distance, bottleneck distance'
6361
)

0 commit comments

Comments
 (0)