Skip to content

Release 2.7.3: scrape folder path handling - #78

Merged
ianktoo merged 4 commits into
masterfrom
release/v2.7.2
Sep 25, 2026
Merged

ianktoo merged 4 commits into
masterfrom
release/v2.7.2

Conversation

@ianktoo

@ianktoo ianktoo commented Sep 25, 2026

Copy link
Copy Markdown
Owner

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 at scrape/ 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.

Fix

  • New scrape.resolve_scrape_dir accepts the run folder, a file inside it (pages.jsonl or page_NNN.md), or a parent such as scrape/ (the newest run with pages; empty runs are skipped).
  • Errors give the full absolute path checked and what was expected: Not found: <path>, <path> is a file..., No scraped pages in <path>. Expected pages.jsonl or page_NNN.md files....
  • An unreadable or malformed pages.jsonl is reported with its folder instead of raising.
  • Version 2.7.2 in pyproject.toml, uv.lock, CITATION.cff, README and CHANGELOG.

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.2 was 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.

… 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.
@ianktoo ianktoo changed the title Release 2.7.2: scrape folder path handling Release 2.7.3: scrape folder path handling Sep 25, 2026
@ianktoo

ianktoo commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Bumped to 2.7.3 (commit d9916d0). 2.7.2 was already published from tag v2.7.2 on local commit 15ffb6f, which is not on master. v2.7.3 will be tagged on this PR's merge commit.

@ianktoo
ianktoo merged commit 045bb35 into master Sep 25, 2026
20 checks passed
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.

1 participant