Skip to content

Commit 4183246

Browse files
committed
test more py versions, badges added, read rst file
1 parent f15371c commit 4183246

File tree

5 files changed

+30
-7
lines changed

5 files changed

+30
-7
lines changed

.github/workflows/pythonapp.yml renamed to .github/workflows/syntax-and-unit-tests.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,19 @@ jobs:
77

88
runs-on: ubuntu-18.04
99

10+
strategy:
11+
matrix:
12+
python-version: ['3.6', '3.7', '3.8', '3.x', 'pypy3']
13+
14+
name: Python ${{ matrix.python-version }} Tests
15+
1016
steps:
1117
- uses: actions/checkout@v1
12-
- name: Set up Python 3.6
18+
- name: Setup python
1319
uses: actions/setup-python@v1
1420
with:
15-
python-version: 3.6
21+
python-version: ${{ matrix.python-version }}
22+
architecture: x64
1623
- name: Install dependencies
1724
run: |
1825
python -m pip install --upgrade pip
@@ -21,6 +28,6 @@ jobs:
2128
- name: Lint with flake8
2229
run: |
2330
flake8 --ignore=F401 --exclude=$(grep -v '^#' .gitignore | xargs | sed -e 's/ /,/g')
24-
- name: Test with unittest
31+
- name: Unit Test with pytest
2532
run: |
2633
pytest

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,5 @@ venv.bak/
108108
.vscode
109109
profile/data*
110110

111-
examples/data
111+
examples/data
112+
README.rst

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
include README.md
2+
include README.rst
23
recursive-include test *.py

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[![PyPI version](https://badge.fury.io/py/numpy-fracdiff.svg)](https://badge.fury.io/py/numpy-fracdiff)
22
[![numpy-fracdiff](https://snyk.io/advisor/python/numpy-fracdiff/badge.svg)](https://snyk.io/advisor/python/numpy-fracdiff)
33

4+
[![deepcode](https://www.deepcode.ai/api/gh/badge?key=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwbGF0Zm9ybTEiOiJnaCIsIm93bmVyMSI6InVsZjEiLCJyZXBvMSI6Im51bXB5LWZyYWNkaWZmIiwiaW5jbHVkZUxpbnQiOmZhbHNlLCJhdXRob3JJZCI6Mjk0NTIsImlhdCI6MTYxOTU0MDI2N30.D99hoaXfMKuj6sva3Z0J3nJ9VXI6V_G1vyGEML9D0c4)](https://www.deepcode.ai/app/gh/ulf1/numpy-fracdiff/_/dashboard?utm_content=gh%2Fulf1%2Fnumpy-fracdiff)
45

56
# numpy-fracdiff
67
Fractional Difference for Time Series
@@ -37,8 +38,14 @@ pip install -r requirements-demo.txt
3738
* Jupyter for the examples: `jupyter lab`
3839
* Check syntax: `flake8 --ignore=F401 --exclude=$(grep -v '^#' .gitignore | xargs | sed -e 's/ /,/g')`
3940
* Run Unit Tests: `pytest`
40-
* Create README.rst: `pandoc README.md --from markdown --to rst -s -o README.rst`
41-
* Upload to PyPi with twine: `python setup.py sdist && twine upload -r pypi dist/*`
41+
42+
Publish
43+
44+
```sh
45+
pandoc README.md --from markdown --to rst -s -o README.rst
46+
python setup.py sdist
47+
twine upload -r pypi dist/*
48+
```
4249

4350
### Clean up
4451

setup.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
from setuptools import setup
2+
import os
3+
4+
5+
def read(fname):
6+
with open(os.path.join(os.path.dirname(__file__), fname)) as fp:
7+
s = fp.read()
8+
return s
29

310

411
def get_version(path):
@@ -14,7 +21,7 @@ def get_version(path):
1421
setup(name='numpy-fracdiff',
1522
version=get_version("numpy_fracdiff/__init__.py"),
1623
description='Fractional Difference for Time Series',
17-
long_description='README.rst',
24+
long_description=read('README.rst'),
1825
url='http://github.com/ulf1/numpy-fracdiff',
1926
author='Ulf Hamster',
2027
author_email='[email protected]',

0 commit comments

Comments
 (0)