Skip to content

Fix raw-HTML pattern in README parsing - #1359

Open
EpicWink wants to merge 3 commits into
scrapinghub:masterfrom
EpicWink:readme-metadata-pattern
Open

Fix raw-HTML pattern in README parsing#1359
EpicWink wants to merge 3 commits into
scrapinghub:masterfrom
EpicWink:readme-metadata-pattern

Conversation

@EpicWink

@EpicWink EpicWink commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Fixes the issue introduced by #1311 where all of the README's contents are not in the published package's long-description.

Also explicitly specify README as RST.

Explanation:

  • Removing s flag - so dots . don't match newlines. This made the capturing group too greedy
  • Making the group's quantifier * not greedy, so the matched text ends as soon as the rest of the pattern can be satisfied
  • Specify end delimiter \n\n - this ends all RST blocks, so we match (and remove) that delimiter
  • Specifying RST as the content-type is good practice, even if PyPI assumes RST

Also explicitly specify README as RST
@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.10%. Comparing base (ff3dcb9) to head (51151c5).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1359   +/-   ##
=======================================
  Coverage   97.10%   97.10%           
=======================================
  Files         236      236           
  Lines        3008     3008           
=======================================
  Hits         2921     2921           
  Misses         87       87           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@EpicWink

EpicWink commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Failing build is due to mismatch between README and changelog (aka HISTORY) regarding section title underlines. There's two options to fix this:

  1. Add a new top-level section title to the README, with equal-sign = underlining 1. This would demote the heading levels of all current titles in the README
  2. Change the README's section titles' underlines to match HISTORY (ie top-level from hyphen - to equal-sign =, second-level from carat ^ to hyphen -)

Footnotes

  1. You could convert the new bold text in Specify README header content as RST #1360 to this heading

@AdrianAtZyte

Copy link
Copy Markdown
Contributor

I am fine with either.

@EpicWink

EpicWink commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

I chose the second option, to have the formatted README look the same

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