From f62820eb05358dabaa1ccf716678a2e11ccbd106 Mon Sep 17 00:00:00 2001 From: UH <554c46@gmail.com> Date: Fri, 23 Apr 2021 21:44:38 +0200 Subject: [PATCH 1/6] setuptools removed, zip safe deactivated --- requirements-dev.txt | 1 + setup.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) 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..84ce256 100644 --- a/setup.py +++ b/setup.py @@ -19,11 +19,10 @@ def get_version(path): 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', - zip_safe=True) + zip_safe=False) From 64feab2aaca753c80bdab413ff27495305e9099d Mon Sep 17 00:00:00 2001 From: UH <554c46@gmail.com> Date: Fri, 23 Apr 2021 22:48:14 +0200 Subject: [PATCH 2/6] synk badge added --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d0573dc..abaf683 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ [![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) + # numpy-fracdiff Fractional Difference for Time Series From f15371c77aa0d1823c1544b17dba834d60d821fd Mon Sep 17 00:00:00 2001 From: UH <554c46@gmail.com> Date: Sat, 24 Apr 2021 01:05:25 +0200 Subject: [PATCH 3/6] remove pandoc from setup.py --- CHANGES.md | 5 +++++ README.md | 1 + numpy_fracdiff/__init__.py | 2 +- setup.py | 5 ++--- 4 files changed, 9 insertions(+), 4 deletions(-) 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/README.md b/README.md index abaf683..d9bb85e 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ 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` +* Create README.rst: `pandoc README.md --from markdown --to rst -s -o README.rst` * Upload to PyPi with twine: `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/setup.py b/setup.py index 84ce256..3f1507c 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,4 @@ from setuptools import setup -import pypandoc def get_version(path): @@ -15,7 +14,7 @@ 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='README.rst', url='http://github.com/ulf1/numpy-fracdiff', author='Ulf Hamster', author_email='554c46@gmail.com', @@ -25,4 +24,4 @@ def get_version(path): 'numpy>=1.18.*,<2', 'numba>=0.48.*'], python_requires='>=3.6', - zip_safe=False) + zip_safe=True) From 41832468bb4ccfaf661791e5cd2d3e127d366950 Mon Sep 17 00:00:00 2001 From: UH <554c46@gmail.com> Date: Tue, 27 Apr 2021 18:35:06 +0200 Subject: [PATCH 4/6] test more py versions, badges added, read rst file --- .../{pythonapp.yml => syntax-and-unit-tests.yml} | 13 ++++++++++--- .gitignore | 3 ++- MANIFEST.in | 1 + README.md | 11 +++++++++-- setup.py | 9 ++++++++- 5 files changed, 30 insertions(+), 7 deletions(-) rename .github/workflows/{pythonapp.yml => syntax-and-unit-tests.yml} (64%) 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..f9a7880 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', 'pypy3'] + + 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/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 d9bb85e..91a4d2a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![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) +[![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 @@ -37,8 +38,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` -* Create README.rst: `pandoc README.md --from markdown --to rst -s -o README.rst` -* 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/setup.py b/setup.py index 3f1507c..53e8b7d 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,11 @@ from setuptools import setup +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): @@ -14,7 +21,7 @@ def get_version(path): setup(name='numpy-fracdiff', version=get_version("numpy_fracdiff/__init__.py"), description='Fractional Difference for Time Series', - long_description='README.rst', + long_description=read('README.rst'), url='http://github.com/ulf1/numpy-fracdiff', author='Ulf Hamster', author_email='554c46@gmail.com', From ef78bbef0eb625fdda95b14f6a1612800db83209 Mon Sep 17 00:00:00 2001 From: UH <554c46@gmail.com> Date: Tue, 27 Apr 2021 18:41:53 +0200 Subject: [PATCH 5/6] rm pypy test --- .github/workflows/syntax-and-unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/syntax-and-unit-tests.yml b/.github/workflows/syntax-and-unit-tests.yml index f9a7880..b8716f6 100644 --- a/.github/workflows/syntax-and-unit-tests.yml +++ b/.github/workflows/syntax-and-unit-tests.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: - python-version: ['3.6', '3.7', '3.8', '3.x', 'pypy3'] + python-version: ['3.6', '3.7', '3.8', '3.x'] name: Python ${{ matrix.python-version }} Tests From eedf5a8f61a34151a8a45d0c27ed2a31f3474f20 Mon Sep 17 00:00:00 2001 From: UH <554c46@gmail.com> Date: Tue, 27 Apr 2021 18:56:52 +0200 Subject: [PATCH 6/6] badges added --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 91a4d2a..a5773b5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![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