Skip to content

Commit 97de097

Browse files
Major release 2022 (#816)
* feat(assistantv1): add three new response types and remove properties BREAKING CHANGE: OutputData: required text property removed, RuntimeEntity: optional metadata property removed RuntimeResponseGeneric: Three new response types added Workspace: workspaceID changed form required to optional * feat(assistantv2): add three new response types, rename model, remove properties BREAKING CHANGE: RuntimeEntity: optional metadata property removed, MessageOutputDebug: nodesVisited type DialogNodesVisited changed to DialogNodeVisited. MessageContext: integrations property added MessageContextGlobalSystem: skipUserInput property added MessageContextStateless: integrations property added MessageInput: attachments property added MessageInputStateless: attachments property added RuntimeResponseGeneric: Three new response types added * refactor(cc): remove compare and comply ヾ(・‿・) * refactor(nlc): remove nlc ヾ(・‿・) * feat(nlu): remove MetadataOptions model * refactor(lt): comment change and test updates * refactor(pi): remove personality insights ヾ(・‿・) * feat(stt/tts): add new property and comment changes * refactor(ta/visrec): remove ta and visrec ヾ(・‿・) * refactor(all): remove remaining traces of removed services * feat(assistantv1): add new dialogNode models and additional properties for Workspace * feat(discov1): update QueryAggregation subclasses BREAKING CHANGE: QueryAggregation: QueryAggregation subclasses changed. DocumentStatus: documentID, status, and statusDescription are now optional * feat(stt): change grammarFile property type BREAKING CHANGE: addGrammar parameter grammarFile changed from String to Data type SupportedFeatures: customAcousticModel property added * chore: copyright changes * build(secrets): upload detect-secrets baseline * docs(readme): add deprecation note and remove old references * ci(version): remove python 3.6 support and add 3.9 support
1 parent 21399b7 commit 97de097

File tree

66 files changed

+9107
-48152
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+9107
-48152
lines changed

.github/workflows/build-test.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ jobs:
2121
runs-on: ${{ matrix.os }}
2222
strategy:
2323
matrix:
24-
python-version: ['3.6', '3.7', '3.8']
24+
python-version: ['3.7', '3.8', '3.9']
2525
os: [ubuntu-latest, windows-latest]
2626
exclude:
27-
- os: windows-latest
28-
python-version: '3.6'
2927
- os: windows-latest
3028
python-version: '3.7'
3129

@@ -47,13 +45,13 @@ jobs:
4745
pip3 install -r requirements.txt --use-deprecated=legacy-resolver
4846
pip3 install -r requirements-dev.txt --use-deprecated=legacy-resolver
4947
pip3 install --editable . --use-deprecated=legacy-resolver
50-
- name: Execute Python 3.6/3.7 unit tests
51-
if: matrix.python-version != '3.8'
48+
- name: Execute Python 3.7 unit tests
49+
if: matrix.python-version == '3.7'
5250
run: |
5351
pip3 install -U python-dotenv
5452
py.test test/unit
5553
- name: Execute Python 3.8 unit tests (windows)
56-
if: matrix.os == 'windows-latest'
54+
if: matrix.python-version == '3.8' && matrix.os == 'windows-latest'
5755
run: |
5856
pip3 install -U python-dotenv
5957
py.test test/unit --reruns 3
@@ -62,6 +60,16 @@ jobs:
6260
run: |
6361
pip3 install -U python-dotenv
6462
py.test test/unit --reruns 3 --cov=ibm_watson
63+
- name: Execute Python 3.9 unit tests (windows)
64+
if: matrix.python-version == '3.9' && matrix.os == 'windows-latest'
65+
run: |
66+
pip3 install -U python-dotenv
67+
py.test test/unit --reruns 3
68+
- name: Execute Python 3.9 unit tests (ubuntu)
69+
if: matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
70+
run: |
71+
pip3 install -U python-dotenv
72+
py.test test/unit --reruns 3
6573
- name: Upload coverage to Codecov
6674
if: matrix.python-version == '3.8' && matrix.os == 'ubuntu-latest'
6775
uses: codecov/codecov-action@v1

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Set up Python
3030
uses: actions/setup-python@v2
3131
with:
32-
python-version: '3.8'
32+
python-version: '3.9'
3333

3434
- name: Setup Node
3535
uses: actions/setup-node@v1

.github/workflows/integration-test.yml

Lines changed: 62 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
name: Run Integration Tests
77

88
on:
9-
109
# Allows you to run this workflow manually from the Actions tab
1110
workflow_dispatch:
1211

@@ -16,91 +15,73 @@ jobs:
1615
runs-on: ${{ matrix.os }}
1716
strategy:
1817
matrix:
19-
python-version: ['3.8']
18+
python-version: ["3.8"]
2019
os: [ubuntu-latest]
2120

2221
steps:
23-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v2
2423

25-
- name: Set up Python
26-
uses: actions/setup-python@v2
27-
with:
28-
python-version: ${{ matrix.python-version }}
24+
- name: Set up Python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
2928

30-
- name: Install Python dependencies (ubuntu)
31-
run: |
32-
pip3 install -r requirements.txt
33-
pip3 install -r requirements-dev.txt
34-
pip3 install --editable .
29+
- name: Install Python dependencies (ubuntu)
30+
run: |
31+
pip3 install -r requirements.txt
32+
pip3 install -r requirements-dev.txt
33+
pip3 install --editable .
3534
36-
- name: Execute Python integration tests
37-
# continue-on-error: true
38-
env:
39-
NATURAL_LANGUAGE_CLASSIFIER_URL: "https://api.us-south.natural-language-classifier.watson.cloud.ibm.com"
40-
NATURAL_LANGUAGE_CLASSIFIER_APIKEY: ${{ secrets.NLC_APIKEY }}
41-
LANGUAGE_TRANSLATOR_APIKEY: ${{ secrets.LT_APIKEY }}
42-
LANGUAGE_TRANSLATOR_URL: "https://api.us-south.language-translator.watson.cloud.ibm.com"
43-
NATURAL_LANGUAGE_UNDERSTANDING_APIKEY: ${{ secrets.NLU_APIKEY }}
44-
NATURAL_LANGUAGE_UNDERSTANDING_URL: "https://api.us-south.natural-language-understanding.watson.cloud.ibm.com"
45-
PERSONALITY_INSIGHTS_APIKEY: ${{ secrets.PI_APIKEY }}
46-
PERSONALITY_INSIGHTS_URL: "https://api.us-south.personality-insights.watson.cloud.ibm.com"
47-
TONE_ANALYZER_APIKEY: ${{ secrets.TA_APIKEY }}
48-
TONE_ANALYZER_URL: "https://api.us-south.tone-analyzer.watson.cloud.ibm.com"
49-
SPEECH_TO_TEXT_APIKEY: ${{ secrets.STT_APIKEY }}
50-
SPEECH_TO_TEXT_URL: "https://api.us-south.speech-to-text.watson.cloud.ibm.com"
51-
TEXT_TO_SPEECH_APIKEY: ${{ secrets.TTS_APIKEY }}
52-
TEXT_TO_SPEECH_URL: "https://api.us-south.text-to-speech.watson.cloud.ibm.com"
53-
VISUAL_RECOGNITION_APIKEY: ${{ secrets.VR_APIKEY }}
54-
VISUAL_RECOGNITION_COLLECTION_ID: ${{ secrets.VR_COLLECTION_ID }}
55-
VISUAL_RECOGNITION_URL: "https://api.us-south.visual-recognition.watson.cloud.ibm.com"
56-
COMPARE_COMPLY_APIKEY: ${{ secrets.CC_APIKEY }}
57-
COMPARE_COMPLY_FEEDBACK_ID: ${{ secrets.CC_FEEDBACK_ID }}
58-
COMPARE_COMPLY_URL: "https://api.us-south.compare-comply.watson.cloud.ibm.com"
59-
ASSISTANT_APIKEY: ${{ secrets.WA_APIKEY }}
60-
ASSISTANT_WORKSPACE_ID: ${{ secrets.WA_WORKSPACE_ID }}
61-
ASSISTANT_ASSISTANT_ID: ${{ secrets.WA_ASSISTANT_ID }}
62-
ASSISTANT_URL: "https://api.us-south.assistant.watson.cloud.ibm.com"
63-
DISCOVERY_APIKEY: ${{ secrets.D1_APIKEY }}
64-
DISCOVERY_ENVIRONMENT_ID: ${{ secrets.D1_ENVIRONMENT_ID }}
65-
DISCOVERY_COLLECTION_ID: ${{ secrets.D1_COLLECTION_ID }}
66-
DISCOVERY_URL: "https://api.us-south.discovery.watson.cloud.ibm.com"
67-
DISCOVERY_V2_APIKEY: ${{ secrets.D2_APIKEY }}
68-
DISCOVERY_V2_PROJECT_ID: ${{ secrets.D2_PROJECT_ID }}
69-
DISCOVERY_V2_COLLECTION_ID: ${{ secrets.D2_COLLECTION_ID }}
70-
DISCOVERY_V2_URL: "https://api.us-south.discovery.watson.cloud.ibm.com"
71-
run: |
72-
pip3 install -U python-dotenv
73-
pytest test/integration/test_assistant_v1.py -rap
74-
echo -e "\n\033[0;35mSKIP: pytest test/integration/test_compare_comply_v1.py -rap"
75-
pytest test/integration/test_discovery_v1.py -rap
76-
pytest test/integration/test_discovery_v2.py -rap
77-
pytest test/integration/test_language_translator_v3.py -rap
78-
pytest test/integration/test_natural_language_classifier_v1.py -rap
79-
pytest test/integration/test_natural_language_understanding_v1.py -rap
80-
pytest test/integration/test_personality_insights_v3.py -rap
81-
pytest test/integration/test_speech_to_text_v1.py -rap
82-
pytest test/integration/test_text_to_speech_v1.py -rap
83-
pytest test/integration/test_tone_analyzer_v3.py -rap
84-
echo -e "\n\033[0;35mSKIP: pytest test/integration/test_visual_recognition_v3.py -rap"
85-
echo -e "\n\033[0;35mSKIP: pytest test/integration/test_visual_recognition_v4.py -rap"
35+
- name: Execute Python integration tests
36+
# continue-on-error: true
37+
env:
38+
LANGUAGE_TRANSLATOR_APIKEY: ${{ secrets.LT_APIKEY }}
39+
LANGUAGE_TRANSLATOR_URL: "https://api.us-south.language-translator.watson.cloud.ibm.com"
40+
NATURAL_LANGUAGE_UNDERSTANDING_APIKEY: ${{ secrets.NLU_APIKEY }}
41+
NATURAL_LANGUAGE_UNDERSTANDING_URL: "https://api.us-south.natural-language-understanding.watson.cloud.ibm.com"
42+
SPEECH_TO_TEXT_APIKEY: ${{ secrets.STT_APIKEY }}
43+
SPEECH_TO_TEXT_URL: "https://api.us-south.speech-to-text.watson.cloud.ibm.com"
44+
TEXT_TO_SPEECH_APIKEY: ${{ secrets.TTS_APIKEY }}
45+
TEXT_TO_SPEECH_URL: "https://api.us-south.text-to-speech.watson.cloud.ibm.com"
46+
ASSISTANT_APIKEY: ${{ secrets.WA_APIKEY }}
47+
ASSISTANT_WORKSPACE_ID: ${{ secrets.WA_WORKSPACE_ID }}
48+
ASSISTANT_ASSISTANT_ID: ${{ secrets.WA_ASSISTANT_ID }}
49+
ASSISTANT_URL: "https://api.us-south.assistant.watson.cloud.ibm.com"
50+
DISCOVERY_APIKEY: ${{ secrets.D1_APIKEY }}
51+
DISCOVERY_ENVIRONMENT_ID: ${{ secrets.D1_ENVIRONMENT_ID }}
52+
DISCOVERY_COLLECTION_ID: ${{ secrets.D1_COLLECTION_ID }}
53+
DISCOVERY_URL: "https://api.us-south.discovery.watson.cloud.ibm.com"
54+
DISCOVERY_V2_APIKEY: ${{ secrets.D2_APIKEY }}
55+
DISCOVERY_V2_PROJECT_ID: ${{ secrets.D2_PROJECT_ID }}
56+
DISCOVERY_V2_COLLECTION_ID: ${{ secrets.D2_COLLECTION_ID }}
57+
DISCOVERY_V2_URL: "https://api.us-south.discovery.watson.cloud.ibm.com"
58+
run: |
59+
pip3 install -U python-dotenv
60+
pytest test/integration/test_assistant_v1.py -rap
61+
pytest test/integration/test_discovery_v1.py -rap
62+
pytest test/integration/test_discovery_v2.py -rap
63+
pytest test/integration/test_language_translator_v3.py -rap
64+
pytest test/integration/test_natural_language_understanding_v1.py -rap
65+
pytest test/integration/test_speech_to_text_v1.py -rap
66+
pytest test/integration/test_text_to_speech_v1.py -rap
8667
87-
# Do not notify on success. We will leave the code here just in case we decide to switch gears
88-
- name: Notify slack on success
89-
if: false # success()
90-
env:
91-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
92-
uses: voxmedia/github-action-slack-notify-build@v1
93-
with:
94-
channel: watson-e2e-tests
95-
status: SUCCESS
96-
color: good
68+
# Do not notify on success. We will leave the code here just in case we decide to switch gears
69+
- name: Notify slack on success
70+
if: false # success()
71+
env:
72+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
73+
uses: voxmedia/github-action-slack-notify-build@v1
74+
with:
75+
channel: watson-e2e-tests
76+
status: SUCCESS
77+
color: good
9778

98-
- name: Notify slack on failure
99-
if: false # failure()
100-
env:
101-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
102-
uses: voxmedia/github-action-slack-notify-build@v1
103-
with:
104-
channel: watson-e2e-tests
105-
status: FAILED
106-
color: danger
79+
- name: Notify slack on failure
80+
if: false # failure()
81+
env:
82+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
83+
uses: voxmedia/github-action-slack-notify-build@v1
84+
with:
85+
channel: watson-e2e-tests
86+
status: FAILED
87+
color: danger

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ test/__init__.py
6767
.sfdx/tools/apex.db
6868
.pytest_cache/
6969

70-
# ignore detect secrets files
70+
# ignore pre-commit config file
7171
.pre-commit-config.yaml
72-
.secrets.baseline
7372

7473
.openapi-generator-ignore
7574
.openapi-generator/

0 commit comments

Comments
 (0)