Skip to content

Commit fe25aab

Browse files
committed
Fix and improve GitHub workflows
1 parent 1f30169 commit fe25aab

File tree

21 files changed

+70
-72
lines changed

21 files changed

+70
-72
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
uses: actions/checkout@v2
99
- name: Set up Python
1010
uses: actions/setup-python@v2
11-
- name: Lint
11+
- name: Lint (black)
1212
uses: psf/black@stable
1313
with:
14-
black_args: "./ally --check"
14+
args: "./ally --check"
1515

.github/workflows/publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish Python Package
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout Source Code
10+
uses: actions/checkout@v2
11+
- name: Set up Python
12+
uses: actions/setup-python@v2
13+
- name: Install tools
14+
run: |
15+
python -m pip install --upgrade pip setuptools wheel
16+
pip install --upgrade twine
17+
- name: Build
18+
run: python setup.py sdist bdist_wheel
19+
- name: Publish
20+
env:
21+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
22+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
23+
run: twine upload dist/*

.github/workflows/pythonpublish.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ After setting up API keys, PyAlly can provide the basic/essential Ally brokerage
1111

1212
Make sure to [read the docs](https://alienbrett.github.io/PyAlly)!
1313

14-
1514
## Version 1.1.2
1615

1716
The lastest redesign preserves many features of the old interface, and incorporates a few new ones.
@@ -68,6 +67,7 @@ If your dev environment gets hosed, exit it, remove the `venv` directory, and ru
6867
* [Tianyu](https://github.com/Tianyu00)
6968
* [Salient](https://github.com/Salient)
7069
* [Matt Margolin](https://github.com/mm0)
70+
* [Alex Kennedy](https://github.com/LaikaN57)
7171

7272
Message me on Github or [send an email](mailto:alienbrett648@gmail.com) if you enjoyed the project or thought it could be improved. I do my best to code with quality but sometimes it is easier said than done. Anyone with an interest with an eye for detail is welcome to contribute.
7373

ally/Account/accounts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
2222

23-
from .utils import _dot_flatten
2423
from ..Api import AccountEndpoint, RequestType
24+
from .utils import _dot_flatten
2525

2626

2727
class Accounts(AccountEndpoint):

ally/Account/balances.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
2222

23-
from .utils import _dot_flatten
2423
from ..Api import AccountEndpoint, RequestType
24+
from .utils import _dot_flatten
2525

2626

2727
class Balances(AccountEndpoint):

ally/Ally.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@
3030

3131
from .Api import setTimeout
3232
from .Auth import Auth
33-
from .Watchlist import Watchlist
3433
from .exception import ApiKeyException
35-
34+
from .Watchlist import Watchlist
3635

3736
_all_params = (
3837
"ALLY_OAUTH_SECRET",

ally/Api.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@
3333
3434
"""
3535

36+
import datetime
37+
import json
38+
3639
from requests import Request, Session
3740
from requests.exceptions import HTTPError, Timeout
41+
3842
from . import RateLimit
39-
from .utils import JSONStreamParser, pretty_print_POST
4043
from .classes import RequestType
41-
import datetime
42-
import json
44+
from .utils import JSONStreamParser, pretty_print_POST
4345

4446
# Global timeout variable
4547
_timeout = 1.0
@@ -190,7 +192,7 @@ def request(self=None):
190192
except StopIteration:
191193
pass
192194
else:
193-
if 'quote' in row or 'trade' in row:
195+
if "quote" in row or "trade" in row:
194196
yield row
195197
finally:
196198
del it

ally/Order/Outstanding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
2222

23-
from .order import Order
2423
from ..Api import AccountEndpoint, RequestType
24+
from .order import Order
2525

2626

2727
class OutstandingOrders(AccountEndpoint):

ally/Order/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
2727
"""
2828

29-
from .Outstanding import orders
30-
from .Submit import submit
3129
from .classes import *
3230
from .order import Order
31+
from .Outstanding import orders
32+
from .Submit import submit

0 commit comments

Comments
 (0)