8000 Axsuarez/qna model fix (#868) · rusty0209/botbuilder-python@2f29292 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2f29292

Browse files
authored
Axsuarez/qna model fix (microsoft#868)
1 parent 3a22db5 commit 2f29292

File tree

3 files changed

+18
-20
lines changed

3 files changed

+18
-20
lines changed

libraries/botbuilder-ai/botbuilder/ai/qna/models/query_result.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,7 @@ def __init__(
5656
self.score = score
5757
self.metadata = list(map(lambda meta: Metadata(**meta), metadata))
5858
self.source = source
59-
self.context = QnAResponseContext(**context) if context is not None else None
59+
self.context = (
60+
QnAResponseContext().from_dict(context) if context is not None else None
61+
)
6062
self.id = id # pylint: disable=invalid-name

ci-pr-pipeline.yml renamed to pipelines/botbuilder-python-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ variables:
99
python.36: 3.6.10
1010
python.37: 3.7.6
1111
python.38: 3.8.2
12-
12+
# PythonCoverallsToken: get this from Azure
1313

1414
jobs:
1515
# Build and publish container
@@ -80,7 +80,7 @@ jobs:
8080
- script: 'pylint --rcfile=.pylintrc libraries'
8181
displayName: Pylint
8282

83-
- script: 'COVERALLS_REPO_TOKEN=$(COVERALLS_TOKEN) coveralls'
83+
- script: 'COVERALLS_REPO_TOKEN=$(PythonCoverallsToken) coveralls'
8484
displayName: 'Push test results to coveralls https://coveralls.io/github/microsoft/botbuilder-python'
8585
continueOnError: true
8686

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
trigger:
1+
#
2+
# Run functional test on bot deployed to a Docker Linux environment in Azure.
3+
#
4+
pool:
5+
vmImage: 'Ubuntu-16.04'
6+
7+
trigger: # ci trigger
28
branches:
39
include:
4-
- daveta-python-functional
5-
exclude:
6-
- master
10+
- master
11+
12+
pr: none # no pr trigger
713

814
variables:
915
# Container registry service connection established during pipeline creation
@@ -14,15 +20,11 @@ variables:
1420
webAppName: 'e2epython'
1521
containerRegistry: 'nightlye2etest.azurecr.io'
1622
imageRepository: 'functionaltestpy'
17-
18-
19-
23+
# LinuxTestBotAppId: get this from azure
24+
# LinuxTestBotAppSecret: get this from Azure
2025

2126
jobs:
22-
# Build and publish container
2327
- job: Build
24-
pool:
25-
vmImage: 'Ubuntu-16.04'
2628
displayName: Build and push bot image
2729
continueOnError: false
2830
steps:
@@ -35,12 +37,8 @@ jobs:
3537
containerRegistry: $(dockerRegistryServiceConnection)
3638
tags: $(buildIdTag)
3739

38-
39-
4040
- job: Deploy
4141
displayName: Provision bot container
42-
pool:
43-
vmImage: 'Ubuntu-16.04'
4442
dependsOn:
4543
- Build
4644
steps:
@@ -54,8 +52,6 @@ jobs:
5452
DockerNamespace: $(containerRegistry)
5553
DockerRepository: $(imageRepository)
5654
DockerImageTag: $(buildIdTag)
57-
AppSettings: '-MicrosoftAppId $(botAppId) -MicrosoftAppPassword $(botAppPassword) -FLASK_APP /functionaltestbot/app.py -FLASK_DEBUG 1'
55+
AppSettings: '-MicrosoftAppId $(LinuxTestBotAppId) -MicrosoftAppPassword $(LinuxTestBotAppSecret) -FLASK_APP /functionaltestbot/app.py -FLASK_DEBUG 1'
5856

5957
#StartupCommand: 'flask run --host=0.0.0.0 --port=3978'
60-
61-

0 commit comments

Comments
 (0)
2ADD
0