From 1b7e8bb5839e85d8ec011ecf0c259e51c5b75283 Mon Sep 17 00:00:00 2001 From: Ryan Sheftel Date: Thu, 24 Oct 2019 21:13:40 -0400 Subject: [PATCH] Updates to the setup.py process, add python 3.7 and 3.8 to travis --- .travis.yml | 6 ++--- README.rst | 9 +++++++ docs/change_log.rst | 2 +- setup.cfg | 3 +++ setup.py | 64 +++++++++++++++++++++++++++------------------ 5 files changed, 55 insertions(+), 29 deletions(-) diff --git a/.travis.yml b/.travis.yml index f3a6f88..b4712fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,9 @@ python: - "3.4" - "3.5" - "3.6" -# - "3.7" -# - "3.7-dev" # 3.7 development branch -# - "nightly" # currently points to 3.7-dev + - "3.7" + - "3.8" + - "nightly" install: - "pip install pandas" diff --git a/README.rst b/README.rst index 27ca6df..b201de5 100644 --- a/README.rst +++ b/README.rst @@ -118,6 +118,15 @@ Quick Start '2012-07-10 20:00:00+00:00'], dtype='datetime64[ns, UTC]', freq=None) +Contributing +------------ +All improvements and additional (and corrections) in the form of pull requests are welcome. This package will grow in +value and correctness the more eyes are on it. + +To add new functionality please include tests which are in standard pytest format. + +Use pytest to run the test suite. + Future ------ This package is open sourced under the MIT license. Everyone is welcome to add more exchanges or OTC markets, confirm diff --git a/docs/change_log.rst b/docs/change_log.rst index 5364d67..a1bfd7e 100644 --- a/docs/change_log.rst +++ b/docs/change_log.rst @@ -108,7 +108,7 @@ Updates ~~~~~~~~~~~~ - add JPX Ascension Day holidays for 2019 from PR #64 -1.2 (XX/XX/XX) +1.2 (10/22/19) ~~~~~~~~~~~~~~ - Support calendars with valid business days on the weekend (PR #75) - Fixed SSE 2019 labour's day holidays (PR #74) diff --git a/setup.cfg b/setup.cfg index bf1d5a3..4cff205 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,5 @@ [bdist_wheel] python-tag=py3 + +[aliases] +test=pytest diff --git a/setup.py b/setup.py index 5d32aa7..ef6f706 100644 --- a/setup.py +++ b/setup.py @@ -1,36 +1,51 @@ -"""A setuptools based setup module. +""" +A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html -https://github.com/rsheftel/pandas_market_calendars """ +import sys from setuptools import setup, find_packages -# To use a consistent encoding -from codecs import open from os import path -here = path.abspath(path.dirname(__file__)) +# version +VERSION = '1.2' + +# requirements +REQUIRED_PYTHON = '>=3.3.0' +REQUIRED_PACKAGES = ['pandas>=0.18', 'pytz'] + +# Package meta-data +NAME = 'pandas_market_calendars' +DESCRIPTION = 'Market and exchange trading calendars for pandas' +SOURCE_URL = 'https://github.com/rsheftel/pandas_market_calendars' +DOCS_URL = 'https://pandas-market-calendars.readthedocs.io/en/latest/' +AUTHOR = 'Ryan Sheftel' +EMAIL = 'rsheftel@alumni.upenn.edu' +LICENSE = 'MIT' + +# ----- items below do not generally change ------- # # Get the long description from the README file +here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( - name='pandas_market_calendars', - version='1.2', - - description='Market and exchange trading calendars for pandas', + # meta data + name=NAME, + version=VERSION, + description=DESCRIPTION, long_description=long_description, - - # The project's main homepage. - url='https://github.com/rsheftel/pandas_market_calendars', - - # Author details - author='Ryan Sheftel', - author_email='rsheftel@alumni.upenn.edu', - - # Choose your license - license='MIT', + long_description_content_type='text/x-rst', + url=SOURCE_URL, + author=AUTHOR, + author_email=EMAIL, + license=LICENSE, + project_urls={ + 'Documentation': DOCS_URL, + 'Source': SOURCE_URL, + }, # See https://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=[ @@ -46,8 +61,7 @@ # Pick your license as you wish (should match "license" above) 'License :: OSI Approved :: MIT License', - # Specify the Python versions you support here. In particular, ensure - # that you indicate whether you support Python 2, Python 3 or both. + # Specify the Python versions you support here. 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', @@ -58,9 +72,9 @@ # What does your project relate to? keywords='trading exchanges markets OTC datetime holiday business days', - # You can just specify the packages manually here if your project is - # simple. Or you can use find_packages(). + # requirements packages=find_packages(exclude=['docs', 'examples', 'tests']), - - install_requires=['pandas>=0.18', 'pytz'] + python_requires=REQUIRED_PYTHON, + install_requires=REQUIRED_PACKAGES, + tests_require=['pytest'], )