Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MetadataOptions was invalid, must have been from a very old version.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API reference still lists it as valid, I'll open an issue
https://cloud.ibm.com/apidocs/natural-language-understanding?code=python#metadata

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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