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

#11 Expose option of turning on/off negation behaviour through the API #15

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

woodthom2
Copy link
Contributor

Description

Question negation is language specific but not always wanted. This PR is to enable/disable it at the match_instruments endpoint in conjunction with the issue harmonydata/harmony#59 in the Python library.

To clarify, there are some rule based scripts here which turn "I like" into "I don't like" etc in English and a few other languages. This is hard coded and some users want to be able to turn it off. In this PR I added a switch at library level and also at API level which stops the functions in negator.py being called. This PR is to expose the switch as an option in the API.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Requires a documentation revision

Testing

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • test_negate_local.py

Test Configuration

  • Library version: 1.0.2
  • OS: Ubuntu
  • Toolchain: Python 3.11.0rc1

Checklist

  • My code follows the style guidelines of this project. I have applied a Linter (recommended: Pycharm's code formatter) to make my whitespace consistent with the rest of the project.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules - see harmonydata/harmony@9438896
  • I have checked my code and corrected any misspellings

@woodthom2 woodthom2 merged commit b4f92c6 into main Jan 13, 2025
1 check failed
@woodthom2 woodthom2 deleted the 11_toggle_negation branch January 13, 2025 14:35
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