Repository navigation
Release 2.7.3: scrape folder path handling - #78
Merged
Merged
Conversation
… where it looked The folder prompt only accepted the exact run folder (scrape/<date-time>/). Pointing it at scrape/ itself, or at pages.jsonl, failed with "No pages.jsonl or page_NNN.md files in that folder", which did not say which folder was checked, so it looked like the scraped pages could not be used. New scrape.resolve_scrape_dir takes the run folder, a file inside it (pages.jsonl or page_NNN.md, which resolves to its folder), or a parent folder such as scrape/, where the newest run that has pages is used (empty runs are skipped). Errors give the full absolute path checked and what was expected: "Not found: <path>", "<path> is a file. Point to the scrape folder...", or "No scraped pages in <path>. Expected pages.jsonl or page_NNN.md files in this folder or in one of its subfolders...". The prompt validates with it, so the message shows before leaving the box. A pages.jsonl that cannot be read or parsed is now reported with its folder instead of raising, and the "no pages with text" message says what to do next. Tests: resolver accepts folder, file and parent (newest non-empty run); each error names the full location. Full suite and ruff pass.
pyproject.toml, uv.lock, CITATION.cff (version 2.7.2), README current-release line, and a CHANGELOG 2.7.2 section. Patch release: "Pages I scraped earlier" accepts the run folder, a file inside it, or a parent such as scrape/ (newest run with pages), and its errors give the full path checked and what was expected there.
pyproject.toml, uv.lock, CITATION.cff (version 2.7.3), README current-release line, and a CHANGELOG 2.7.3 section. Same code as 2.7.2, which was tagged and published from a local merge commit that never reached master because a direct push was declined by the repository rules. 2.7.3 will be tagged on the merge of this PR.
Owner
Author
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.
Patch release 2.7.2. Contains the fix commit 8da24bc and the version bump f415fbc.
Problem
"Pages I scraped earlier" (Build an AI training dataset) only accepted the exact run folder,
scrape/<date-time>/. Pointing it atscrape/or atpages.jsonlfailed with "No pages.jsonl or page_NNN.md files in that folder", which did not say which folder was checked.Fix
scrape.resolve_scrape_diraccepts the run folder, a file inside it (pages.jsonlorpage_NNN.md), or a parent such asscrape/(the newest run with pages; empty runs are skipped).Not found: <path>,<path> is a file...,No scraped pages in <path>. Expected pages.jsonl or page_NNN.md files....pages.jsonlis reported with its folder instead of raising.Tests
Two new tests in
tests/test_quick_scrape.py(accepted paths; error messages name the location). Full suite and ruff pass locally.Note
Tag
v2.7.2was pushed before this PR, on local merge commit 15ffb6f (same tree as this branch), because a direct push to master was rejected by the repository rules.