mirror of
https://github.com/hydrosquall/tiingo-python.git
synced 2025-12-17 20:04:19 +01:00
Merge branch 'master' into pyup-update-watchdog-0.10.3-to-1.0.1
This commit is contained in:
47
.github/workflows/python-package.yml
vendored
Normal file
47
.github/workflows/python-package.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
||||
|
||||
name: Python test and lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['2.7', '3.6', '3.7']
|
||||
WITH_PANDAS: [false, true]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
env:
|
||||
WITH_PANDAS: ${{ matrix.WITH_PANDAS }}
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python setup.py develop
|
||||
python -m pip install flake8 pytest-cov codecov vcrpy
|
||||
tools/install_pandas.sh
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
- name: Run unit tests
|
||||
env:
|
||||
TIINGO_API_KEY: 0000000000000000000000000000000000000000
|
||||
run: |
|
||||
py.test --cov=./tiingo
|
||||
- name: Run code coverage
|
||||
run: codecov
|
||||
31
.github/workflows/python-publish.yml
vendored
Normal file
31
.github/workflows/python-publish.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# This workflows will upload a Python Package using Twine when a release is created
|
||||
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
|
||||
|
||||
name: Upload Python Package
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install setuptools wheel twine
|
||||
- name: Build and publish
|
||||
env:
|
||||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
||||
run: |
|
||||
python setup.py sdist bdist_wheel
|
||||
twine upload dist/*
|
||||
38
.travis.yml
38
.travis.yml
@@ -1,38 +0,0 @@
|
||||
deploy:
|
||||
on:
|
||||
python: 2.7
|
||||
repo: hydrosquall/tiingo-python
|
||||
tags: true
|
||||
distributions: sdist bdist_wheel
|
||||
password:
|
||||
secure: VH1rgFV5XD0k3cMZxJwetBnETrFolBaM0U4K9CKQts38LF7f4xA8muY2FFFyeqR7VF2MQhYgGMcaAQQx/gRY+7AdSnqMYvxZ7p3P81aF7ruE3KjXgV6oPkTX4LkUlZf+co1rGs59TJ4UDJQM73+9EiYD3MJ/G0KeyMnAak73HkRHWdypOGLrINLPyUuuUAxQ8k4UJWskEMXjMgKIlGdCcdbCWqso/lZqvQ+/bFfv5M+yhQK57JMlXfXsM3YMxUGY7IhYRhxHL3nCpxXacut2FBU6H1GCU8MuR2bJ/aNNdl8elNzCEZcRq8+s94yrI095HQvVW/tLWaNJ4ojZSsGhmzvC/xAB+VbCp7ZvI0vHPGEOQgR/bIkDa9uhuwCWtfM81VCPpBrXgwupgznxtsjFcmBSUOpTFLTW5dKoPDWOe5K4wHKd9IKbWwk+mAY+aczV4T0uMX/eKhEOWJS03cjIPN4qwdCy6zSnBWpJBoLR7QyYZKNL1MiyQ0toUsJO0ln6vaPTXOo0K7EJIxKVOYf3xR8kNsgWWe0Z4orSt56O8+v5OIYbDcSeY1hwklcMvQdGHlLyMx01D2v346mL532MHA24nRmXfDUz0ixx5rn7g4Tykvy2LBLYfrfhV4G6kvimTk5Y6I7Rif4y68+r+NHmBlZwUju0AsK0a+s5/XAg5Nc=
|
||||
provider: pypi
|
||||
user: hydrosquall
|
||||
|
||||
install:
|
||||
- python setup.py develop
|
||||
- pip install -U pytest-cov codecov vcrpy
|
||||
- tools/install_pandas.sh
|
||||
# - pip install -U tox-travis pytest
|
||||
|
||||
language: python
|
||||
python:
|
||||
- 3.6
|
||||
- 3.5
|
||||
- 2.7
|
||||
|
||||
cache: pip
|
||||
|
||||
env:
|
||||
- WITH_PANDAS=false
|
||||
- WITH_PANDAS=true
|
||||
|
||||
script:
|
||||
- export TIINGO_API_KEY=0000000000000000000000000000000000000000
|
||||
- py.test --cov=./tiingo
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
after_success:
|
||||
- codecov
|
||||
@@ -101,10 +101,7 @@ Before you submit a pull request, check that it meets these guidelines:
|
||||
2. If the pull request adds functionality, the docs should be updated. Put
|
||||
your new functionality into a function with a docstring, and add the
|
||||
feature to the list in README.rst.
|
||||
3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check
|
||||
https://travis-ci.org/hydrosquall/tiingo-python/pull_requests
|
||||
and make sure that the tests pass for all supported Python versions.
|
||||
|
||||
3. The pull request should work for Python 2.7, 3.6, and 3.7. These will be checked for you when you open your PR via Github Action checks.
|
||||
|
||||
Release Procedure
|
||||
-----------------------
|
||||
|
||||
10
HISTORY.rst
10
HISTORY.rst
@@ -2,10 +2,18 @@
|
||||
History
|
||||
=======
|
||||
|
||||
0.13.0 (2019-11-XX - Unreleased)
|
||||
0.14.0 (2020-12-XX - Unreleased)
|
||||
--------------------------------
|
||||
* Feature (Name #Number)
|
||||
* Development: Run tests in Github Actions instead of Travis.org
|
||||
|
||||
0.13.0 (2020-12-12)
|
||||
--------------------------------
|
||||
* Minor: Address Pandas Future Warning for sorting in pd.concat (#392)
|
||||
* Feature: Add option to request data in csv format in get_dataframe method potentially boosting speed up to 4-5x. (#523)
|
||||
* Minor: bumped library dependencies, in particular cryptography
|
||||
* Development: Dropped official support for Python 3.5, replaced with 3.7
|
||||
* Development: Publish library with Github Actions instead of Travis (#546)
|
||||
|
||||
0.12.0 (2019-10-20)
|
||||
--------------------
|
||||
|
||||
@@ -9,9 +9,6 @@ Tiingo Python
|
||||
:target: https://codecov.io/gh/hydrosquall/tiingo-python
|
||||
:alt: Coverage
|
||||
|
||||
.. image:: https://img.shields.io/travis/hydrosquall/tiingo-python.svg?maxAge=600
|
||||
:target: https://travis-ci.org/hydrosquall/tiingo-python
|
||||
|
||||
.. image:: https://readthedocs.org/projects/tiingo-python/badge/?version=latest&maxAge=600
|
||||
:target: https://tiingo-python.readthedocs.io/en/latest/?badge=latest
|
||||
:alt: Documentation Status
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
Issuing New Releases
|
||||
============
|
||||
|
||||
Tiingo follows semantic versioning (semver.org) practices.
|
||||
Tiingo follows semantic versioning (semver.org) practices.
|
||||
|
||||
The following shows how to make a release for version 0.8.0
|
||||
|
||||
1. Make a branch called release/0.8.0
|
||||
2. Ensure HISTORY.rst (the Changelog) is up to date
|
||||
3. Update __version__.py to 0.8.0
|
||||
3. Update __version__.py to 0.8.0 and tag the commit
|
||||
4. Open a merge request to master
|
||||
5. After the merge request is approved and merged, tag and push the merged commit with 0.8.0. Travis CI will be responsible for releasing the new code to PyPI.
|
||||
5. After the merge request is approved and merged, tag and push the merged commit with tag v0.8.0.
|
||||
6. Visit https://github.com/hydrosquall/tiingo-python/releases and create a new release. Github Actions will deploy the new library to PyPI.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# This file is used by mybinder.org to power the runnable examples.
|
||||
tiingo==0.12.0
|
||||
tiingo==0.13.0
|
||||
|
||||
# You technically don't have to use tiingo with pandas, but
|
||||
# we included it since most data analysts will have it installed already.
|
||||
|
||||
@@ -4,9 +4,6 @@ Welcome to Tiingo Python's documentation!
|
||||
.. image:: https://img.shields.io/pypi/v/tiingo.svg?maxAge=600
|
||||
:target: https://pypi.python.org/pypi/tiingo
|
||||
|
||||
.. image:: https://img.shields.io/travis/hydrosquall/tiingo-python.svg?maxAge=600
|
||||
:target: https://travis-ci.org/hydrosquall/tiingo-python
|
||||
|
||||
.. image:: https://readthedocs.org/projects/tiingo-python/badge/?version=latest&maxAge=600
|
||||
:target: https://tiingo-python.readthedocs.io/en/latest/?badge=latest
|
||||
:alt: Documentation Status
|
||||
|
||||
@@ -1 +1 @@
|
||||
tiingo==0.12.0
|
||||
tiingo==0.13.0
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
pip==20.2.4
|
||||
bumpversion==0.6.0
|
||||
wheel==0.35.1
|
||||
watchdog==1.0.1
|
||||
wheel==0.36.1
|
||||
watchdog==0.10.4
|
||||
flake8==3.8.4
|
||||
tox==3.20.1
|
||||
coverage==5.3
|
||||
Sphinx==3.2.1
|
||||
cryptography==2.8
|
||||
cryptography==3.3.1
|
||||
PyYAML==5.3.1
|
||||
pytest==5.3.5
|
||||
pytest-runner==5.2
|
||||
|
||||
@@ -34,7 +34,14 @@ class TestRestClient(TestCase):
|
||||
|
||||
# Test 404 error
|
||||
def test_invalid_url(self):
|
||||
with self.assertRaisesRegexp(RestClientError, "404"),\
|
||||
|
||||
# Suppress deprecation warning in python 3
|
||||
if hasattr(self, 'assertRaisesRegex'):
|
||||
assertFunc = self.assertRaisesRegex
|
||||
else:
|
||||
assertFunc = self.assertRaisesRegexp
|
||||
|
||||
with assertFunc(RestClientError, "404"),\
|
||||
vcr.use_cassette('tests/fixtures/invalid_url.yaml'):
|
||||
# Should return 404 error
|
||||
self._client._request('GET', "bing_is_great")
|
||||
@@ -66,7 +73,14 @@ class TestRestClientWithSession(TestCase):
|
||||
|
||||
# Test 404 error
|
||||
def test_invalid_url(self):
|
||||
with self.assertRaisesRegexp(RestClientError, "404"),\
|
||||
|
||||
# Suppress deprecation warning in python 3
|
||||
if hasattr(self, 'assertRaisesRegex'):
|
||||
assertFunc = self.assertRaisesRegex
|
||||
else:
|
||||
assertFunc = self.assertRaisesRegexp
|
||||
|
||||
with assertFunc(RestClientError, "404"),\
|
||||
vcr.use_cassette('tests/fixtures/invalid_url.yaml'):
|
||||
# Should return 404 error
|
||||
self._client._request('GET', "bing_is_great")
|
||||
|
||||
Reference in New Issue
Block a user