Skip to content

[Tearsheet] --tearsheet-only CLI flag — skip full note, generate tearsheet only #36

Description

@DogInfantry

Part of epic: #30
Depends on: #33, #34, #35

What

Add --tearsheet-only flag to pipeline_v2.py argparse so users can skip the full 12-section HTML note and generate only the tearsheet outputs (HTML + PDF + PNG). This makes the tearsheet usable as a standalone fast-run artifact.

CLI usage

# Full pipeline (default) — generates note + tearsheet
python pipeline_v2.py --ticker AAPL

# Tearsheet only — skips valuation deep-dive, peer CCA, full commentary
# Still fetches data and runs core metrics
python pipeline_v2.py --ticker AAPL --tearsheet-only

# Tearsheet for a whole sector sweep
python pipeline_v2.py --sector technology --tearsheet-only

Implementation

# In pipeline_v2.py argparse section
parser.add_argument(
    '--tearsheet-only',
    action='store_true',
    help='Skip full research note, generate tearsheet (HTML/PDF/PNG) only'
)

# In main pipeline logic
if args.tearsheet_only:
    data = fetch_core_data(ticker)  # lightweight fetch
    note = build_tearsheet_inputs(data)
    gen = TearsheetGenerator(note)
    gen.render_pdf(f'outputs/{ticker}_tearsheet.pdf')
    gen.render_png(f'outputs/{ticker}_tearsheet.png')
else:
    # existing full pipeline
    ...

Acceptance Criteria

  • --tearsheet-only flag exists in argparse with help text
  • Running with flag skips full HTML note generation
  • Tearsheet HTML, PDF, and PNG are all generated
  • Runtime with --tearsheet-only is at least 40% faster than full pipeline
  • Flag works with --sector for batch tearsheet generation
  • README documents --tearsheet-only usage with example command

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions