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

Bug fixes for custom dictionaries #60

Merged
merged 6 commits into from
Sep 22, 2022
Merged

Conversation

chrisbrickhouse
Copy link
Collaborator

@chrisbrickhouse chrisbrickhouse commented Aug 19, 2022

  • Introduces tests for cmudictionary.py which resolves TypeError due to accidental overwrite of internal dictionary #59 and uncovered a previously unknown bug (now fixed; described in 6578a09 commit message).
  • Absent plans for new features, the next release will likely be bug fixes so bump the version number to 2.0.2-dev while we collect fixes.
  • Upgrade dependencies in poetry.lock
  • Expand authorship info in pyproject.toml partly to prep for future debian packaging
  • Improve documentation for end users in 6578a09

@chrisbrickhouse chrisbrickhouse mentioned this pull request Aug 19, 2022
chrisbrickhouse and others added 5 commits August 22, 2022 22:09
Update documentation for FAVE 2:
 * Include warning for old users on reading migration guide.
 * Write migration guide with FAQ
 * Simplify TOC code
 * Add index.rst for code and usage sections of docs
 * Add sphinx-project module into conf to make doc updates easier
This commit adds some testing for the cmudictionary.py module.

In testing cmudictionary.CMU_Dictionary.add_dictionary_entries()
a bug was uncovered in .check_transcription() which caused the
output file to have more spaces than necessary. The cause was that
function did not split the phone string when it was supposed to.
This commit fixes the error and includes the test to prevent regression.
An error in cmudictionary.py caused add_dict to be overwritten and
change type when a transcribed word was not in the cmu dictionary and
had not yet been added to the output dictionary. This led to an obvious
type error and a not obvious failure to add custom dictionaries. This
commit fixes the issue by adding the given word as a key to add_dict
and adds a test to prevent regressions.

Resolves JoFrhwld#59
commit 6bc72a4
Author: Christian Brickhouse <brickhouse@stanford.edu>
Date:   Wed Aug 17 23:10:36 2022 -0700

    Update deps, expand author info in toml

commit 694ba50
Author: Christian Brickhouse <brickhouse@stanford.edu>
Date:   Wed Aug 17 23:09:34 2022 -0700

    Bump version to 2.0.2-dev

commit 716f95e
Author: Christian Brickhouse <brickhouse@stanforf.edu>
Date:   Wed Aug 17 22:43:25 2022 -0700

    Fix unintended overwrite of add_dict

    An error in cmudictionary.py caused add_dict to be overwritten and
    change type when a transcribed word was not in the cmu dictionary and
    had not yet been added to the output dictionary. This led to an obvious
    type error and a not obvious failure to add custom dictionaries. This
    commit fixes the issue by adding the given word as a key to add_dict
    and adds a test to prevent regressions.

    Resolves JoFrhwld#59

commit 40503a6
Author: Christian Brickhouse <brickhouse@stanforf.edu>
Date:   Wed Aug 17 22:31:34 2022 -0700

    Add cmu_dict... test and fix write error

    This commit adds some testing for the cmudictionary.py module.

    In testing cmudictionary.CMU_Dictionary.add_dictionary_entries()
    a bug was uncovered in .check_transcription() which caused the
    output file to have more spaces than necessary. The cause was that
    function did not split the phone string when it was supposed to.
    This commit fixes the error and includes the test to prevent regression.
@chrisbrickhouse
Copy link
Collaborator Author

Apologies for the force-push, only way to make the history sane on my main branch. Updated the description to account for hash changes and include the doc update

@chrisbrickhouse chrisbrickhouse changed the title Fix and test dictionary bugs, begin 2.0.2 dev cycle Bug fixes for custom dictionaries Aug 26, 2022
@chrisbrickhouse chrisbrickhouse mentioned this pull request Aug 26, 2022
13 tasks
@JoFrhwld JoFrhwld merged commit 1595a84 into JoFrhwld:dev Sep 22, 2022
@chrisbrickhouse chrisbrickhouse added this to the Version 2.1 milestone Sep 23, 2022
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