Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't parse books that aren't selected #460

Closed
johnml1135 opened this issue Aug 22, 2024 · 2 comments · Fixed by #467
Closed

Don't parse books that aren't selected #460

johnml1135 opened this issue Aug 22, 2024 · 2 comments · Fixed by #467
Assignees
Labels
sf_watching Scripture Forge should be updated when this is resolved or updated

Comments

@johnml1135
Copy link
Collaborator

johnml1135 commented Aug 22, 2024

The USFM parser shouldn't crash on non-selected books.

This should never happen:

  {
    "id": "789"
    "revision": 2,
    "engine": {
      "id": "xyz"
    },
    "trainOn": [
      {
        "corpus": {
          "id": "abc"
        },
        "scriptureRange": "MAT;MRK;LUK;JHN;ACT;ROM;1CO"
      }
    ],
    "pretranslate": [
      {
        "corpus": {
          "id": "123"
        },
        "scriptureRange": "2CO"
      }
    ],
    "step": 0,
    "message": "An error occurred while parsing the text 'XXB` in project 'MTR'. Verse: XXB 4:0, line: 88, column: 5, error: 'Stack empty.'",
    "state": "Faulted",
    "dateFinished": "2024-08-12T05:43:52.712Z",
    "options": {}
  },

Notice how the crash happened on XXB, even though XXB was never selected for the scriptureRange.

@johnml1135
Copy link
Collaborator Author

We should test this - one possible way is to have the parser always throw an exception - and to have a passing case where no books are selected and a failing where some books are selected.

@github-project-automation github-project-automation bot moved this to 🆕 New in Serval Aug 22, 2024
@Enkidu93 Enkidu93 moved this from 🆕 New to 🏗 In progress in Serval Aug 26, 2024
@Enkidu93
Copy link
Collaborator

Alright, I see what's happened here - looks like Damien's work was lost because of some concurrent PRs. I'll put in a fix asap.

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Serval Aug 28, 2024
@Nateowami Nateowami added the sf_watching Scripture Forge should be updated when this is resolved or updated label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sf_watching Scripture Forge should be updated when this is resolved or updated
Projects
Status: ✅ Done
3 participants