-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This workflow 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 | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies and build | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel | ||
python setup.py sdist bdist_wheel | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.PHONY: venv lint test docs | ||
|
||
venv: | ||
python -m venv .venv | ||
.venv/bin/pip install -r requirements.txt | ||
.venv/bin/pip install -e . | ||
#.venv/bin/pip install -r docs/requirements.txt | ||
|
||
lint: | ||
.venv/bin/isort --check --diff tradestation/ tests/ | ||
.venv/bin/flake8 --count --show-source --statistics tradestation/ tests/ | ||
.venv/bin/mypy -p tradestation | ||
.venv/bin/mypy -p tests | ||
|
||
test: | ||
.venv/bin/pytest --cov=tradestation --cov-report=term-missing tests/ --cov-fail-under=95 | ||
|
||
docs: | ||
cd docs; make html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
httpx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from setuptools import find_packages, setup | ||
|
||
|
||
f = open('README.md', 'r') | ||
LONG_DESCRIPTION = f.read() | ||
f.close() | ||
|
||
setup( | ||
name='tradestation', | ||
version='0.1', | ||
description='An unofficial SDK for Tradestation!', | ||
long_description=LONG_DESCRIPTION, | ||
long_description_content_type='text/markdown', | ||
author='Graeme Holliday', | ||
author_email='[email protected]', | ||
url='https://github.com/tastyware/tradestation', | ||
license='MIT', | ||
install_requires=[ | ||
'httpx>=0.27.0', | ||
], | ||
packages=find_packages(exclude=['ez_setup', 'tests*']), | ||
package_data={'tradestation': ['py.typed']}, | ||
include_package_data=True | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import logging | ||
|
||
API_URL_V3 = 'https://api.tradestation.com/v3' | ||
API_URL_V2 = 'https://api.tradestation.com/v2' | ||
API_URL_SIM = 'https://sim-api.tradestation.com/v3' | ||
VERSION = '0.1' | ||
|
||
logger = logging.getLogger(__name__) | ||
logger.setLevel(logging.DEBUG) | ||
|
||
# flake8: noqa | ||
|
||
from session import Session | ||
|
||
__all__ = ['Session'] | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class Session: | ||
pass | ||
|