Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to deal with Pandas tz_convert and fromtimestamp issues #231

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f4726b6
Fixes for pandas fromtimestamp issues
jhollanderpax8 May 1, 2023
fb0a26f
Fixing timezone stuff
jhollanderpax8 Oct 30, 2023
e92ea5f
Fix screeners with numbers in ID
ms32035 Jul 12, 2023
5411207
Update quote summary endpoint from v10 to v6
dpguthrie Jul 15, 2023
5797bd3
Update to 2.3.2
dpguthrie Jul 15, 2023
55a20a8
Update changelog for 2.3.2
dpguthrie Jul 15, 2023
2b1e066
Modifications to switch to poetry
dpguthrie Jul 14, 2023
a21e9c5
Make selenium pkgs optional for poetry
dpguthrie Jul 17, 2023
ffd60d3
Add function to get crumb, set in init
dpguthrie Jul 17, 2023
3154020
Add webdriver manager for selenium
dpguthrie Jul 17, 2023
f993385
Access public instead of private method
dpguthrie Jul 17, 2023
43643fb
Initialize session with cookies, need appropriate headers
dpguthrie Jul 17, 2023
91d0774
Change to appropriate branch
dpguthrie Jul 17, 2023
f5358a4
Account for FuturesSession when setting up for cookies
dpguthrie Jul 17, 2023
ea2a7e2
Updates for selenium 4
dpguthrie Jul 18, 2023
c6da27a
Update optional deps
dpguthrie Jul 18, 2023
d457fcc
Update to get crumb when setting up session
dpguthrie Jul 18, 2023
331c134
Add better error handling when unable to find crumb
dpguthrie Jul 24, 2023
ad5eceb
Create variable indicating if user has optional dependency
dpguthrie Jul 24, 2023
ef3bd52
Add fallback if crumb, cookies retrieval fails
dpguthrie Jul 24, 2023
e9c66ed
Add warning
dpguthrie Oct 28, 2023
7baf030
Update streamlit app url
dpguthrie Jul 18, 2023
667106e
Update how cookie is obtained, remove selenium backup
dpguthrie Oct 28, 2023
77f201e
Remove unnecesasry imports
dpguthrie Oct 28, 2023
bdf0a43
Bump urllib3 from 2.0.3 to 2.0.7
dependabot[bot] Oct 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

[Makefile]
indent_style = tab

[*.md]
trim_trailing_whitespace = false

[*.{yml,toml,yaml}]
indent_size = 2
12 changes: 12 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[flake8]
show-source = true
statistics = true
exclude =
.git

# These settings make flake8 compatible with Black:
# max-line-length: https://black.readthedocs.io/en/stable/the_black_code_style.html#line-length
# E203: https://black.readthedocs.io/en/stable/the_black_code_style.html#slices
# E503: https://black.readthedocs.io/en/stable/the_black_code_style.html#line-breaks-binary-operators
max-line-length = 88
ignore = E203, W503
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build

on:
pull_request_target:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
make install_dev
- name: Run tests and coverage
run: make test_cov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
14 changes: 14 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Docs
on:
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install mkdocs-material "mkdocstrings[python]" mike
- run: mkdocs gh-deploy --force
14 changes: 14 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Publish Yahooquery
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_KEY }}
31 changes: 0 additions & 31 deletions .github/workflows/python-publish.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[settings]
import_heading_firstparty=first party
import_heading_future=future
import_heading_local=local
import_heading_stdlib=stdlib
import_heading_thirdparty=third party
known_third_party=sgqlc

# These settings makes isort compatible with Black:
# https://github.com/psf/black#how-black-wraps-lines
multi_line_output=3
include_trailing_comma=1
force_grid_wrap=0
use_parentheses=1
line_length=88
53 changes: 53 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
default_stages: [push]
default_language_version:
python: python3.9
repos:
- repo: local
hooks:
- id: isort
stages: [commit,push]
name: isort
entry: poetry run isort -rc
language: system
types: [python]
- id: black
stages: [commit,push]
name: black
entry: poetry run black -S .
language: system
types: [python]
- id: mypy
stages: [commit,push]
name: mypy
entry: poetry run mypy --ignore-missing-imports
language: system
types: [python]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: trailing-whitespace
stages: [commit,push]
- id: check-added-large-files
- id: check-ast
stages: [commit,push]
- id: check-case-conflict
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-docstring-first
stages: [commit,push]
- id: check-json
- id: check-merge-conflict
stages: [commit,push]
- id: check-symlinks
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: flake8
stages: [commit,push]
- id: forbid-new-submodules
- id: no-commit-to-branch
stages: [commit,push]
args:
- --branch=main
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

21 changes: 21 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
Change Log
==========

2.3.2
-----
## Update
- Update quote summary endpoint from v10 to v6. The v10 endpoint currently requires a crumb as a query parameter, which is not something this library does not currently support.

## Fix
- Bug related to retrieving screen IDs with a number

2.3.1
-----
## FIx
- Fixes for history method

2.3.0
-----
## Added
- `dividend_history` method that returns historical dividends paid for a given symbol(s)

## Fixed
- `history` method has been refactored pretty heavily with the help of @maread99 (Thank you!). Timezone info is now included in the `date` column. Also, a dataframe will always be returned regardless of bad symbols existing. Previously, a dictionary was returned with the json response for the bad symbol(s) and dataframes for successful responses.

2.2.15
------
- Updated the data available from the cash flow statement
Expand Down
5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
PYTEST=poetry run pytest

install_dev:
poetry install

install:
poetry install --no-dev

lint:
poetry run black -S --check --diff .
poetry run isort --check-only --diff .
poetry run flake8 .
poetry run mypy . --ignore-missing-imports

test: lint
$(PYTEST)

test_cov:
# Run tests and prepare coverage report
$(PYTEST) --cov=./ --cov-report=xml

test_with_warnings:
# Run tests and show warnings
$(PYTEST) -W all
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

**Documentation**: <a target="_blank" href="https://yahooquery.dpguthrie.com">https://yahooquery.dpguthrie.com</a>

**Interactive Demo**: <a target="_blank" href="https://dpguthrie-yahooquery-streamlit-app-eydpjo.streamlit.app/">https://dpguthrie-yahooquery-streamlit-app-eydpjo.streamlit.app/</a>
**Interactive Demo**: <a target="_blank" href="https://yahooquery.streamlit.app/">https://yahooquery.streamlit.app/</a>

**Source Code**: <a target="_blank" href="https://github.com/dpguthrie/yahooquery">https://github.com/dpguthrie/yahooquery</a>

Expand Down
Loading
Loading