diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/syntax-and-unit-tests.yml similarity index 64% rename from .github/workflows/pythonapp.yml rename to .github/workflows/syntax-and-unit-tests.yml index 0baf79c..b8716f6 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/syntax-and-unit-tests.yml @@ -7,12 +7,19 @@ jobs: runs-on: ubuntu-18.04 + strategy: + matrix: + python-version: ['3.6', '3.7', '3.8', '3.x'] + + name: Python ${{ matrix.python-version }} Tests + steps: - uses: actions/checkout@v1 - - name: Set up Python 3.6 + - name: Setup python uses: actions/setup-python@v1 with: - python-version: 3.6 + python-version: ${{ matrix.python-version }} + architecture: x64 - name: Install dependencies run: | python -m pip install --upgrade pip @@ -21,6 +28,6 @@ jobs: - name: Lint with flake8 run: | flake8 --ignore=F401 --exclude=$(grep -v '^#' .gitignore | xargs | sed -e 's/ /,/g') - - name: Test with unittest + - name: Unit Test with pytest run: | pytest diff --git a/.gitignore b/.gitignore index 7e5e400..2a1042b 100644 --- a/.gitignore +++ b/.gitignore @@ -108,4 +108,5 @@ venv.bak/ .vscode profile/data* -examples/data \ No newline at end of file +examples/data +README.rst diff --git a/CHANGES.md b/CHANGES.md index 5c968d5..eebee6e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +# 0.3.3 / 2020-04-23 + + * Test multiple python versions + * Installation problems: remove pandoc from setup.py + # 0.3.1 / 2021-04-08 * MIT License changed to Apache 2.0 diff --git a/MANIFEST.in b/MANIFEST.in index 77e3555..783709f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,3 @@ include README.md +include README.rst recursive-include test *.py diff --git a/README.md b/README.md index d0573dc..a5773b5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ [![PyPI version](https://badge.fury.io/py/numpy-fracdiff.svg)](https://badge.fury.io/py/numpy-fracdiff) +[![numpy-fracdiff](https://snyk.io/advisor/python/numpy-fracdiff/badge.svg)](https://snyk.io/advisor/python/numpy-fracdiff) +[![Total alerts](https://img.shields.io/lgtm/alerts/g/ulf1/numpy-fracdiff.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ulf1/numpy-fracdiff/alerts/) +[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/ulf1/numpy-fracdiff.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ulf1/numpy-fracdiff/context:python) +[![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) # numpy-fracdiff Fractional Difference for Time Series @@ -35,7 +39,14 @@ pip install -r requirements-demo.txt * Jupyter for the examples: `jupyter lab` * Check syntax: `flake8 --ignore=F401 --exclude=$(grep -v '^#' .gitignore | xargs | sed -e 's/ /,/g')` * Run Unit Tests: `pytest` -* Upload to PyPi with twine: `python setup.py sdist && twine upload -r pypi dist/*` + +Publish + +```sh +pandoc README.md --from markdown --to rst -s -o README.rst +python setup.py sdist +twine upload -r pypi dist/* +``` ### Clean up diff --git a/numpy_fracdiff/__init__.py b/numpy_fracdiff/__init__.py index c7e7f95..6bebf1b 100644 --- a/numpy_fracdiff/__init__.py +++ b/numpy_fracdiff/__init__.py @@ -1,3 +1,3 @@ -__version__ = '0.3.2' +__version__ = '0.3.3' from .fracdiff_fn import fracdiff diff --git a/requirements-dev.txt b/requirements-dev.txt index 6d82478..93dd1c3 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,5 @@ # syntax check, unit test, profiling +setuptools>=56.0.0 flake8>=3.8.4 pytest>=6.2.1 twine==3.3.0 diff --git a/setup.py b/setup.py index ad8908e..53e8b7d 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,11 @@ from setuptools import setup -import pypandoc +import os + + +def read(fname): + with open(os.path.join(os.path.dirname(__file__), fname)) as fp: + s = fp.read() + return s def get_version(path): @@ -15,14 +21,13 @@ def get_version(path): setup(name='numpy-fracdiff', version=get_version("numpy_fracdiff/__init__.py"), description='Fractional Difference for Time Series', - long_description=pypandoc.convert('README.md', 'rst'), + long_description=read('README.rst'), url='http://github.com/ulf1/numpy-fracdiff', author='Ulf Hamster', author_email='554c46@gmail.com', - license='MIT', + license='Apache License 2.0', packages=['numpy_fracdiff'], install_requires=[ - 'setuptools>=40.0.0', 'numpy>=1.18.*,<2', 'numba>=0.48.*'], python_requires='>=3.6',