Skip to content

Batch 8a: import the portfolio from a Tradeville export - #8

Open
Arvi23 wants to merge 1 commit into
batch-7-languagefrom
batch-8-import
Open

Arvi23 wants to merge 1 commit into
batch-7-languagefrom
batch-8-import

Conversation

@Arvi23

@Arvi23 Arvi23 commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Stacked on #7.

What: an IMPORT button next to "+ ADD POSITION". Pick the Tradeville portfolio export (or any CSV with ticker/shares/avg_cost), check the preview, then confirm.

  • watchstock/importers.py: pure parser for the Tradeville export (the format is documented in the docstring) and for a generic CSV
  • The preview saves nothing and verifies every ticker against Yahoo. If a ticker isn't found, it tries an ISIN search. Rows that still can't be verified are red: the user types a ticker and clicks CHECK AGAIN, or the row is left out.
  • Replace (the default) or merge. "Why I own it" notes are kept either way.
  • Sector/country/dividend for stocks that were never opened: one light fetch each, run in the background (company_info, migration 4). If the app closes mid-way, it resumes on the next portfolio load.
  • Tests use a synthetic fixture; the owner's real export is not in the repo. UI smoke covers the flow in EN and RO.
  • Docs: HANDOFF, ARCHITECTURE, DECISIONS D16. Version 0.9.0.

Needs live testing: see HANDOFF → "Batch 8a".


Generated by Claude Code

- IMPORT button next to "+ ADD POSITION": pick a file, review a preview, confirm
- watchstock/importers.py: Tradeville export parser (SEP= line, simbol/sold/costm/...,
  class suffixes, cash rows skipped) + generic CSV (ticker/shares/avg_cost)
- Preview verifies every ticker (batch quotes, ISIN search fallback, no duplicates);
  unknown rows are editable and re-checked before they can be imported
- Replace (default) or merge; "why I own it" notes are kept
- company_info table (migration 4): light sector/country/dividend fetch in the
  background for never-opened stocks, resumed on the next portfolio load
- Tests on a synthetic fixture; UI smoke covers the flow in English and Romanian
- Docs: HANDOFF, ARCHITECTURE, DECISIONS D16; version 0.9.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TW7cJeWrcBW5SJHr4ZKtSH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant