diff --git a/.circleci/config.yml b/.circleci/config.yml index cc8c960..38475a6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,16 +1,5 @@ version: 2 jobs: - test35: - docker: - - image: circleci/python:3.5 - steps: - - checkout - - run: - name: install - command: sudo ./dev/install.sh - - run: - name: test - command: pytest test36: docker: - image: circleci/python:3.6 @@ -68,12 +57,10 @@ workflows: build-deploy: jobs: - tests - - test35 - test36 - deploy-release: requires: - tests - - test35 - test36 filters: branches: diff --git a/README.rst b/README.rst index ecaf745..6c8feaa 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ join and add more. :Package: |license| |pyversions| |status| |downloads| :CI: |master-build| |coverage-master| :Dowloads: https://pypi.org/project/ccy/ -:Source: https://github.com/lsbardel/ccy +:Source: https://github.com/quantmind/ccy .. |pyversions| image:: https://img.shields.io/pypi/pyversions/ccy.svg :target: https://pypi.org/project/ccy/ diff --git a/ccy/dates/period.py b/ccy/dates/period.py index efe5cd7..02eabad 100644 --- a/ccy/dates/period.py +++ b/ccy/dates/period.py @@ -131,7 +131,8 @@ def add_tenure(self, pstr): self.add_months(v) elif p == "Y": self.add_years(v) - st = st[ip + 1 :] + ip += 1 + st = st[ip:] return self def __add__(self, other): diff --git a/setup.py b/setup.py index f440f11..4c17c61 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,13 @@ import os -from setuptools import setup, find_packages + +from setuptools import find_packages, setup import ccy def read(name): filename = os.path.join(os.path.dirname(__file__), name) - with open(filename, encoding='utf8') as fp: + with open(filename, encoding="utf8") as fp: return fp.read() @@ -14,13 +15,13 @@ def requirements(name): install_requires = [] dependency_links = [] - for line in read(name).split('\n'): - if line.startswith('-e '): + for line in read(name).split("\n"): + if line.startswith("-e "): link = line[3:].strip() - if link == '.': + if link == ".": continue dependency_links.append(link) - line = link.split('=')[1] + line = link.split("=")[1] line = line.strip() if line: install_requires.append(line) @@ -28,40 +29,39 @@ def requirements(name): return install_requires, dependency_links -install_requires = requirements('dev/requirements.txt')[0] -tests_require = requirements('dev/requirements-dev.txt')[0] +install_requires = requirements("dev/requirements.txt")[0] +tests_require = requirements("dev/requirements-dev.txt")[0] meta = dict( - name='ccy', + name="ccy", version=ccy.__version__, description=ccy.__doc__, - author='Luca Sbardella', + author="Luca Sbardella", author_email="luca@quantmind.com", maintainer_email="luca@quantmind.com", - url="https://github.com/lsbardel/ccy", + url="https://github.com/quantmind/ccy", license="BSD", - long_description=read('README.rst'), - packages=find_packages(include=['ccy', 'ccy.*']), + long_description=read("README.rst"), + packages=find_packages(include=["ccy", "ccy.*"]), install_requires=install_requires, tests_require=tests_require, zip_safe=False, classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Environment :: Plugins', - 'Intended Audience :: Developers', - 'Intended Audience :: Financial and Insurance Industry', - 'License :: OSI Approved :: BSD License', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Topic :: Office/Business :: Financial', - 'Topic :: Utilities' - ] + "Development Status :: 5 - Production/Stable", + "Environment :: Plugins", + "Intended Audience :: Developers", + "Intended Audience :: Financial and Insurance Industry", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Office/Business :: Financial", + "Topic :: Utilities", + ], ) -if __name__ == '__main__': +if __name__ == "__main__": setup(**meta)