Skip to content

Commit 4dbaf1a

Browse files
author
Francis Motta
committed
Merge remote-tracking branch 'upstream/master'
2 parents 742f19e + 74a6d61 commit 4dbaf1a

File tree

10 files changed

+93
-82
lines changed

10 files changed

+93
-82
lines changed

.github/workflows/python-app.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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 Cython
29+
pip install flake8 ripser
30+
pip install -e ".[testing]"
31+
- name: Lint with flake8
32+
run: |
33+
# stop the build if there are Python syntax errors or undefined names
34+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
36+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37+
- name: Test with pytest
38+
run: |
39+
pytest --cov persim
40+
- name: Upload coverage results
41+
run: |
42+
bash <(curl -s https://codecov.io/bash)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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 Cython
24+
pip install ripser
25+
pip install setuptools wheel twine
26+
- name: Build and publish
27+
env:
28+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
29+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
30+
run: |
31+
python setup.py sdist bdist_wheel
32+
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.

DEPLOY.md

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

Makefile

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

RELEASE.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
0.1.5
2-
- Deprecated PersImage class with implementation of PersistenceImager
3-
41
0.1.4
52
- Migrate to a new CI/CD pipeline
63

docs/notebooks/distances.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
}
9898
],
9999
"source": [
100-
"persim.plot_diagrams([dgm_clean, dgm_noisy] , labels=['Clean $H_1$', 'Noisy $H_1$'])\n"
100+
"persim.plot_diagrams([dgm_clean, dgm_noisy] , labels=['Clean $H_1$', 'Noisy $H_1$'])\n",
101101
"plt.show()"
102102
]
103103
},
@@ -136,7 +136,7 @@
136136
}
137137
],
138138
"source": [
139-
"persim.bottleneck_matching(dgm_clean, dgm_noisy, matching, D, labels=['Clean $H_1$', 'Noisy $H_1$'])\n"
139+
"persim.bottleneck_matching(dgm_clean, dgm_noisy, matching, D, labels=['Clean $H_1$', 'Noisy $H_1$'])\n",
140140
"plt.show()"
141141
]
142142
},
@@ -451,7 +451,7 @@
451451
"source": [
452452
"plt.scatter(dists_bottleneck[:,0], dists_bottleneck[:,1], label=\"Bottleneck\", alpha=0.3)\n",
453453
"plt.scatter(dists_sliced[:,0], dists_sliced[:,1], label=\"Sliced Wasserstein\", alpha=0.3)\n",
454-
"plt.legend()\n"
454+
"plt.legend()\n",
455455
"plt.show()"
456456
]
457457
},
@@ -499,7 +499,7 @@
499499
"\n",
500500
" plt.title(\"Noise:{} Distance:{:.3f}\".format(n, d))\n",
501501
"\n",
502-
"plt.tight_layout()\n"
502+
"plt.tight_layout()\n",
503503
"plt.show()"
504504
]
505505
}

persim/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.5"
1+
__version__ = "0.1.4"

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, topological data analysis, algebraic topology, unsupervised learning, supervised learning, machine learning, sliced wasserstein distance, bottleneck distance'
6361
)

0 commit comments

Comments
 (0)