Skip to content

Commit

Permalink
Merge pull request #153 from JECSand/development
Browse files Browse the repository at this point in the history
fix for #152 and minor test code cleanup
  • Loading branch information
JECSand authored Jul 18, 2023
2 parents 0a1269e + dc6d0f3 commit 38bfa21
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 21 deletions.
12 changes: 7 additions & 5 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@
1.13 02/14/2023 -- Added additional unit tests.
1.14 02/21/2023 -- Fixed get_ten_day_avg_daily_volume as reported in #137.
1.14 02/21/2023 -- Removed get_three_month_avg_daily_volume due to value now missing in Yahoo data.
1.14 02/21/2023 -- Added unit test for get_ten_day_avg_daily_volume
1.15 06/21/2023 -- Dropped Python 3.6 support
1.15 06/21/2023 -- Enhanced cache to cover all api requests
1.15 06/21/2023 -- Enhanced api url to better toggle between query1 and query2 subdomains
1.15 06/21/2023 -- Minimized sleeps in between 400 errors to less than 10 seconds
1.14 02/21/2023 -- Added unit test for get_ten_day_avg_daily_volume.
1.15 06/21/2023 -- Dropped Python 3.6 support.
1.15 06/21/2023 -- Enhanced cache to cover all api requests.
1.15 06/21/2023 -- Enhanced api url to better toggle between query1 and query2 subdomains.
1.15 06/21/2023 -- Minimized sleeps in between 400 errors to less than 10 seconds.
1.16 07/17/2023 -- Minor code cleanup in test_yahoofinancials.py.
1.16 07/17/2023 -- Fixed HTTP 401 error when executing get_current_price() as reported in #152.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ A python module that returns stock, cryptocurrency, forex, mutual fund, commodit
.. image:: https://static.pepy.tech/badge/yahoofinancials/week
:target: https://pepy.tech/project/yahoofinancials

Current Version: v1.15
Current Version: v1.16

Version Released: 06/21/2023
Version Released: 07/17/2023

Report any bugs by opening an issue here: https://github.com/JECSand/yahoofinancials/issues

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

setup(
name='yahoofinancials',
version='1.15',
version='1.16',
description='A powerful financial data module used for pulling both fundamental and technical data from Yahoo Finance',
long_description=long_description,
url='https://github.com/JECSand/yahoofinancials',
download_url='https://github.com/JECSand/yahoofinancials/archive/1.15.tar.gz',
download_url='https://github.com/JECSand/yahoofinancials/archive/1.16.tar.gz',
author='Connor Sanders',
author_email='[email protected]',
license='MIT',
Expand Down
13 changes: 5 additions & 8 deletions test/test_yahoofinancials.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# YahooFinancials Unit Tests v1.15
# Version Released: 06/21/2023
# YahooFinancials Unit Tests v1.16
# Version Released: 07/17/2023
# Author: Connor Sanders
# Tested on Python 3.7, 3.8, 3.9, 3.10, and 3.11
# Copyright (c) 2023 Connor Sanders <[email protected]>
Expand All @@ -19,20 +19,17 @@ def check_fundamental(test_data, test_type):
if test_type == 'bal':
if 'balanceSheetHistoryQuarterly' in test_data and test_data['balanceSheetHistoryQuarterly']['C'] is not None:
return True
else:
return False
return False
elif test_type == 'inc':
if 'incomeStatementHistoryQuarterly' in test_data and \
test_data['incomeStatementHistoryQuarterly']['C'] is not None:
return True
else:
return False
return False
elif test_type == 'all':
if 'balanceSheetHistoryQuarterly' in test_data and 'incomeStatementHistoryQuarterly' in test_data and \
'cashflowStatementHistoryQuarterly' in test_data:
return True
else:
return False
return False


# Main Test Module Class
Expand Down
2 changes: 1 addition & 1 deletion yahoofinancials/maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2349,7 +2349,7 @@

REQUEST_MAP = {
"quoteSummary": {
"path": "https://query2.finance.yahoo.com/v10/finance/quoteSummary/{symbol}",
"path": "https://query2.finance.yahoo.com/v6/finance/quoteSummary/{symbol}",
"response_field": "quoteSummary",
"request": {
"formatted": {"required": False, "default": False},
Expand Down
6 changes: 3 additions & 3 deletions yahoofinancials/yf.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""
==============================
The Yahoo Financials Module
Version: 1.15
Version: 1.16
==============================
Author: Connor Sanders
Email: [email protected]
Version Released: 06/21/2023
Version Released: 07/17/2023
Tested on Python 3.7, 3.8, 3.9, 3.10, and 3.11
Copyright (c) 2023 Connor Sanders
Expand Down Expand Up @@ -44,7 +44,7 @@
from yahoofinancials.calcs import num_shares_outstanding, eps
from yahoofinancials.etl import YahooFinanceETL

__version__ = "1.15"
__version__ = "1.16"
__author__ = "Connor Sanders"


Expand Down

0 comments on commit 38bfa21

Please sign in to comment.