Skip to content

Commit

Permalink
DOC/TST: Added tox (@jmoody11), updated README and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
addisonlynch committed Feb 21, 2019
1 parent 587e7db commit 635173b
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 53 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ __pycache__/
# C extensions
*.so

# VS Code
.vscode/

# Distribution / packaging
.Python
build/
Expand Down
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ python:
- "3.5"
- "3.6"

matrix:
include:
- python: 3.7
dist: xenial
sudo: true

env:
global:
# Doctr deploy key for addisonlynch/iexfinance
Expand Down
29 changes: 19 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ iexfinance
.. image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg
:target: https://opensource.org/licenses/Apache-2.0

Now Supporting IEX Cloud
------------------------

Python SDK for `IEX Cloud <https://iexcloud.io>`__ and the legacy
`Investors Exchange (IEX) <https://iextrading.com/>`__
Version 1.0 `Investors Exchange (IEX) <https://iextrading.com/>`__
`Developer API <https://iextrading.com/developer/>`__. Architecture mirrors
that of the IEX Cloud API (and its `documentation <https://iexcloud.io/docs/api/>`__).

``iexfinance`` will maintain compatibility and support for the
IEX Version `Developer API <https://iextrading.com/developer/>`__ until June
2019.

An easy-to-use toolkit to obtain data for Stocks, ETFs, Mutual Funds,
Forex/Currencies, Options, Commodities, Bonds, and Cryptocurrencies:

Expand All @@ -34,20 +40,14 @@ Forex/Currencies, Options, Commodities, Bonds, and Cryptocurrencies:
Example
-------

.. code-block:: python
from iexfinance.stocks import Stock
aapl = Stock('AAPL')
aapl.get_price()
# 155.32
.. image:: https://addisonlynch.github.io/public/img/iexexample.gif


Documentation
-------------

Stable documentation is hosted on
`github.io <https://addisonlynch.github.io/iexfinance/stable/index.html#documentation>`__.
`github.io <https://addisonlynch.github.io/iexfinance/stable/>`__.

`Development documentation <https://addisonlynch.github.io/iexfinance/devel/>`__ is also available for the latest changes in master.

Expand Down Expand Up @@ -274,12 +274,21 @@ Modeling/Valuation Tools
aapl.get_estimates()
`Price Targets <https://addisonlynch.github.io/iexfinance/stable/stocks.html#price-target>`__
`Price Target <https://addisonlynch.github.io/iexfinance/stable/stocks.html#price-target>`__

.. code-block:: python
aapl.get_price_target()
Social Sentiment
^^^^^^^^^^^^^^^^

.. code-block:: python
from iexfinance.altdata import get_social_sentiment
get_social_sentiment()
Reference Data
~~~~~~~~~~~~~~

Expand Down
4 changes: 2 additions & 2 deletions docs/source/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ It seemed for a number of years that the primary sources of free US
equities data for Python developers were the Yahoo Finance and Google
Finance APIs. Given that both of these services were
`discontinued <https://forums.yahoo.net/t5/Yahoo-Finance-help/Is-Yahoo-Finance-API-broken/td-p/250503>`__
earlier this year, analysts and developers have begun the search for
in 2017, analysts and developers have begun the search for
their replacement. A strong contender for live equities data is the
`Investors' Exchange <https://iextrading.com>`__ `Developer
Platform <https://iextrading.com/developer>`__, a "reliable, enterprise
Expand All @@ -32,7 +32,7 @@ Google services and found that, for daily and intraday information, the
IEX service is actually quite comparable. And thus with a Python wrapper
for IEX's [Stocks] (https://iextrading.com/developer/docs/#stocks) and
`IEX Market Data <https://iextrading.com/developer/docs/#iex-market-data>`__
endpoints we can access this data in a similar way as past.
endpoints we can access this data in a similar way in the past.

iexfinance, a wrapper for this service, is written in a similar fashion
as both Lukasz Banasiak's Yahoo Finance wrapper and Hongtao Cai's Google
Expand Down
1 change: 0 additions & 1 deletion docs/source/migrating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Reference Data
~~~~~~~~~~~~~~

* IEX Symbols - ``refdata.get_iex_symbols``
*


.. _migrating.legacy_only:
Expand Down
37 changes: 0 additions & 37 deletions docs/source/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,6 @@
iexfinance package
==================


Submodules
----------

iexfinance\.base module
-----------------------

.. automodule:: iexfinance.base
:members:
:undoc-members:
:show-inheritance:

iexfinance\.refdata module
--------------------------

.. automodule:: iexfinance.refdata
:members:
:undoc-members:
:show-inheritance:

iexfinance\.iexdata module
--------------------------

.. automodule:: iexfinance.iexdata
:members:
:undoc-members:
:show-inheritance:

iexfinance\.stocks module
-------------------------

.. automodule:: iexfinance.stocks
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

Expand Down
2 changes: 2 additions & 0 deletions docs/source/whatsnew/v0.4.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Enhancements
``float`` to eliminate periodic even number returns and CI failures
- Improved testing for ``_IEXBase`` base class configuration (request
parameters, output formatting)
- Adds tox for cross-version testing (thank you Jack Moody)
- Adds official Python 3.7 support and CI build (thank you Jack Moody)

.. whatsnew_040.backwards:

Expand Down
6 changes: 3 additions & 3 deletions iexfinance/tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
__all__ = ["use_cloud", "use_legacy", "block_keys", "set_keys"]


@pytest.fixture
@pytest.yield_fixture
def use_cloud(scope='function'):
os.environ["IEX_API_VERSION"] = "iexcloud-beta"
yield
del os.environ["IEX_API_VERSION"]


@pytest.fixture
@pytest.yield_fixture
def use_legacy(scope='function'):
os.environ["IEX_API_VERSION"] = 'v1'
yield
Expand All @@ -25,7 +25,7 @@ def block_keys(scope='function'):
del os.environ["IEX_TOKEN"]


@pytest.fixture
@pytest.yield_fixture
def set_keys(scope='function'):
os.environ["IEX_TOKEN"] = "TESTKEY"
yield
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ sphinx-autobuild
sphinx-rtd-theme
sphinxcontrib-fulltoc
sphinxcontrib-napoleon
tox
13 changes: 13 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# content of: tox.ini , put in same dir as setup.py
[tox]
# Available test environments: https://tox.readthedocs.io/en/latest/example/basic.html
envlist = py2,py27,py3,py34,py35,py36,py37

[testenv]
# install pytest in the virtualenv where commands will be executed
deps =
pytest
-rrequirements-dev.txt
commands =
# NOTE: you can run any command line tool here - not just tests
pytest

0 comments on commit 635173b

Please sign in to comment.