Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
112 lines (100 loc) · 3.55 KB
/
Copy pathpyproject.toml
File metadata and controls
112 lines (100 loc) · 3.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[project]
name = "allocator"
version = "0.1.0"
description = "Personal portfolio rebalancer and withdrawal planner. Pulls holdings from Monarch + Coinbase, compares against a target allocation, and outputs a trade plan."
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.11"
authors = [{ name = "Madison Rickert", email = "3495636+madisonrickert@users.noreply.github.com" }]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Office/Business :: Financial :: Investment",
]
dependencies = [
"typer>=0.24.1",
"rich>=15.0.0",
"pyyaml>=6.0",
"monarchmoneycommunity>=1.3.1",
"keyring>=25.7.0",
"numpy>=2.0",
"pandas>=2.2",
"scipy>=1.13",
"yfinance>=1.3.0",
]
[project.optional-dependencies]
sources = [
"monarchmoneycommunity",
"keyring",
]
plot = ["plotly>=6.7.0"]
# Direct Coinbase + CoinGecko integrations deferred — Monarch aggregates Coinbase holdings.
dev = [
"pytest>=8.0",
"pytest-cov>=7.1.0",
"hypothesis>=6.100",
"ruff>=0.15.11",
"pyright>=1.1.408",
"pre-commit>=3.7",
]
[project.scripts]
allocator = "allocator.cli:app"
[project.urls]
Homepage = "https://github.com/madisonrickert/allocator"
Issues = "https://github.com/madisonrickert/allocator/issues"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/allocator"]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP", "B", "SIM", "RUF", "ARG"]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["ARG001", "ARG002"] # pytest fixtures and mock-method args
[tool.pyright]
include = ["src"]
pythonVersion = "3.11"
typeCheckingMode = "strict"
reportMissingTypeStubs = false
reportUnknownMemberType = false
reportUnknownArgumentType = false
reportUnknownVariableType = false
# Tests use conftest fixtures without explicit types, which is idiomatic pytest.
# Strict mode is for the src/ tree; tests run under standard mode via a separate invocation.
# The new pandas-heavy modules (optimize + yfinance/coingecko adapters) dip into
# libraries whose types pyright can't fully resolve, so they run in standard mode
# rather than strict.
executionEnvironments = [
{ root = "tests", reportMissingParameterType = false, reportUnknownParameterType = false },
{ root = "src/allocator/optimize.py", reportUnknownLambdaType = false, reportCallIssue = false, reportArgumentType = false, reportGeneralTypeIssues = false },
{ root = "src/allocator/sources/prices.py", reportUnknownLambdaType = false, reportCallIssue = false, reportArgumentType = false, reportGeneralTypeIssues = false },
{ root = "src/allocator/sources/coingecko.py", reportOptionalMemberAccess = false, reportReturnType = false, reportAttributeAccessIssue = false },
{ root = "src/allocator/cli.py", reportArgumentType = false },
]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra --strict-markers --cov=allocator --cov-report=term-missing"
[tool.coverage.run]
branch = true
source = ["src/allocator"]
omit = [
"src/allocator/__main__.py",
"src/allocator/sources/monarch.py", # Phase-2 stub
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"def __repr__",
"@overload",
]
fail_under = 85