Fix Firstrade notification account overview#73
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 249eb77b82
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "可投资现金", | ||
| "净值", | ||
| } | ||
| return any(label and label.lower() in lowered for label in metric_labels) |
There was a problem hiding this comment.
Match metric labels only at field prefixes
When dashboard_text contains a non-duplicated supplemental line that merely mentions equity/portfolio_equity (for example a small-account warning) and signal_display is empty or does not carry that same detail, this broad substring check drops the line even though the generated account overview does not recreate it. The previous behavior preserved those dashboard supplements, so the duplicate filter should only match actual metric rows such as labels at the start of the line.
Useful? React with 👍 / 👎.
Summary
Checks
PYTHONPATH=.:../QuantPlatformKit/src:../UsEquityStrategies/src:/usr/lib/python3/dist-packages python -m pytest -q tests/test_notifications_telegram.pyPYTHONPATH=.:../QuantPlatformKit/src:../UsEquityStrategies/src:/usr/lib/python3/dist-packages /usr/bin/python3 -m py_compile notifications/telegram.py tests/test_notifications_telegram.pygit diff --checkNote: full local
tests/test_rebalance_service.pycollection is blocked on this VPS because the available Python environments do not include all runtime test dependencies (pandasin the pytest venv,pytestin system Python). CI installsrequirements.txtand should run the full suite.