Skip to content

Commit

Permalink
Remove invalid import from Watson NLU tests (#173)
Browse files Browse the repository at this point in the history
* Remove invalid MetadataOptions import

* Update the release procedure to enable Watson NLU api tests
  • Loading branch information
BryanCutler committed Feb 1, 2021
1 parent 9b13e73 commit cb821c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Steps to release a new version:
and Pandas. The current versions are:
* Python: 3.6, 3.7, 3.8
* Pandas: 1.0.x, 1.1.x

1. Ensure Watson NLU service API tests are enabled and passing by setting
IBM_API_KEY and IBM_SERVICE_URL, then running unit tests with pytest.

1. Activate your Text Extensions for Pandas build environment (usually called
`pd`)
Expand Down
8 changes: 4 additions & 4 deletions text_extensions_for_pandas/io/watson/test_nlu.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,9 @@ def setUpClass(cls):
def _make_request():
from ibm_watson import NaturalLanguageUnderstandingV1
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
from ibm_watson.natural_language_understanding_v1 import Features, CategoriesOptions, ConceptsOptions, EmotionOptions, EntitiesOptions, KeywordsOptions, \
MetadataOptions, RelationsOptions, SemanticRolesOptions, SentimentOptions, SyntaxOptions, SyntaxOptionsTokens
from ibm_watson.natural_language_understanding_v1 import Features, CategoriesOptions, ConceptsOptions, \
EmotionOptions, EntitiesOptions, KeywordsOptions, RelationsOptions, SemanticRolesOptions, \
SentimentOptions, SyntaxOptions, SyntaxOptionsTokens

# Retrieve the APIKEY for authentication
apikey = os.environ.get("IBM_API_KEY")
Expand Down Expand Up @@ -454,8 +455,7 @@ def _make_request():
#concepts=ConceptsOptions(limit=3),
#emotion=EmotionOptions(targets=['grail']),
entities=EntitiesOptions(sentiment=True),
keywords=KeywordsOptions(sentiment=True,emotion=True),
#metadata=MetadataOptions(),
keywords=KeywordsOptions(sentiment=True, emotion=True),
relations=RelationsOptions(),
semantic_roles=SemanticRolesOptions(),
#sentiment=SentimentOptions(targets=['Arthur']),
Expand Down

0 comments on commit cb821c2

Please sign in to comment.