Skip to content

Commit cb821c2

Browse files
authored
Remove invalid import from Watson NLU tests (#173)
* Remove invalid MetadataOptions import * Update the release procedure to enable Watson NLU api tests
1 parent 9b13e73 commit cb821c2

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

docs/release.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Steps to release a new version:
77
and Pandas. The current versions are:
88
* Python: 3.6, 3.7, 3.8
99
* Pandas: 1.0.x, 1.1.x
10+
11+
1. Ensure Watson NLU service API tests are enabled and passing by setting
12+
IBM_API_KEY and IBM_SERVICE_URL, then running unit tests with pytest.
1013

1114
1. Activate your Text Extensions for Pandas build environment (usually called
1215
`pd`)

text_extensions_for_pandas/io/watson/test_nlu.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,9 @@ def setUpClass(cls):
424424
def _make_request():
425425
from ibm_watson import NaturalLanguageUnderstandingV1
426426
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
427-
from ibm_watson.natural_language_understanding_v1 import Features, CategoriesOptions, ConceptsOptions, EmotionOptions, EntitiesOptions, KeywordsOptions, \
428-
MetadataOptions, RelationsOptions, SemanticRolesOptions, SentimentOptions, SyntaxOptions, SyntaxOptionsTokens
427+
from ibm_watson.natural_language_understanding_v1 import Features, CategoriesOptions, ConceptsOptions, \
428+
EmotionOptions, EntitiesOptions, KeywordsOptions, RelationsOptions, SemanticRolesOptions, \
429+
SentimentOptions, SyntaxOptions, SyntaxOptionsTokens
429430

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

0 commit comments

Comments
 (0)