Skip to content

Commit

Permalink
update to v9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Graeme22 committed Dec 3, 2024
1 parent 12c923e commit 5b5913a
Show file tree
Hide file tree
Showing 9 changed files with 1,447 additions and 1,128 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ jobs:
- name: Lint with ruff
run: |
uv run ruff check ttcli/
- name: Type check with mypy
- name: Type check with pyright
run: |
uv run mypy -p ttcli
uv run pyright ttcli/
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ install:

lint:
uv run ruff check ttcli/
uv run mypy -p ttcli
uv run pyright ttcli/
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ authors = [
dependencies = [
"asyncclick>=8.1.7.2",
"rich>=13.8.1",
"tastytrade>=8.3",
"tastytrade>=9.2",
]

[project.urls]
Expand All @@ -25,9 +25,12 @@ Homepage = "https://github.com/tastyware/tastytrade-cli"
[tool.uv]
dev-dependencies = [
"ipykernel>=6.29.5",
"mypy>=1.11.2",
"pyright>=1.1.389",
"ruff>=0.6.7",
]

[project.scripts]
tt = "ttcli.app:main"

[tool.hatch.build.targets.wheel]
packages = ["ttcli"]
13 changes: 3 additions & 10 deletions ttcli/app.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import asyncio
import sys

import asyncclick as click

from ttcli.option import option
from ttcli.portfolio import portfolio
from ttcli.utils import CONTEXT_SETTINGS, VERSION, logger
from ttcli.utils import CONTEXT_SETTINGS, VERSION


@click.group(context_settings=CONTEXT_SETTINGS)
Expand All @@ -15,11 +12,7 @@ async def app():


def main():
if sys.version_info[0] == 3 and sys.version_info[1] >= 8 and sys.platform.startswith('win'):
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
logger.debug('Using Windows-specific event loop policy')

app.add_command(option)
app.add_command(portfolio, name='pf')
app.add_command(portfolio, name="pf")

app(_anyio_backend='asyncio')
app(_anyio_backend="asyncio")
25 changes: 13 additions & 12 deletions ttcli/data/ttcli.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@
[portfolio]
bp-target-percent-variation = 10
bp-max-percent-per-position = 5.0
portfolio-delta-target = 0
portfolio-delta-variation = 5
positions-show-mark-price = false
positions-show-trade-price = false
positions-show-delta = false
positions-show-theta = false
positions-show-gamma = false
delta-target = 0
delta-variation = 5
[portfolio.positions]
show-mark-price = false
show-trade-price = false
show-delta = false
show-theta = false
show-gamma = false

[order]
bp-warn-above-percent = 5 # TODO: make this a float

[option]
chain-show-delta = true
chain-show-volume = false
chain-show-open-interest = false
chain-show-theta = false
[option.chain]
show-delta = true
show-volume = true
show-open-interest = true
show-theta = true
Loading

0 comments on commit 5b5913a

Please sign in to comment.