Skip to content

refactor(investing): migrate Magic Formula into investing/ (#181) - #185

Merged
JLaborda merged 1 commit into
developfrom
cursor/181-investing-layout-rename-d99a
Oct 14, 2026
Merged

JLaborda merged 1 commit into
developfrom
cursor/181-investing-layout-rename-d99a

Conversation

@JLaborda

Copy link
Copy Markdown
Owner

Summary

PR1 of epic #180 — migrate Magic Formula into a credit/-mirrored investing/ tree and hard-rename the Python package smartwealthai → investing (no shim).

Closes #181.

Layout

Before After
src/smartwealthai/ investing/src/investing/
CONTEXT.md investing/CONTEXT.md
docs/mvp/ investing/docs/
apps/dashboard/ investing/apps/dashboard/
investing tests under tests/ investing/tests/
tests/credit/ credit/tests/

Root CONTEXT-MAP.md and docs/adr/ stay at repo root (updated paths).

Tooling

Out of scope

uv workspace, domain deps split, CI matrix, Spec Kit, credit features, unified portal.

Test plan

  • make lint
  • poetry run pytest --cov=investing --cov=credit --cov-branch → 333 passed
Open in Web Open in Cursor 

Mirror credit layout: investing/{CONTEXT.md,docs/,src/investing/,apps/,tests/}.
Hard-rename package smartwealthai → investing (no shim). Move docs/mvp →
investing/docs, dashboard → investing/apps/dashboard, and tests/credit →
credit/tests. Update Poetry entry points, CI, AGENTS, CONTEXT-MAP, and cursor
rules so the demo pipeline stays green under Poetry.

Co-authored-by: jdlsicilia <jdlsicilia@gmail.com>
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 116 files, which is 16 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Check out review usage here.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 88d92af9-d7c7-405c-9b42-6eac341b017f
📥 Commits

Reviewing files that changed from the base of the PR and between 2df69b0 and 89e6045.

⛔ Files ignored due to path filters: 13
  • credit/tests/fixtures/amex_extract/train_data_tiny.csv is excluded by !**/*.csv
  • credit/tests/fixtures/application_source/amex_sample.pkl is excluded by !**/*.pkl
  • credit/tests/fixtures/application_source/applications.csv is excluded by !**/*.csv
  • credit/tests/fixtures/competition_mart/amex/train_labels.csv is excluded by !**/*.csv
  • credit/tests/fixtures/competition_mart/home_credit/application_train.csv is excluded by !**/*.csv
  • credit/tests/fixtures/psi_mart/applications.csv is excluded by !**/*.csv
  • credit/tests/fixtures/scoring_mart/applications.csv is excluded by !**/*.csv
  • investing/tests/fixtures/lake/curated/fundamentals.csv is excluded by !**/*.csv
  • investing/tests/fixtures/lake/raw/simfin/dataset=balance/variant=quarterly/market=us/as_of_date=2026-06-18/us-balance-quarterly.csv is excluded by !**/*.csv
  • investing/tests/fixtures/lake/raw/simfin/dataset=companies/variant=default/market=us/as_of_date=2026-06-18/us-companies.csv is excluded by !**/*.csv
  • investing/tests/fixtures/lake/raw/simfin/dataset=income/variant=ttm/market=us/as_of_date=2026-06-18/us-income-ttm.csv is excluded by !**/*.csv
  • investing/tests/fixtures/lake/raw/simfin/dataset=industries/variant=default/market=us/as_of_date=2026-06-18/industries.csv is excluded by !**/*.csv
  • investing/tests/fixtures/lake/raw/simfin/dataset=shareprices/variant=latest/market=us/as_of_date=2026-06-18/us-shareprices-latest.csv is excluded by !**/*.csv
📒 Files selected for processing: 116
  • .cursor/rules/domain.md
  • .cursor/rules/issue-tracker.md
  • .cursor/rules/mvp-docs.mdc
  • .cursor/rules/notion-tasks.mdc
  • .cursor/rules/project-context.mdc
  • .cursor/rules/spec-driven-workflow.mdc
  • .github/workflows/pr-ci.yml
  • AGENTS.md
  • CONTEXT-MAP.md
  • Makefile
  • README.md
  • apps/dashboard/__init__.py
  • credit/README.md
  • credit/data/README.md
  • credit/docs/README.md
  • credit/docs/features/aws-fargate-serve-demo.md
  • credit/docs/features/css-chapter5-mart-and-scoring.md
  • credit/docs/features/psi-data-drift.md
  • credit/docs/guides/friday-demo.md
  • credit/docs/guides/serve-fastapi.md
  • credit/notebooks/eda_application_mart.ipynb
  • credit/src/credit/demo_serve_artifact.py
  • credit/tests/fixtures/serving/drivers_request.json
  • credit/tests/fixtures/serving/score_request.json
  • credit/tests/test_amex_parquet_convert.py
  • credit/tests/test_api_serving.py
  • credit/tests/test_application_mart.py
  • credit/tests/test_cli_competition_raw.py
  • credit/tests/test_cli_stub.py
  • credit/tests/test_competition_mart.py
  • credit/tests/test_competition_raw_stage.py
  • credit/tests/test_psi.py
  • credit/tests/test_scoring_coverage.py
  • credit/tests/test_scoring_pipeline.py
  • credit/tests/test_serve_demo_bake.py
  • data/reference/universes/README.md
  • docs/README.md
  • docs/adr/0002-june-demo-scope-cut.md
  • docs/adr/0003-phase2-qv-cancelled.md
  • investing/CONTEXT.md
  • investing/README.md
  • investing/apps/dashboard/Home.py
  • investing/apps/dashboard/__init__.py
  • investing/apps/dashboard/common.py
  • investing/apps/dashboard/pages/1_Ranking.py
  • investing/apps/dashboard/pages/2_Portfolio.py
  • investing/docs/NOTION_SETUP.md
  • investing/docs/architecture/architecture.md
  • investing/docs/backlog/backlog.md
  • investing/docs/demo-slice.md
  • investing/docs/features/backtesting.md
  • investing/docs/features/broker-execution.md
  • investing/docs/features/cheap-stocks.md
  • investing/docs/features/corroborative-signals.md
  • investing/docs/features/dashboard-reporting.md
  • investing/docs/features/etl-data-lake.md
  • investing/docs/features/high-quality-stocks.md
  • investing/docs/features/permanent-loss-filter.md
  • investing/docs/features/portfolio-evolution.md
  • investing/docs/features/sell-watch.md
  • investing/docs/features/universe-construction.md
  • investing/docs/features/unstructured-financial-data.md
  • investing/docs/guides/download-fundamentals.md
  • investing/docs/guides/download-simfin.md
  • investing/docs/prds/ci-cd/ci-cd-prd.md
  • investing/docs/prds/devcontainer/prd.md
  • investing/docs/prds/phase2/prd.md
  • investing/docs/requirements/requirements.md
  • investing/src/investing/__init__.py
  • investing/src/investing/build_universe.py
  • investing/src/investing/compute_metrics.py
  • investing/src/investing/dashboard_data.py
  • investing/src/investing/download_fundamentals.py
  • investing/src/investing/download_prices.py
  • investing/src/investing/download_simfin.py
  • investing/src/investing/edgartools_client.py
  • investing/src/investing/fixture_lake.py
  • investing/src/investing/generate_simfin_industry_exclusions.py
  • investing/src/investing/lake_paths.py
  • investing/src/investing/magic_formula_metrics.py
  • investing/src/investing/magic_formula_ranking.py
  • investing/src/investing/mlflow_run_logging.py
  • investing/src/investing/normalize_simfin.py
  • investing/src/investing/pit_fundamentals.py
  • investing/src/investing/price_ingest.py
  • investing/src/investing/run_dashboard.py
  • investing/src/investing/run_demo_pipeline.py
  • investing/src/investing/score_universe.py
  • investing/src/investing/sec_client.py
  • investing/src/investing/simfin_client.py
  • investing/src/investing/simfin_industry_exclusions.py
  • investing/src/investing/simfin_normalizer.py
  • investing/src/investing/universe.py
  • investing/src/investing/universe_builder.py
  • investing/tests/fixtures/lake/MANIFEST.json
  • investing/tests/fixtures/lake/README.md
  • investing/tests/fixtures/lake/raw/sec_edgar/cik=0000320193/endpoint=companyfacts/as_of_date=2026-05-21/response.json
  • investing/tests/fixtures/lake/raw/sec_edgar/cik=0000789019/endpoint=companyfacts/as_of_date=2026-05-21/response.json
  • investing/tests/fixtures/lake/raw/yfinance/ticker=AAPL/endpoint=history/as_of_date=2026-05-21/history.json
  • investing/tests/fixtures/lake/raw/yfinance/ticker=MSFT/endpoint=history/as_of_date=2026-05-21/history.json
  • investing/tests/test_ci_baseline.py
  • investing/tests/test_dashboard_data.py
  • investing/tests/test_download_fundamentals.py
  • investing/tests/test_download_prices.py
  • investing/tests/test_download_simfin.py
  • investing/tests/test_magic_formula_metrics.py
  • investing/tests/test_magic_formula_ranking.py
  • investing/tests/test_mlflow_run_logging.py
  • investing/tests/test_pit_fundamentals.py
  • investing/tests/test_run_demo_pipeline.py
  • investing/tests/test_simfin_industry_exclusions.py
  • investing/tests/test_simfin_normalizer.py
  • investing/tests/test_universe_builder.py
  • platform/docs/ephemeral-css-serve-demo.md
  • platform/scripts/demo-up.sh
  • pyproject.toml

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.02%. Comparing base (2df69b0) to head (89e6045).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #185      +/-   ##
===========================================
+ Coverage    98.71%   99.02%   +0.31%     
===========================================
  Files           40       64      +24     
  Lines         2566     5355    +2789     
  Branches       309      321      +12     
===========================================
+ Hits          2533     5303    +2770     
- Misses          25       44      +19     
  Partials         8        8              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JLaborda
JLaborda marked this pull request as ready for review October 14, 2026 10:32
@cursor

cursor Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review

@JLaborda

Copy link
Copy Markdown
Owner Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 89e6045. Configure here.

@JLaborda
JLaborda merged commit 0ec6a4f into develop Oct 14, 2026
5 checks passed
@JLaborda
JLaborda deleted the cursor/181-investing-layout-rename-d99a branch October 14, 2026 11:30
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.

2 participants