Skip to content

Port 'Convert USFM versification' #369

Closed

Description

@Enkidu93

Port any relevant changes in sillsdev/machine#472 from machine to machine.py.

Activity

  1. added
    portingThis issue consists of porting code from machine to machine.py.
    on Sep 14, 2026
  2. moved this from 🆕 New to 🔖 Ready in Servalon Sep 17, 2026
  3. Enkidu93 commented on Sep 29, 2026

    @Enkidu93
    CollaboratorAuthor

    @claude Please put in a PR to address this porting issue. Also, port the changes in #382 in the same PR.

  4. claude commented on Sep 29, 2026

    @claude
    Contributor

    Claude finished @Enkidu93's task in 17s —— View job


    Blocked: can't read the source PR or issue #382

    I haven't made any changes or opened a PR.

    To port this I need the diff of sillsdev/machine#472 and the body of #382. Both reads were denied in this run:

    I didn't want to guess at the C# changes or at what #382 asks for. A guessed port of USFM versification handling could ship defects.

    To unblock, either:

    1. Add gh pr view, gh pr diff and gh issue view (and WebFetch for github.com) to --allowedTools, then re-mention me. Or:
    2. Paste the #472 diff summary and the Port 'Fix double mappings handling and expand trailing paragraph marker definition' #382 description into a comment.

    Once I can read them, I'll follow the port-pr steps. That means porting the relevant changes and tests and running ./local_check.sh --agent-strict. Then I'll push the branch and give you a prefilled PR link.
    · Branch: claude/issue-369-20260929-2053

  5. Enkidu93 commented on Sep 29, 2026

    @Enkidu93
    CollaboratorAuthor

    @ddaspit - would it be possible to update claude's permissions to enable it to do this sort of thing?

  6. ddaspit commented on Sep 29, 2026

    @ddaspit
    Contributor

    Yes. I'm currently working on the code review action, which is busy spamming poor Peter with duplicate comments on his PR. I will try to update the other action as well.

  7. Enkidu93 commented on Sep 30, 2026

    @Enkidu93
    CollaboratorAuthor

    @claude You should have the necessary permissions now to do as I requested above.

  8. claude commented on Sep 30, 2026

    @claude
    Contributor

    Claude finished @Enkidu93's task in 7m 24s —— View job


    Port done and committed locally, but the push was denied

    The port is committed on claude/issue-369-20260930-1927. git push failed with 403: Permission to sillsdev/machine.py.git denied to github-actions[bot]. The branch is not on the remote, so I have not opened a PR. I did not try another way around the push.

    What the commit contains (ports machine#472 and machine#521, the PR behind #382):

    • New handler: machine/corpora/convert_usfm_versification_handler.py adds ConvertUsfmVersificationHandler. It includes the #521 fixes for duplicate mappings and trailing paragraph markers. It is exported from machine.corpora.
    • Updater: ParatextProjectTextUpdaterBase.update_usfm now converts the USFM to the rows' versification before applying the update. It does this only when the rows' versification differs from the project's.
    • Helper: get_rows_versification is a new module-level function in update_usfm_parser_handler.py, the counterpart of the C# GetRowsVersification.
    • Tests:
      • tests/corpora/test_convert_usfm_versification_handler.py holds all 25 C# tests, including the #521 additions.
      • tests/corpora/test_update_usfm_parser_handler.py gains one updater-level test.
    • Test default changed: DefaultParatextProjectSettings in the test utils now defaults to English instead of Original. ScriptureRef defaults to English. With the old default, the new conversion step ran in existing update tests and broke 8 of them.

    Validation: ./local_check.sh --agent-strict ended with 873 passed, 3 skipped. That is a local run, not CI.

    To finish: grant push permission to the workflow's token, or pull the commit from the job's checkout, then re-mention me. I'll push and open the PR with Closes #369 and Closes #382.
    · Branch claude/issue-369-20260930-1927 (local only)

  9. ddaspit commented on Oct 1, 2026

    @ddaspit
    Contributor

    @claude Try again. You should be able to push now.

  10. claude commented on Oct 1, 2026

    @claude
    Contributor

    Claude finished @ddaspit's task in 5m 9s —— View job • claude/issue-369-20261001-1520 • [Create PR ➔](https://github.com/sillsdev/machine.py/compare/main...claude/issue-369-20261001-1520?quick_pull=1&title=Issue%20%23369%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23369%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Port pushed and PR opened

    PR: #390 (closes #369 and #382)

    The earlier commit wasn't on this branch, so I redid the port. It covers machine#472 and machine#521.

    • Port ConvertUsfmVersificationHandler, including the #521 fixes for duplicate verses, dropped-verse markers and trailing paragraph markers. It is exported from machine.corpora.
    • update_usfm converts to the rows' versification when it differs from the project's. This uses the new get_rows_versification helper.
    • Tests: all 25 C# handler tests, plus one updater-level test.
    • DefaultParatextProjectSettings in the test utils now defaults to English versification. With the old default, 8 existing update tests ran the new conversion and failed.
    • ./local_check.sh --agent-strict: 873 passed, 3 skipped. This was a local run, not CI.
      · Branch claude/issue-369-20261001-1520
  11. added 2 commits that reference this issue on Oct 1, 2026
    d658c35
    def7511
  12. added a commit that references this issue on Oct 7, 2026
    41aa91e
  13. self-assigned this
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

portingThis issue consists of porting code from machine to machine.py.

Type

No type

Projects

  • Status
    ✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions