Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add models for output and improve typing #63

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

marc-at-brightnight
Copy link

@marc-at-brightnight marc-at-brightnight commented Jan 12, 2025

  • Add pydantic models for outputs
  • Improve typing
  • Lock poetry file
  • Fix imports

This PR focuses on improving typing safety in core parts of the repo. Specifically, the introduction of pydantic models adds a source of truth, and removes the need to .get everything.

The output is slightly changed. Previously, we had:

ANALYST SIGNALS:
+-------------------+----------+--------------------+
| Analyst           |  Signal  |         Confidence |
+===================+==========+====================+
| Fundamentals      | BULLISH  |              75.0% |
+-------------------+----------+--------------------+
| Technical Analyst | NEUTRAL  |                12% |
+-------------------+----------+--------------------+
| Valuation         | BEARISH  | 56.00000000000001% |
+-------------------+----------+--------------------+
| Sentiment         | BEARISH  |              85.0% |
+-------------------+----------+--------------------+
| Risk Management   |          |              None% |
+-------------------+----------+--------------------+

Notice the last row is always blank. Now:

ANALYST SIGNALS:
+-------------------+----------+--------------+
| Analyst           |  Signal  |   Confidence |
+===================+==========+==============+
| Fundamentals      | BULLISH  |        75.0% |
+-------------------+----------+--------------+
| Sentiment         | BEARISH  |        85.0% |
+-------------------+----------+--------------+
| Technical Analyst | NEUTRAL  |        12.0% |
+-------------------+----------+--------------+
| Valuation         | BEARISH  |        56.0% |
+-------------------+----------+--------------+

This also aligns better with the CLI user selection.

marc-at-brightnight added 4 commits January 12, 2025 07:43
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