Skip to content

Fix tag parsing bugs, and bring the project setup up to date - #92

Merged
timvink merged 1 commit into
masterfrom
fix_tag_parsing_and_maintenance
Sep 14, 2026
Merged

timvink merged 1 commit into
masterfrom
fix_tag_parsing_and_maintenance

Conversation

@timvink

@timvink timvink commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Bugs

Each fix has a regression test.

Two tags on one line crashed the build. The tag pattern matched its arguments greedily, so {{ read_csv('a.csv') }} and {{ read_csv('b.csv') }} became a single match that swallowed the text between the tags, and then failed to parse with SyntaxError: unmatched ')'.

An = inside an argument value raised a SyntaxError. parse_argkwarg() decided arg-versus-kwarg on any = in a segment, then split on every =. So read_csv('a=b.csv'), sep='=' and na_values=['a=1'] all failed. The same scanner tracked brackets and parentheses but not braces, so dtype={'a': 'str', 'b': 'int'} was split on its comma. Both now use one scanner that knows what is nested inside quotes, brackets, braces or parentheses.

convert_to_md_table() altered the DataFrame passed in. It escaped the columns in place before copying, so a mkdocs-macros-plugin user rendering the same DataFrame twice saw doubly escaped pipes in the second table.

Project setup

  • Deploy the documentation on every push to master. It was deployed by hand, and the live site had fallen behind the readers added in 4.0.0 — read_parquet, read_orc, read_xml, read_html, read_stata, read_sas, read_spss and read_hdf were all missing.
  • Upload coverage to Codecov again. The step tested env.USING_COVERAGE, which is set nowhere in the repository, so it never ran.
  • Move dev dependencies to [dependency-groups], which uv now expects, and drop the unused codecov package.
  • Add .codespellrc, which the codespell workflow already referred to.
  • Add the enabled option to schema.json, so editors stop flagging valid configuration.
  • Add CHANGELOG.md.
  • Update the Makefile and CONTRIBUTING.md, which still described tests/test_requirements.txt, pyflakes and setup.py.
  • Point the README's macros link at the hosted docs; the relative link 404s on GitHub and PyPI.

Version bumped to 4.0.1. Tests: 59 passing, 100% coverage.

🤖 Generated with Claude Code

https://claude.ai/code/session_017vTNbovqPphizF3v1UdhVW

Three bugs, each with a regression test:

- The tag pattern matched its arguments greedily, so two tags on the same
  line became one match that swallowed the text between them and then
  failed to parse. Match lazily instead.
- parse_argkwarg() decided arg-versus-kwarg on any '=' in a segment, and
  split on every '=' it found. An '=' inside a value raised a SyntaxError,
  as in read_csv('a=b.csv') or sep='='. It also tracked brackets and
  parentheses but not braces, so a dict argument with more than one key
  was split on its comma. Both now use one scanner that knows what is
  nested inside quotes, brackets, braces or parentheses.
- convert_to_md_table() escaped the columns of the DataFrame passed in
  before copying it, so a macros user rendering the same DataFrame twice
  got doubly escaped pipes the second time.

Project setup:

- Deploy the documentation on every push to master. It was deployed by
  hand and had fallen behind the readers added in 4.0.0.
- Upload coverage to Codecov again: the step tested env.USING_COVERAGE,
  which is set nowhere, so it never ran.
- Move dev dependencies to [dependency-groups], which uv now expects, and
  drop the unused codecov package.
- Add .codespellrc, which the codespell workflow already referred to.
- Add the 'enabled' option to schema.json, and a CHANGELOG.md.
- Update the Makefile and CONTRIBUTING.md, which still described
  test_requirements.txt, pyflakes and setup.py.
- Link to the hosted docs from the README, where a relative link 404s.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017vTNbovqPphizF3v1UdhVW
@timvink
timvink merged commit 7986e76 into master Sep 14, 2026
31 checks passed
@timvink
timvink deleted the fix_tag_parsing_and_maintenance branch September 14, 2026 12:25
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