Skip to content

Commit

Permalink
Merge pull request #19 from kmedian/dev
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
ulf1 committed Apr 27, 2021
2 parents 931d3fb + f4016de commit 0969623
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
- 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
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,5 @@ venv.bak/
# other
.vscode
profile/data*
profile
profile
README.rst
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.4.6 / 2020-04-23

* Test multiple python versions
* Installation problems: remove pandoc from setup.py

# 0.4.3 / 2020-05-10

* bug #11 fixed. `collections` replaced with `six`
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include README.md
include README.rst
recursive-include test *.py
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
[![PyPI version](https://badge.fury.io/py/yearfrac.svg)](https://badge.fury.io/py/yearfrac)
[![yearfrac](https://snyk.io/advisor/python/yearfrac/badge.svg)](https://snyk.io/advisor/python/yearfrac)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/kmedian/yearfrac.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kmedian/yearfrac/alerts/)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/kmedian/yearfrac.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kmedian/yearfrac/context:python)
[![deepcode](https://www.deepcode.ai/api/gh/badge?key=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwbGF0Zm9ybTEiOiJnaCIsIm93bmVyMSI6ImttZWRpYW4iLCJyZXBvMSI6InllYXJmcmFjIiwiaW5jbHVkZUxpbnQiOmZhbHNlLCJhdXRob3JJZCI6Mjk0NTIsImlhdCI6MTYxOTU0MjUyOX0.RI73MEmFUVlndzYdZq9l6ip2XozSJldBOhDHyIGsfwI)](https://www.deepcode.ai/app/gh/kmedian/yearfrac/_/dashboard?utm_content=gh%2Fkmedian%2Fyearfrac)

# yearfrac

Expand Down Expand Up @@ -45,8 +49,14 @@ pip3 install -r requirements-demo.txt
* Run Unit Tests: `python -W ignore -m unittest discover`
* Remove `.pyc` files: `find . -type f -name "*.pyc" | xargs rm`
* Remove `__pycache__` folders: `find . -type d -name "__pycache__" | xargs rm -rf`
* 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/*
```

### Support
Please [open an issue](https://github.com/kmedian/yearfrac/issues/new) for support.
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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):
Expand All @@ -15,14 +21,13 @@ def get_version(path):
setup(name='yearfrac',
version=get_version("yearfrac/__init__.py"),
description='Daycount methods to compute date differences in year units',
long_description=pypandoc.convert('README.md', 'rst'),
long_description=read('README.rst'),
url='http://github.com/kmedian/yearfrac',
author='Ulf Hamster',
author_email='[email protected]',
license='MIT',
packages=['yearfrac'],
install_requires=[
'setuptools>=40.0.0',
'numpy>=1.14.*,<2'],
python_requires='>=3.6',
zip_safe=True)
2 changes: 1 addition & 1 deletion yearfrac/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.4.5'
__version__ = '0.4.6'

from .isaleapyear import isaleapyear
from .julianday import date_to_jd, jd_to_date
Expand Down

0 comments on commit 0969623

Please sign in to comment.