Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWI-5462 Update SDK Based on Recent Spec Changes #205

Merged
merged 31 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
232d99f
Generate SDK with OpenAPI Generator Version 7.4.0
DX-Bandwidth Jun 14, 2024
b7ccf07
update workflows
ckoegel Jun 14, 2024
135c3c3
fix wf
ckoegel Jun 14, 2024
3a4f6fc
try one test
ckoegel Jun 14, 2024
580d006
copy them all
ckoegel Jun 14, 2024
158846e
remove all but init
ckoegel Jun 14, 2024
a5bb00f
now remove the init
ckoegel Jun 14, 2024
b2f520a
bring it back
ckoegel Jun 14, 2024
1225b47
move bxml
ckoegel Jun 14, 2024
76c5b83
move smoke
ckoegel Jun 14, 2024
a0d1a86
clean up spaces
ckoegel Jun 14, 2024
8aecfd4
update tests
ckoegel Jun 17, 2024
2717248
fix completedTime to be date-time
ckoegel Jun 17, 2024
50fe304
include_optional
ckoegel Jun 17, 2024
96a46a7
update spec
ckoegel Jun 17, 2024
d8c66ea
unit tests
ckoegel Jun 17, 2024
22abdcf
more unit tests
ckoegel Jun 17, 2024
765ca26
unit tessssssssts
ckoegel Jun 17, 2024
249e919
final model unit tests
ckoegel Jun 17, 2024
a32ac7b
move api unit tests
ckoegel Jun 17, 2024
a684bf3
SWI-4279 Fix BXML Library Anti Pattern (#206)
ckoegel Jun 18, 2024
cf4a633
SWI-5462 Add Real Time Transcriptions Tests (#207)
ckoegel Jun 18, 2024
70340d6
fix tests hopefully
ckoegel Jun 20, 2024
22dcca8
SWI-5457 Prism Unit Tests (#209)
ckoegel Jun 20, 2024
5972a9f
only test models for now
ckoegel Jun 20, 2024
41797af
SWI-5462 Update to Generator v7.6.0 (#210)
ckoegel Jul 1, 2024
993d295
SWI-5545 Update Transcription Model (#214)
ckoegel Jul 2, 2024
add1133
unit test everything on PR
ckoegel Jul 2, 2024
f8e6a0b
Merge branch 'SWI-5462' of https://github.com/Bandwidth/python-sdk in…
ckoegel Jul 2, 2024
e7c81bc
small test updates
ckoegel Jul 2, 2024
499b063
bash shell
ckoegel Jul 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 7 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
BW_NUMBER_PROVIDER: ${{ secrets.BW_NUMBER_PROVIDER }}
steps:
- name: Set Release Version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
Expand All @@ -57,7 +56,9 @@ jobs:

- name: Test
run: |
pytest -v
npm install -g @stoplight/prism-cli
prism mock ./bandwidth.yml & pytest -v ./test/unit


- name: Deploy to PYPI
run: |
Expand All @@ -68,7 +69,7 @@ jobs:
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

- uses: Bandwidth/build-notify-slack-action@v2.0.0
if: always()
with:
Expand Down Expand Up @@ -100,7 +101,6 @@ jobs:
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
BW_NUMBER_PROVIDER: ${{ secrets.BW_NUMBER_PROVIDER }}
steps:
- name: Set Release Version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
Expand All @@ -125,7 +125,9 @@ jobs:

- name: Test
run: |-
pytest -v
npm install -g @stoplight/prism-cli
prism mock ./bandwidth.yml & pytest -v ./test/unit
shell: bash

- name: Deploy to PYPI
run: |
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Test PR

on:
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }}
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }}
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
BW_NUMBER: ${{ secrets.BW_NUMBER }}
USER_NUMBER: ${{ secrets.USER_NUMBER }}
VZW_NUMBER: ${{ secrets.VZW_NUMBER }}
ATT_NUMBER: ${{ secrets.ATT_NUMBER }}
T_MOBILE_NUMBER: ${{ secrets.T_MOBILE_NUMBER }}
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }}
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}

jobs:
test:
name: Test PR
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022, windows-2019, ubuntu-20.04, ubuntu-latest]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
fail-fast: false
env:
PYTHON_VERSION: ${{ matrix.python-version }}
OPERATING_SYSTEM: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Install Packages
run: |
pip install -r requirements.txt
pip install -r test-requirements.txt

- name: Test at Warning Level
run: |
echo "Log level: WARNING"
npm install -g @stoplight/prism-cli
prism mock ./bandwidth.yml & pytest -v --log-cli-level=WARNING ./test/unit
shell: bash
92 changes: 92 additions & 0 deletions .github/workflows/test-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Smoke Tests

on:
schedule:
- cron: "0 4 * * *"
workflow_dispatch:
inputs:
logLevel:
description: Log level
required: false
default: WARNING
type: choice
options:
- WARNING
- DEBUG
pull_request:
branches:
- main
paths:
- 'test/smoke/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }}
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }}
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
BW_NUMBER: ${{ secrets.BW_NUMBER }}
USER_NUMBER: ${{ secrets.USER_NUMBER }}
VZW_NUMBER: ${{ secrets.VZW_NUMBER }}
ATT_NUMBER: ${{ secrets.ATT_NUMBER }}
T_MOBILE_NUMBER: ${{ secrets.T_MOBILE_NUMBER }}
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }}
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}

jobs:
test:
name: Smoke Test
runs-on: ubuntu-latest
env:
PYTHON_VERSION: '3.12'
OPERATING_SYSTEM: ubuntu

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Packages
run: |
pip install -r requirements.txt
pip install -r test-requirements.txt

- name: Test at Debug Level
if: ${{ inputs.logLevel == 'DEBUG' }}
run: |
echo "Log level: DEBUG"
pytest -v --log-cli-level=DEBUG
shell: bash

- name: Test at Warning Level
if: ${{( inputs.logLevel == null) || ( inputs.logLevel == 'WARNING') }}
run: |
echo "Log level: WARNING"
pytest -v --log-cli-level=WARNING ./test/smoke
shell: bash

notify_for_failures:
name: Notify for Failures
needs: [test]
if: failure()
runs-on: ubuntu-latest
steps:
- name: Notify Slack of Failures
uses: Bandwidth/build-notify-slack-action@v2.0.0
with:
job-status: failure
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel: ${{ secrets.SLACK_CHANNEL }}
92 changes: 0 additions & 92 deletions .github/workflows/test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ __pycache__/
# C extensions
*.so

# MacOS Files
# MacOS Files
.DS_Store

# Distribution / packaging
Expand Down
22 changes: 16 additions & 6 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ bandwidth/api/mfa_api.py
bandwidth/api/phone_number_lookup_api.py
bandwidth/api/recordings_api.py
bandwidth/api/statistics_api.py
bandwidth/api/transcriptions_api.py
bandwidth/api_client.py
bandwidth/api_response.py
bandwidth/configuration.py
Expand All @@ -24,6 +25,11 @@ bandwidth/models/call_direction_enum.py
bandwidth/models/call_recording_metadata.py
bandwidth/models/call_state.py
bandwidth/models/call_state_enum.py
bandwidth/models/call_transcription.py
bandwidth/models/call_transcription_detected_language_enum.py
bandwidth/models/call_transcription_metadata.py
bandwidth/models/call_transcription_response.py
bandwidth/models/call_transcription_track_enum.py
bandwidth/models/callback_method_enum.py
bandwidth/models/code_request.py
bandwidth/models/conference.py
Expand Down Expand Up @@ -83,6 +89,8 @@ bandwidth/models/priority_enum.py
bandwidth/models/recording_available_callback.py
bandwidth/models/recording_complete_callback.py
bandwidth/models/recording_state_enum.py
bandwidth/models/recording_transcription_metadata.py
bandwidth/models/recording_transcriptions.py
bandwidth/models/redirect_callback.py
bandwidth/models/redirect_method_enum.py
bandwidth/models/stir_shaken.py
Expand All @@ -91,8 +99,6 @@ bandwidth/models/tn_lookup_request_error.py
bandwidth/models/transcribe_recording.py
bandwidth/models/transcription.py
bandwidth/models/transcription_available_callback.py
bandwidth/models/transcription_list.py
bandwidth/models/transcription_metadata.py
bandwidth/models/transfer_answer_callback.py
bandwidth/models/transfer_complete_callback.py
bandwidth/models/transfer_disconnect_callback.py
Expand All @@ -114,6 +120,11 @@ docs/CallDirectionEnum.md
docs/CallRecordingMetadata.md
docs/CallState.md
docs/CallStateEnum.md
docs/CallTranscription.md
docs/CallTranscriptionDetectedLanguageEnum.md
docs/CallTranscriptionMetadata.md
docs/CallTranscriptionResponse.md
docs/CallTranscriptionTrackEnum.md
docs/CallbackMethodEnum.md
docs/CallsApi.md
docs/CodeRequest.md
Expand Down Expand Up @@ -179,6 +190,8 @@ docs/PriorityEnum.md
docs/RecordingAvailableCallback.md
docs/RecordingCompleteCallback.md
docs/RecordingStateEnum.md
docs/RecordingTranscriptionMetadata.md
docs/RecordingTranscriptions.md
docs/RecordingsApi.md
docs/RedirectCallback.md
docs/RedirectMethodEnum.md
Expand All @@ -189,8 +202,7 @@ docs/TnLookupRequestError.md
docs/TranscribeRecording.md
docs/Transcription.md
docs/TranscriptionAvailableCallback.md
docs/TranscriptionList.md
docs/TranscriptionMetadata.md
docs/TranscriptionsApi.md
docs/TransferAnswerCallback.md
docs/TransferCompleteCallback.md
docs/TransferDisconnectCallback.md
Expand All @@ -204,7 +216,5 @@ docs/VoiceApiError.md
docs/VoiceCodeResponse.md
git_push.sh
pyproject.toml
requirements.txt
setup.py
test-requirements.txt
tox.ini
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.0
7.7.0
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
License:
License:
========
The MIT License (MIT)
http://opensource.org/licenses/MIT
Expand All @@ -25,4 +25,4 @@ THE SOFTWARE.

Trade Mark:
==========
APIMATIC is a trade mark for APIMATIC Limited
APIMATIC is a trade mark for APIMATIC Limited
Loading