Skip to content

Commit

Permalink
Major release 2022 (#816)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
apaparazzi0329 authored Mar 21, 2022
1 parent 21399b7 commit 97de097
Show file tree
Hide file tree
Showing 66 changed files with 9,107 additions and 48,152 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8']
python-version: ['3.7', '3.8', '3.9']
os: [ubuntu-latest, windows-latest]
exclude:
- os: windows-latest
python-version: '3.6'
- os: windows-latest
python-version: '3.7'

Expand All @@ -47,13 +45,13 @@ jobs:
pip3 install -r requirements.txt --use-deprecated=legacy-resolver
pip3 install -r requirements-dev.txt --use-deprecated=legacy-resolver
pip3 install --editable . --use-deprecated=legacy-resolver
- name: Execute Python 3.6/3.7 unit tests
if: matrix.python-version != '3.8'
- name: Execute Python 3.7 unit tests
if: matrix.python-version == '3.7'
run: |
pip3 install -U python-dotenv
py.test test/unit
- name: Execute Python 3.8 unit tests (windows)
if: matrix.os == 'windows-latest'
if: matrix.python-version == '3.8' && matrix.os == 'windows-latest'
run: |
pip3 install -U python-dotenv
py.test test/unit --reruns 3
Expand All @@ -62,6 +60,16 @@ jobs:
run: |
pip3 install -U python-dotenv
py.test test/unit --reruns 3 --cov=ibm_watson
- name: Execute Python 3.9 unit tests (windows)
if: matrix.python-version == '3.9' && matrix.os == 'windows-latest'
run: |
pip3 install -U python-dotenv
py.test test/unit --reruns 3
- name: Execute Python 3.9 unit tests (ubuntu)
if: matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
run: |
pip3 install -U python-dotenv
py.test test/unit --reruns 3
- name: Upload coverage to Codecov
if: matrix.python-version == '3.8' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.9'

- name: Setup Node
uses: actions/setup-node@v1
Expand Down
143 changes: 62 additions & 81 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
name: Run Integration Tests

on:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand All @@ -16,91 +15,73 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8']
python-version: ["3.8"]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies (ubuntu)
run: |
pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt
pip3 install --editable .
- name: Install Python dependencies (ubuntu)
run: |
pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt
pip3 install --editable .
- name: Execute Python integration tests
# continue-on-error: true
env:
NATURAL_LANGUAGE_CLASSIFIER_URL: "https://api.us-south.natural-language-classifier.watson.cloud.ibm.com"
NATURAL_LANGUAGE_CLASSIFIER_APIKEY: ${{ secrets.NLC_APIKEY }}
LANGUAGE_TRANSLATOR_APIKEY: ${{ secrets.LT_APIKEY }}
LANGUAGE_TRANSLATOR_URL: "https://api.us-south.language-translator.watson.cloud.ibm.com"
NATURAL_LANGUAGE_UNDERSTANDING_APIKEY: ${{ secrets.NLU_APIKEY }}
NATURAL_LANGUAGE_UNDERSTANDING_URL: "https://api.us-south.natural-language-understanding.watson.cloud.ibm.com"
PERSONALITY_INSIGHTS_APIKEY: ${{ secrets.PI_APIKEY }}
PERSONALITY_INSIGHTS_URL: "https://api.us-south.personality-insights.watson.cloud.ibm.com"
TONE_ANALYZER_APIKEY: ${{ secrets.TA_APIKEY }}
TONE_ANALYZER_URL: "https://api.us-south.tone-analyzer.watson.cloud.ibm.com"
SPEECH_TO_TEXT_APIKEY: ${{ secrets.STT_APIKEY }}
SPEECH_TO_TEXT_URL: "https://api.us-south.speech-to-text.watson.cloud.ibm.com"
TEXT_TO_SPEECH_APIKEY: ${{ secrets.TTS_APIKEY }}
TEXT_TO_SPEECH_URL: "https://api.us-south.text-to-speech.watson.cloud.ibm.com"
VISUAL_RECOGNITION_APIKEY: ${{ secrets.VR_APIKEY }}
VISUAL_RECOGNITION_COLLECTION_ID: ${{ secrets.VR_COLLECTION_ID }}
VISUAL_RECOGNITION_URL: "https://api.us-south.visual-recognition.watson.cloud.ibm.com"
COMPARE_COMPLY_APIKEY: ${{ secrets.CC_APIKEY }}
COMPARE_COMPLY_FEEDBACK_ID: ${{ secrets.CC_FEEDBACK_ID }}
COMPARE_COMPLY_URL: "https://api.us-south.compare-comply.watson.cloud.ibm.com"
ASSISTANT_APIKEY: ${{ secrets.WA_APIKEY }}
ASSISTANT_WORKSPACE_ID: ${{ secrets.WA_WORKSPACE_ID }}
ASSISTANT_ASSISTANT_ID: ${{ secrets.WA_ASSISTANT_ID }}
ASSISTANT_URL: "https://api.us-south.assistant.watson.cloud.ibm.com"
DISCOVERY_APIKEY: ${{ secrets.D1_APIKEY }}
DISCOVERY_ENVIRONMENT_ID: ${{ secrets.D1_ENVIRONMENT_ID }}
DISCOVERY_COLLECTION_ID: ${{ secrets.D1_COLLECTION_ID }}
DISCOVERY_URL: "https://api.us-south.discovery.watson.cloud.ibm.com"
DISCOVERY_V2_APIKEY: ${{ secrets.D2_APIKEY }}
DISCOVERY_V2_PROJECT_ID: ${{ secrets.D2_PROJECT_ID }}
DISCOVERY_V2_COLLECTION_ID: ${{ secrets.D2_COLLECTION_ID }}
DISCOVERY_V2_URL: "https://api.us-south.discovery.watson.cloud.ibm.com"
run: |
pip3 install -U python-dotenv
pytest test/integration/test_assistant_v1.py -rap
echo -e "\n\033[0;35mSKIP: pytest test/integration/test_compare_comply_v1.py -rap"
pytest test/integration/test_discovery_v1.py -rap
pytest test/integration/test_discovery_v2.py -rap
pytest test/integration/test_language_translator_v3.py -rap
pytest test/integration/test_natural_language_classifier_v1.py -rap
pytest test/integration/test_natural_language_understanding_v1.py -rap
pytest test/integration/test_personality_insights_v3.py -rap
pytest test/integration/test_speech_to_text_v1.py -rap
pytest test/integration/test_text_to_speech_v1.py -rap
pytest test/integration/test_tone_analyzer_v3.py -rap
echo -e "\n\033[0;35mSKIP: pytest test/integration/test_visual_recognition_v3.py -rap"
echo -e "\n\033[0;35mSKIP: pytest test/integration/test_visual_recognition_v4.py -rap"
- name: Execute Python integration tests
# continue-on-error: true
env:
LANGUAGE_TRANSLATOR_APIKEY: ${{ secrets.LT_APIKEY }}
LANGUAGE_TRANSLATOR_URL: "https://api.us-south.language-translator.watson.cloud.ibm.com"
NATURAL_LANGUAGE_UNDERSTANDING_APIKEY: ${{ secrets.NLU_APIKEY }}
NATURAL_LANGUAGE_UNDERSTANDING_URL: "https://api.us-south.natural-language-understanding.watson.cloud.ibm.com"
SPEECH_TO_TEXT_APIKEY: ${{ secrets.STT_APIKEY }}
SPEECH_TO_TEXT_URL: "https://api.us-south.speech-to-text.watson.cloud.ibm.com"
TEXT_TO_SPEECH_APIKEY: ${{ secrets.TTS_APIKEY }}
TEXT_TO_SPEECH_URL: "https://api.us-south.text-to-speech.watson.cloud.ibm.com"
ASSISTANT_APIKEY: ${{ secrets.WA_APIKEY }}
ASSISTANT_WORKSPACE_ID: ${{ secrets.WA_WORKSPACE_ID }}
ASSISTANT_ASSISTANT_ID: ${{ secrets.WA_ASSISTANT_ID }}
ASSISTANT_URL: "https://api.us-south.assistant.watson.cloud.ibm.com"
DISCOVERY_APIKEY: ${{ secrets.D1_APIKEY }}
DISCOVERY_ENVIRONMENT_ID: ${{ secrets.D1_ENVIRONMENT_ID }}
DISCOVERY_COLLECTION_ID: ${{ secrets.D1_COLLECTION_ID }}
DISCOVERY_URL: "https://api.us-south.discovery.watson.cloud.ibm.com"
DISCOVERY_V2_APIKEY: ${{ secrets.D2_APIKEY }}
DISCOVERY_V2_PROJECT_ID: ${{ secrets.D2_PROJECT_ID }}
DISCOVERY_V2_COLLECTION_ID: ${{ secrets.D2_COLLECTION_ID }}
DISCOVERY_V2_URL: "https://api.us-south.discovery.watson.cloud.ibm.com"
run: |
pip3 install -U python-dotenv
pytest test/integration/test_assistant_v1.py -rap
pytest test/integration/test_discovery_v1.py -rap
pytest test/integration/test_discovery_v2.py -rap
pytest test/integration/test_language_translator_v3.py -rap
pytest test/integration/test_natural_language_understanding_v1.py -rap
pytest test/integration/test_speech_to_text_v1.py -rap
pytest test/integration/test_text_to_speech_v1.py -rap
# Do not notify on success. We will leave the code here just in case we decide to switch gears
- name: Notify slack on success
if: false # success()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: watson-e2e-tests
status: SUCCESS
color: good
# Do not notify on success. We will leave the code here just in case we decide to switch gears
- name: Notify slack on success
if: false # success()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: watson-e2e-tests
status: SUCCESS
color: good

- name: Notify slack on failure
if: false # failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: watson-e2e-tests
status: FAILED
color: danger
- name: Notify slack on failure
if: false # failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: watson-e2e-tests
status: FAILED
color: danger
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ test/__init__.py
.sfdx/tools/apex.db
.pytest_cache/

# ignore detect secrets files
# ignore pre-commit config file
.pre-commit-config.yaml
.secrets.baseline

.openapi-generator-ignore
.openapi-generator/
Loading

0 comments on commit 97de097

Please sign in to comment.