Skip to content

Consolidate entry points #70

Open
raymondcen wants to merge 5 commits into
mainfrom
merge-entry-points
Open

Consolidate entry points #70
raymondcen wants to merge 5 commits into
mainfrom
merge-entry-points

Conversation

@raymondcen

Copy link
Copy Markdown
Collaborator
  • Added instructions and CLI flags for processing pre-classified .txt files using the --skip-classifier flag in classify_extract.py to both README.md and documentation/CONTRIBUTING.md. This allows users to extract from .txt files directly, with options for chunked extraction and label filtering. [1] [2]

  • Updated the summary of extraction fields in documentation/CONTRIBUTING.md to remove references to the obsolete extract_from_txt.py and clarify that new fields should be added to classify_extract.py.

  • Updated documentation/DESIGN_DECISIONS.md to document that extract_from_txt.py was merged into classify_extract.py as part of the new --skip-classifier workflow.

  • Updated the test in tests/test_pdf_extraction.py to use sys.executable instead of hardcoding "python", ensuring the correct Python interpreter is used during test execution.

  • Added a new sample file data/processed-text/test.txt for demonstration or testing purposes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR consolidates the previously separate “extract from pre-classified .txt” workflow into the main classify_extract.py entry point (via --skip-classifier), updates documentation accordingly, and makes a small test robustness improvement.

Changes:

  • Merged the former extract_from_txt.py pipeline into src/pipeline/classify_extract.py behind --skip-classifier, including label filtering and chunked extraction options.
  • Updated docs (README.md, documentation/CONTRIBUTING.md, documentation/DESIGN_DECISIONS.md) to reflect the consolidated entry point and removal of the old script.
  • Updated tests/test_pdf_extraction.py to invoke the CLI with sys.executable instead of hardcoding python.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/pipeline/classify_extract.py Adds --skip-classifier TXT extraction path and consolidates shared extraction/preprocess logic into one entry point.
src/pipeline/extract_from_txt.py Removes the standalone TXT pipeline script now that its functionality is consolidated.
documentation/CONTRIBUTING.md Documents the new TXT extraction usage/flags and updates guidance on where extraction fields are maintained.
README.md Adds a CLI example for extracting from pre-classified .txt inputs using --skip-classifier.
documentation/DESIGN_DECISIONS.md Records the design decision to merge the former extract-from-txt entry point into classify_extract.py.
tests/test_pdf_extraction.py Uses sys.executable to ensure the test runs with the active interpreter.
data/processed-text/test.txt Adds a sample .txt file intended for demonstration/testing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +509 to +517
filtered, trimmed, counts, err = _preprocess_text(
raw_text,
max_chars,
stem=source_file.stem,
save_intermediates=save_intermediates,
cleaner_dir=cleaner_dir,
filter_dir=filter_dir,
llm_dir=llm_dir if not chunked else None,
)
Comment on lines +1 to 5
[PAGE 1]
CS 331: Introduction to Artificial
Intelligence
Lecture 2: Agents
Sandhya Saisubramanian
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