Skip to content

Commit

Permalink
Merge pull request #35 from alexgolec/start-testing
Browse files Browse the repository at this point in the history
Start testing in earnest
  • Loading branch information
alexgolec authored May 3, 2024
2 parents 2eab7c9 + 794e800 commit 02a8db4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ jobs:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python:
- version: "3.8"
toxenv: py38
- version: "3.9"
toxenv: py39
- version: "3.10"
toxenv: py310
- version: "3.11"
Expand Down Expand Up @@ -43,14 +39,14 @@ jobs:
run: tox

- name: Report coverage
if: matrix.python.version == '3.8'
if: matrix.python.version == '3.10'
run: |
coverage combine
coverage report
coverage xml
- name: Upload coverage to Codecov
if: matrix.python.version == '3.8'
if: matrix.python.version == '3.10'
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
9 changes: 5 additions & 4 deletions schwab/client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@ def _make_order_query(self,

if from_entered_datetime is None:
from_entered_datetime = (
datetime.datetime.now(datetime.UTC) -
datetime.datetime.now(datetime.timezone.utc) -
datetime.timedelta(days=60))
if to_entered_datetime is None:
to_entered_datetime = datetime.datetime.now(datetime.UTC)
to_entered_datetime = datetime.datetime.now(datetime.timezone.utc)

params = {
'fromEnteredTime': self._format_date_as_iso(
Expand Down Expand Up @@ -381,14 +381,15 @@ def get_transactions(
if start_date is None:
start_date = self._format_date_as_iso(
'start_date',
datetime.datetime.now(datetime.UTC) - datetime.timedelta(days=60))
datetime.datetime.now(datetime.timezone.utc)
- datetime.timedelta(days=60))
else:
start_date = self._format_date_as_iso('start_date', start_date)

# End date
if end_date is None:
end_date = self._format_date_as_iso(
'end_date', datetime.datetime.now(datetime.UTC))
'end_date', datetime.datetime.now(datetime.timezone.utc))
else:
end_date = self._format_date_as_iso('end_date', end_date)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
'Operating System :: OS Independent',
'Topic :: Office/Business :: Financial :: Investment',
],
python_requires='>=3.8',
python_requires='>=3.10',
install_requires=[
'authlib',
'httpx',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
{py37,py38,py39,py310,py311}
{py310,py311,py312}
coverage

[testenv]
Expand Down

0 comments on commit 02a8db4

Please sign in to comment.