Consolidate entry points #70
Open
raymondcen wants to merge 5 commits into
Open
Conversation
There was a problem hiding this comment.
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.pypipeline intosrc/pipeline/classify_extract.pybehind--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.pyto invoke the CLI withsys.executableinstead of hardcodingpython.
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added instructions and CLI flags for processing pre-classified
.txtfiles using the--skip-classifierflag inclassify_extract.pyto bothREADME.mdanddocumentation/CONTRIBUTING.md. This allows users to extract from.txtfiles directly, with options for chunked extraction and label filtering. [1] [2]Updated the summary of extraction fields in
documentation/CONTRIBUTING.mdto remove references to the obsoleteextract_from_txt.pyand clarify that new fields should be added toclassify_extract.py.Updated
documentation/DESIGN_DECISIONS.mdto document thatextract_from_txt.pywas merged intoclassify_extract.pyas part of the new--skip-classifierworkflow.Updated the test in
tests/test_pdf_extraction.pyto usesys.executableinstead of hardcoding"python", ensuring the correct Python interpreter is used during test execution.Added a new sample file
data/processed-text/test.txtfor demonstration or testing purposes.