Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Fix bulk fill for usage #196

Closed

Conversation

spolcyn
Copy link

@spolcyn spolcyn commented Nov 7, 2021

Previously, if there existed any notes in the target deck that didn't
have one of the hanzi fields, the get_hanzi step would fail as a
result of cleanup raising a ValueError if it received text=None.

This PR modifies the logic so that presence of a hanzi field is
verified before getting the hanzi itself.

It also modifies the behavior such that cards that do not have usages
filled are marked as failed. Otherwise, the user doesn't know why many
cards did not have usages filled.

Relevant to #177.

Testing Strategy: All unittest tests pass

Previously, if there existed any notes in the target deck that didn't
have one of the hanzi fields, the `get_hanzi` step would fail as a
result of `cleanup` raising a `ValueError` if it received `text=None`.

This PR modifies the logic so that presence of a `hanzi` field is
verified before getting the `hanzi` itself.

It also modifies the behavior such that cards that do not have usages
filled are marked as failed. Otherwise, the user doesn't know why many
cards did not have usages filled.

Relevant to jdlorimer#177.
@spolcyn spolcyn mentioned this pull request Nov 7, 2021
@spolcyn spolcyn closed this Jul 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant