diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ca47c46eb..000000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: python - -python: - - "3.6" - -install: - - pip install -e ./libraries/botbuilder-schema - - pip install -e ./libraries/botframework-connector - - pip install -e ./libraries/botbuilder-core - - pip install -e ./libraries/botbuilder-azure - - pip install -r ./libraries/botframework-connector/tests/requirements.txt - -script: pytest diff --git a/libraries/botbuilder-ai/README.rst b/libraries/botbuilder-ai/README.rst new file mode 100644 index 000000000..aef9094cc --- /dev/null +++ b/libraries/botbuilder-ai/README.rst @@ -0,0 +1,84 @@ + +============================ +BotBuilder-AI SDK for Python +============================ + +.. image:: https://fuselabs.visualstudio.com/SDK_v4/_apis/build/status/Python/SDK_v4-Python-CI?branchName=master + :target: https://fuselabs.visualstudio.com/SDK_v4/_apis/build/status/Python/SDK_v4-Python-CI + :align: right + :alt: Azure DevOps status for master branch +.. image:: https://badge.fury.io/py/botbuilder-ai.svg + :target: https://badge.fury.io/py/botbuilder-ai + :alt: Latest PyPI package version + +Cognitive services extensions for Microsoft BotBuilder. + + +How to Install +============== + +.. code-block:: python + + pip install botbuilder-ai + + +Documentation/Wiki +================== + +You can find more information on the botbuilder-python project by visiting our `Wiki`_. + +Requirements +============ + +* `Python >= 3.7.0`_ + + +Source Code +=========== +The latest developer version is available in a github repository: +https://github.com/Microsoft/botbuilder-python/ + + +Contributing +============ + +This project welcomes contributions and suggestions. Most contributions require you to agree to a +Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us +the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide +a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions +provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the `Microsoft Open Source Code of Conduct`_. +For more information see the `Code of Conduct FAQ`_ or +contact `opencode@microsoft.com`_ with any additional questions or comments. + +Reporting Security Issues +========================= + +Security issues and bugs should be reported privately, via email, to the Microsoft Security +Response Center (MSRC) at `secure@microsoft.com`_. You should +receive a response within 24 hours. If for some reason you do not, please follow up via +email to ensure we received your original message. Further information, including the +`MSRC PGP`_ key, can be found in +the `Security TechCenter`_. + +License +======= + +Copyright (c) Microsoft Corporation. All rights reserved. + +Licensed under the MIT_ License. + +.. _Wiki: https://github.com/Microsoft/botbuilder-python/wiki +.. _Python >= 3.7.0: https://www.python.org/downloads/ +.. _MIT: https://github.com/Microsoft/vscode/blob/master/LICENSE.txt +.. _Microsoft Open Source Code of Conduct: https://opensource.microsoft.com/codeofconduct/ +.. _Code of Conduct FAQ: https://opensource.microsoft.com/codeofconduct/faq/ +.. _opencode@microsoft.com: mailto:opencode@microsoft.com +.. _secure@microsoft.com: mailto:secure@microsoft.com +.. _MSRC PGP: https://technet.microsoft.com/en-us/security/dn606155 +.. _Security TechCenter: https://github.com/Microsoft/vscode/blob/master/LICENSE.txt + +.. `_ \ No newline at end of file diff --git a/libraries/botbuilder-ai/setup.py b/libraries/botbuilder-ai/setup.py index 364df7920..7a9747c65 100644 --- a/libraries/botbuilder-ai/setup.py +++ b/libraries/botbuilder-ai/setup.py @@ -22,6 +22,9 @@ info = f.read() exec(info, package_info) +with open(os.path.join(root, 'README.rst'), encoding='utf-8') as f: + long_description = f.read() + setup( name=package_info["__title__"], version=package_info["__version__"], @@ -29,14 +32,15 @@ author=package_info["__author__"], description=package_info["__description__"], keywords="botbuilder-ai LUIS QnAMaker bots ai botframework botbuilder", - long_description=package_info["__summary__"], + long_description=long_description, + long_description_content_type='text/x-rst', license=package_info["__license__"], packages=["botbuilder.ai", "botbuilder.ai.qna", "botbuilder.ai.luis"], install_requires=REQUIRES + TESTS_REQUIRES, tests_require=TESTS_REQUIRES, include_package_data=True, classifiers=[ - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", diff --git a/libraries/botbuilder-applicationinsights/README.rst b/libraries/botbuilder-applicationinsights/README.rst index 046567f73..43f6046da 100644 --- a/libraries/botbuilder-applicationinsights/README.rst +++ b/libraries/botbuilder-applicationinsights/README.rst @@ -7,8 +7,8 @@ BotBuilder-ApplicationInsights SDK for Python :target: https://fuselabs.visualstudio.com/SDK_v4/_apis/build/status/Python/SDK_v4-Python-CI :align: right :alt: Azure DevOps status for master branch -.. image:: https://badge.fury.io/py/botbuilder-core.svg - :target: https://badge.fury.io/py/botbuilder-core +.. image:: https://badge.fury.io/py/botbuilder-applicationinsights.svg + :target: https://badge.fury.io/py/botbuilder-applicationinsights :alt: Latest PyPI package version Within the Bot Framework, BotBuilder-ApplicationInsights enables the Azure Application Insights service. @@ -33,7 +33,7 @@ You can find more information on the botbuilder-python project by visiting our ` Requirements ============ -* `Python >= 3.6.8`_ +* `Python >= 3.7.0`_ Source Code @@ -75,7 +75,7 @@ Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT_ License. .. _Wiki: https://github.com/Microsoft/botbuilder-python/wiki -.. _Python >= 3.6.8: https://www.python.org/downloads/ +.. _Python >= 3.7.0: https://www.python.org/downloads/ .. _MIT: https://github.com/Microsoft/vscode/blob/master/LICENSE.txt .. _Microsoft Open Source Code of Conduct: https://opensource.microsoft.com/codeofconduct/ .. _Code of Conduct FAQ: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/libraries/botbuilder-applicationinsights/django_tests/README.md b/libraries/botbuilder-applicationinsights/django_tests/README.md index bd9953d19..bbc0b9db3 100644 --- a/libraries/botbuilder-applicationinsights/django_tests/README.md +++ b/libraries/botbuilder-applicationinsights/django_tests/README.md @@ -9,7 +9,7 @@ Django generates *code* to create projects (`django-admin startproject`) and app File | | Description --- | --- -all_tests.sh | Runs our current test matrix of python/django versions. Current matrix is python (3.6) and django (2.2). +all_tests.sh | Runs our current test matrix of python/django versions. Current matrix is python (3.7) and django (2.2). README.md | This file. run_test.sh | Runs specific python/django version to create project, copy replacement files and runs tests. template.html | Template file diff --git a/libraries/botbuilder-applicationinsights/django_tests/all_tests.sh b/libraries/botbuilder-applicationinsights/django_tests/all_tests.sh index d2664256e..562785cf2 100644 --- a/libraries/botbuilder-applicationinsights/django_tests/all_tests.sh +++ b/libraries/botbuilder-applicationinsights/django_tests/all_tests.sh @@ -11,7 +11,7 @@ BASEDIR=$(pwd) # Django/python compatibility matrix... if $PYTHON -c "import sys; sys.exit(1 if (sys.version_info.major == 3 and sys.version_info.minor == 6) else 0)"; then - echo "[Error] Environment should be configured with Python 3.6!" 1>&2 + echo "[Error] Environment should be configured with Python 3.7!" 1>&2 exit 2 fi # Add more versions here (space delimited). diff --git a/libraries/botbuilder-applicationinsights/setup.py b/libraries/botbuilder-applicationinsights/setup.py index 09841e25d..e2fef2823 100644 --- a/libraries/botbuilder-applicationinsights/setup.py +++ b/libraries/botbuilder-applicationinsights/setup.py @@ -24,6 +24,9 @@ info = f.read() exec(info, package_info) +with open(os.path.join(root, 'README.rst'), encoding='utf-8') as f: + long_description = f.read() + setup( name=package_info['__title__'], version=package_info['__version__'], @@ -31,14 +34,15 @@ author=package_info['__author__'], description=package_info['__description__'], keywords=['BotBuilderApplicationInsights', 'bots', 'ai', 'botframework', 'botbuilder'], - long_description=package_info['__summary__'], + long_description=long_description, + long_description_content_type='text/x-rst', license=package_info['__license__'], packages=['botbuilder.applicationinsights','botbuilder.applicationinsights.django' ], install_requires=REQUIRES + TESTS_REQUIRES, tests_require=TESTS_REQUIRES, include_package_data=True, classifiers=[ - 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', diff --git a/libraries/botbuilder-azure/README.rst b/libraries/botbuilder-azure/README.rst new file mode 100644 index 000000000..04af9dacc --- /dev/null +++ b/libraries/botbuilder-azure/README.rst @@ -0,0 +1,83 @@ + +=============================== +BotBuilder-Azure SDK for Python +=============================== + +.. image:: https://fuselabs.visualstudio.com/SDK_v4/_apis/build/status/Python/SDK_v4-Python-CI?branchName=master + :target: https://fuselabs.visualstudio.com/SDK_v4/_apis/build/status/Python/SDK_v4-Python-CI + :align: right + :alt: Azure DevOps status for master branch +.. image:: https://badge.fury.io/py/botbuilder-dialogs.svg + :target: https://badge.fury.io/py/botbuilder-dialogs + :alt: Latest PyPI package version + +Azure extensions for Microsoft BotBuilder. + +How to Install +============== + +.. code-block:: python + + pip install botbuilder-azure + + +Documentation/Wiki +================== + +You can find more information on the botbuilder-python project by visiting our `Wiki`_. + +Requirements +============ + +* `Python >= 3.7.0`_ + + +Source Code +=========== +The latest developer version is available in a github repository: +https://github.com/Microsoft/botbuilder-python/ + + +Contributing +============ + +This project welcomes contributions and suggestions. Most contributions require you to agree to a +Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us +the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide +a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions +provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the `Microsoft Open Source Code of Conduct`_. +For more information see the `Code of Conduct FAQ`_ or +contact `opencode@microsoft.com`_ with any additional questions or comments. + +Reporting Security Issues +========================= + +Security issues and bugs should be reported privately, via email, to the Microsoft Security +Response Center (MSRC) at `secure@microsoft.com`_. You should +receive a response within 24 hours. If for some reason you do not, please follow up via +email to ensure we received your original message. Further information, including the +`MSRC PGP`_ key, can be found in +the `Security TechCenter`_. + +License +======= + +Copyright (c) Microsoft Corporation. All rights reserved. + +Licensed under the MIT_ License. + +.. _Wiki: https://github.com/Microsoft/botbuilder-python/wiki +.. _Python >= 3.7.0: https://www.python.org/downloads/ +.. _MIT: https://github.com/Microsoft/vscode/blob/master/LICENSE.txt +.. _Microsoft Open Source Code of Conduct: https://opensource.microsoft.com/codeofconduct/ +.. _Code of Conduct FAQ: https://opensource.microsoft.com/codeofconduct/faq/ +.. _opencode@microsoft.com: mailto:opencode@microsoft.com +.. _secure@microsoft.com: mailto:secure@microsoft.com +.. _MSRC PGP: https://technet.microsoft.com/en-us/security/dn606155 +.. _Security TechCenter: https://github.com/Microsoft/vscode/blob/master/LICENSE.txt + +.. `_ \ No newline at end of file diff --git a/libraries/botbuilder-azure/setup.py b/libraries/botbuilder-azure/setup.py index 5c5588c83..99d3964f2 100644 --- a/libraries/botbuilder-azure/setup.py +++ b/libraries/botbuilder-azure/setup.py @@ -16,6 +16,9 @@ info = f.read() exec(info, package_info) +with open(os.path.join(root, 'README.rst'), encoding='utf-8') as f: + long_description = f.read() + setup( name=package_info['__title__'], version=package_info['__version__'], @@ -24,13 +27,14 @@ description=package_info['__description__'], keywords=['BotBuilderAzure', 'bots', 'ai', 'botframework', 'botbuilder', 'azure'], - long_description=package_info['__summary__'], + long_description=long_description, + long_description_content_type='text/x-rst', license=package_info['__license__'], packages=['botbuilder.azure'], install_requires=REQUIRES + TEST_REQUIRES, tests_require=TEST_REQUIRES, classifiers=[ - 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', diff --git a/libraries/botbuilder-core/README.rst b/libraries/botbuilder-core/README.rst index 8fdce61c2..2fc7b5fe5 100644 --- a/libraries/botbuilder-core/README.rst +++ b/libraries/botbuilder-core/README.rst @@ -1,7 +1,7 @@ -================================== +============================== BotBuilder-Core SDK for Python -================================== +============================== .. image:: https://fuselabs.visualstudio.com/SDK_v4/_apis/build/status/Python/SDK_v4-Python-CI?branchName=master :target: https://fuselabs.visualstudio.com/SDK_v4/_apis/build/status/Python/SDK_v4-Python-CI @@ -29,7 +29,7 @@ You can find more information on the botbuilder-python project by visiting our ` Requirements ============ -* `Python >= 3.6.4`_ +* `Python >= 3.7.0`_ Source Code @@ -71,7 +71,7 @@ Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT_ License. .. _Wiki: https://github.com/Microsoft/botbuilder-python/wiki -.. _Python >= 3.6.4: https://www.python.org/downloads/ +.. _Python >= 3.7.0: https://www.python.org/downloads/ .. _MIT: https://github.com/Microsoft/vscode/blob/master/LICENSE.txt .. _Microsoft Open Source Code of Conduct: https://opensource.microsoft.com/codeofconduct/ .. _Code of Conduct FAQ: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/libraries/botbuilder-core/botbuilder/core/bot_framework_adapter.py b/libraries/botbuilder-core/botbuilder/core/bot_framework_adapter.py index 24e18b74c..bc4a9fa21 100644 --- a/libraries/botbuilder-core/botbuilder/core/bot_framework_adapter.py +++ b/libraries/botbuilder-core/botbuilder/core/bot_framework_adapter.py @@ -7,7 +7,8 @@ ConversationAccount, ConversationParameters, ConversationReference, ConversationsResult, ConversationResourceResponse) -from botframework.connector import ConnectorClient, Channels +from botframework.connector import Channels +from botframework.connector.aio import ConnectorClient from botframework.connector.auth import (MicrosoftAppCredentials, JwtTokenValidation, SimpleCredentialProvider) @@ -183,7 +184,7 @@ async def update_activity(self, context: TurnContext, activity: Activity): client = self.create_connector_client(activity.service_url) return await client.conversations.update_activity( activity.conversation.id, - activity.conversation.activity_id, + activity.id, activity) except Exception as e: raise e @@ -217,7 +218,7 @@ async def send_activities(self, context: TurnContext, activities: List[Activity] await asyncio.sleep(delay_in_ms) else: client = self.create_connector_client(activity.service_url) - client.conversations.send_to_conversation(activity.conversation.id, activity) + await client.conversations.send_to_conversation(activity.conversation.id, activity) except Exception as e: raise e diff --git a/libraries/botbuilder-core/botbuilder/core/bot_state.py b/libraries/botbuilder-core/botbuilder/core/bot_state.py index 68a38b0cc..1f160f47b 100644 --- a/libraries/botbuilder-core/botbuilder/core/bot_state.py +++ b/libraries/botbuilder-core/botbuilder/core/bot_state.py @@ -3,7 +3,7 @@ from .turn_context import TurnContext from .middleware_set import Middleware -from .storage import calculate_change_hash, StoreItem, StorageKeyFactory, Storage +from .storage import calculate_change_hash, StorageKeyFactory, Storage from .property_manager import PropertyManager from botbuilder.core.state_property_accessor import StatePropertyAccessor from botbuilder.core import turn_context diff --git a/libraries/botbuilder-core/setup.py b/libraries/botbuilder-core/setup.py index 32d215640..3024bb098 100644 --- a/libraries/botbuilder-core/setup.py +++ b/libraries/botbuilder-core/setup.py @@ -16,6 +16,9 @@ info = f.read() exec(info, package_info) +with open(os.path.join(root, 'README.rst'), encoding='utf-8') as f: + long_description = f.read() + setup( name=package_info['__title__'], version=package_info['__version__'], @@ -23,12 +26,13 @@ author=package_info['__author__'], description=package_info['__description__'], keywords=['BotBuilderCore', 'bots', 'ai', 'botframework', 'botbuilder'], - long_description=package_info['__summary__'], + long_description=long_description, + long_description_content_type='text/x-rst', license=package_info['__license__'], packages=['botbuilder.core', 'botbuilder.core.adapters'], install_requires=REQUIRES, classifiers=[ - 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', diff --git a/libraries/botbuilder-core/tests/test_bot_framework_adapter.py b/libraries/botbuilder-core/tests/test_bot_framework_adapter.py index a6aedee55..b09ed627f 100644 --- a/libraries/botbuilder-core/tests/test_bot_framework_adapter.py +++ b/libraries/botbuilder-core/tests/test_bot_framework_adapter.py @@ -3,12 +3,12 @@ import aiounittest import unittest -from copy import copy +from copy import copy, deepcopy from unittest.mock import Mock from botbuilder.core import BotFrameworkAdapter, BotFrameworkAdapterSettings, TurnContext from botbuilder.schema import Activity, ActivityTypes, ConversationAccount, ConversationReference, ChannelAccount -from botframework.connector import ConnectorClient +from botframework.connector.aio import ConnectorClient from botframework.connector.auth import ClaimsIdentity reference = ConversationReference( @@ -60,33 +60,33 @@ def create_connector_client(self, service_url: str) -> ConnectorClient: self.tester.assertIsNotNone(service_url, 'create_connector_client() not passed service_url.') connector_client_mock = Mock() - def mock_reply_to_activity(conversation_id, activity_id, activity): + async def mock_reply_to_activity(conversation_id, activity_id, activity): nonlocal self self.tester.assertIsNotNone(conversation_id, 'reply_to_activity not passed conversation_id') self.tester.assertIsNotNone(activity_id, 'reply_to_activity not passed activity_id') self.tester.assertIsNotNone(activity, 'reply_to_activity not passed activity') return not self.fail_auth - def mock_send_to_conversation(conversation_id, activity): + async def mock_send_to_conversation(conversation_id, activity): nonlocal self self.tester.assertIsNotNone(conversation_id, 'send_to_conversation not passed conversation_id') self.tester.assertIsNotNone(activity, 'send_to_conversation not passed activity') return not self.fail_auth - def mock_update_activity(conversation_id, activity_id, activity): + async def mock_update_activity(conversation_id, activity_id, activity): nonlocal self self.tester.assertIsNotNone(conversation_id, 'update_activity not passed conversation_id') self.tester.assertIsNotNone(activity_id, 'update_activity not passed activity_id') self.tester.assertIsNotNone(activity, 'update_activity not passed activity') return not self.fail_auth - def mock_delete_activity(conversation_id, activity_id): + async def mock_delete_activity(conversation_id, activity_id): nonlocal self self.tester.assertIsNotNone(conversation_id, 'delete_activity not passed conversation_id') self.tester.assertIsNotNone(activity_id, 'delete_activity not passed activity_id') return not self.fail_auth - def mock_create_conversation(parameters): + async def mock_create_conversation(parameters): nonlocal self self.tester.assertIsNotNone(parameters, 'create_conversation not passed parameters') return not self.fail_auth @@ -144,6 +144,35 @@ async def aux_func_assert_context(context): await adapter.process_activity(incoming_message, '', aux_func_assert_context) self.assertTrue(called, 'bot logic not called.') + + async def test_should_update_activity(self): + adapter = AdapterUnderTest() + context = TurnContext(adapter, incoming_message) + self.assertTrue(await adapter.update_activity(context, incoming_message), 'Activity not updated.') + + async def test_should_fail_to_update_activity_if_serviceUrl_missing(self): + adapter = AdapterUnderTest() + context = TurnContext(adapter, incoming_message) + cpy = deepcopy(incoming_message) + cpy.service_url = None + with self.assertRaises(Exception) as _: + await adapter.update_activity(context, cpy) + + async def test_should_fail_to_update_activity_if_conversation_missing(self): + adapter = AdapterUnderTest() + context = TurnContext(adapter, incoming_message) + cpy = deepcopy(incoming_message) + cpy.conversation = None + with self.assertRaises(Exception) as _: + await adapter.update_activity(context, cpy) + + async def test_should_fail_to_update_activity_if_activity_id_missing(self): + adapter = AdapterUnderTest() + context = TurnContext(adapter, incoming_message) + cpy = deepcopy(incoming_message) + cpy.id = None + with self.assertRaises(Exception) as _: + await adapter.update_activity(context, cpy) async def test_should_migrate_tenant_id_for_msteams(self): incoming = TurnContext.apply_conversation_reference( diff --git a/libraries/botbuilder-dialogs/README.rst b/libraries/botbuilder-dialogs/README.rst index 8fdce61c2..6c8208769 100644 --- a/libraries/botbuilder-dialogs/README.rst +++ b/libraries/botbuilder-dialogs/README.rst @@ -1,24 +1,24 @@ -================================== -BotBuilder-Core SDK for Python -================================== +================================= +BotBuilder-Dialogs SDK for Python +================================= .. image:: https://fuselabs.visualstudio.com/SDK_v4/_apis/build/status/Python/SDK_v4-Python-CI?branchName=master :target: https://fuselabs.visualstudio.com/SDK_v4/_apis/build/status/Python/SDK_v4-Python-CI :align: right :alt: Azure DevOps status for master branch -.. image:: https://badge.fury.io/py/botbuilder-core.svg - :target: https://badge.fury.io/py/botbuilder-core +.. image:: https://badge.fury.io/py/botbuilder-dialogs.svg + :target: https://badge.fury.io/py/botbuilder-dialogs :alt: Latest PyPI package version -Within the Bot Framework, BotBuilder-core enables you to build bots that exchange messages with users on channels that are configured in the Bot Framework Portal. +A dialog stack based conversation manager for Microsoft BotBuilder. How to Install ============== .. code-block:: python - pip install botbuilder-core + pip install botbuilder-dialogs Documentation/Wiki @@ -29,7 +29,7 @@ You can find more information on the botbuilder-python project by visiting our ` Requirements ============ -* `Python >= 3.6.4`_ +* `Python >= 3.7.0`_ Source Code @@ -71,7 +71,7 @@ Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT_ License. .. _Wiki: https://github.com/Microsoft/botbuilder-python/wiki -.. _Python >= 3.6.4: https://www.python.org/downloads/ +.. _Python >= 3.7.0: https://www.python.org/downloads/ .. _MIT: https://github.com/Microsoft/vscode/blob/master/LICENSE.txt .. _Microsoft Open Source Code of Conduct: https://opensource.microsoft.com/codeofconduct/ .. _Code of Conduct FAQ: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/libraries/botbuilder-dialogs/setup.py b/libraries/botbuilder-dialogs/setup.py index 4c9b89e1f..ef0f5d542 100644 --- a/libraries/botbuilder-dialogs/setup.py +++ b/libraries/botbuilder-dialogs/setup.py @@ -24,6 +24,9 @@ info = f.read() exec(info, package_info) +with open(os.path.join(root, 'README.rst'), encoding='utf-8') as f: + long_description = f.read() + setup( name=package_info['__title__'], version=package_info['__version__'], @@ -31,14 +34,15 @@ author=package_info['__author__'], description=package_info['__description__'], keywords=['BotBuilderDialogs', 'bots', 'ai', 'botframework', 'botbuilder'], - long_description=package_info['__summary__'], + long_description=long_description, + long_description_content_type='text/x-rst', license=package_info['__license__'], packages=['botbuilder.dialogs', 'botbuilder.dialogs.prompts', 'botbuilder.dialogs.choices'], install_requires=REQUIRES + TEST_REQUIRES, tests_require=TEST_REQUIRES, include_package_data=True, classifiers=[ - 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', diff --git a/libraries/botbuilder-schema/README.rst b/libraries/botbuilder-schema/README.rst index 0e8e8f10c..abf3ae738 100644 --- a/libraries/botbuilder-schema/README.rst +++ b/libraries/botbuilder-schema/README.rst @@ -29,7 +29,7 @@ You can find more information on the botbuilder-python project by visiting our ` Requirements ============ -* `Python >= 3.6.4`_ +* `Python >= 3.7.0`_ Source Code @@ -71,7 +71,7 @@ Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT_ License. .. _Wiki: https://github.com/Microsoft/botbuilder-python/wiki -.. _Python >= 3.6.4: https://www.python.org/downloads/ +.. _Python >= 3.7.0: https://www.python.org/downloads/ .. _MIT: https://github.com/Microsoft/vscode/blob/master/LICENSE.txt .. _Microsoft Open Source Code of Conduct: https://opensource.microsoft.com/codeofconduct/ .. _Code of Conduct FAQ: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/libraries/botbuilder-schema/setup.py b/libraries/botbuilder-schema/setup.py index ba5872f92..8cfc157a6 100644 --- a/libraries/botbuilder-schema/setup.py +++ b/libraries/botbuilder-schema/setup.py @@ -8,6 +8,11 @@ VERSION = os.environ["packageVersion"] if "packageVersion" in os.environ else "4.4.0b1" REQUIRES = ["msrest>=0.6.6"] +root = os.path.abspath(os.path.dirname(__file__)) + +with open(os.path.join(root, 'README.rst'), encoding='utf-8') as f: + long_description = f.read() + setup( name=NAME, version=VERSION, @@ -15,13 +20,14 @@ author="Microsoft", url="https://github.com/Microsoft/botbuilder-python", keywords=["BotBuilderSchema", "bots","ai", "botframework", "botbuilder"], - long_description="This package contains the schema classes for using the Bot Framework.", + long_description=long_description, + long_description_content_type='text/x-rst', license='MIT', install_requires=REQUIRES, packages=["botbuilder.schema"], include_package_data=True, classifiers=[ - 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', diff --git a/libraries/botframework-connector/README.rst b/libraries/botframework-connector/README.rst index a93c1eab3..fc196f30a 100644 --- a/libraries/botframework-connector/README.rst +++ b/libraries/botframework-connector/README.rst @@ -1,7 +1,7 @@ -================================== +============================================ Microsoft Bot Framework Connector for Python -================================== +============================================ .. image:: https://fuselabs.visualstudio.com/SDK_v4/_apis/build/status/Python/SDK_v4-Python-CI?branchName=master :target: https://fuselabs.visualstudio.com/SDK_v4/_apis/build/status/Python/SDK_v4-Python-CI @@ -78,7 +78,7 @@ You can find more information on the botbuilder-python project by visiting our ` Requirements ============ -* `Python >= 3.6.4`_ +* `Python >= 3.7.0`_ Source Code @@ -121,7 +121,7 @@ Licensed under the MIT_ License. .. _API Reference: https://docs.microsoft.com/en-us/Bot-Framework/rest-api/bot-framework-rest-connector-api-reference .. _Wiki: https://github.com/Microsoft/botbuilder-python/wiki -.. _Python >= 3.6.4: https://www.python.org/downloads/ +.. _Python >= 3.7.0: https://www.python.org/downloads/ .. _MIT: https://github.com/Microsoft/vscode/blob/master/LICENSE.txt .. _Microsoft Open Source Code of Conduct: https://opensource.microsoft.com/codeofconduct/ .. _Code of Conduct FAQ: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/libraries/botframework-connector/setup.py b/libraries/botframework-connector/setup.py index 3f74af130..a73c8fabf 100644 --- a/libraries/botframework-connector/setup.py +++ b/libraries/botframework-connector/setup.py @@ -12,6 +12,11 @@ "PyJWT>=1.5.3", "botbuilder-schema>=4.4.0b1"] +root = os.path.abspath(os.path.dirname(__file__)) + +with open(os.path.join(root, 'README.rst'), encoding='utf-8') as f: + long_description = f.read() + setup( name=NAME, version=VERSION, @@ -33,10 +38,11 @@ "botframework.connector.token_api.operations" ], include_package_data=True, - long_description="Microsoft Bot Framework Bot Builder SDK for Python.", + long_description=long_description, + long_description_content_type='text/x-rst', license='MIT', classifiers=[ - 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', diff --git a/samples/Core-Bot/README.md b/samples/Core-Bot/README.md index efec1000f..e124cef08 100644 --- a/samples/Core-Bot/README.md +++ b/samples/Core-Bot/README.md @@ -17,7 +17,7 @@ This sample **requires** prerequisites in order to run. This bot uses [LUIS](https://www.luis.ai), an AI based cognitive service, to implement language understanding. -### Install Python 3.6 +### Install Python 3.7 ### Create a LUIS Application to enable language understanding @@ -26,6 +26,11 @@ LUIS language model setup, training, and application configuration steps can be If you wish to create a LUIS application via the CLI, these steps can be found in the [README-LUIS.md](README-LUIS.md). +## Running the sample +- Run `pip install -r requirements.txt` to install all dependencies +- Update LuisAppId, LuisAPIKey and LuisAPIHostName in `config.yaml` with the information retrieved from the [LUIS portal](https://www.luis.ai) +- Run `python main.py` + ## Testing the bot using Bot Framework Emulator diff --git a/samples/python-flask/13.core-bot/README.md b/samples/python-flask/13.core-bot/README.md index f321e5ed1..d4dbff702 100644 --- a/samples/python-flask/13.core-bot/README.md +++ b/samples/python-flask/13.core-bot/README.md @@ -17,7 +17,7 @@ This sample **requires** prerequisites in order to run. This bot uses [LUIS](https://www.luis.ai), an AI based cognitive service, to implement language understanding. -### Install Python 3.6 +### Install Python 3.7 ### Create a LUIS Application to enable language understanding @@ -26,6 +26,11 @@ LUIS language model setup, training, and application configuration steps can be If you wish to create a LUIS application via the CLI, these steps can be found in the [README-LUIS.md](README-LUIS.md). +## Running the sample +- Run `pip install -r requirements.txt` to install all dependencies +- Update LuisAppId, LuisAPIKey and LuisAPIHostName in `config.yaml` with the information retrieved from the [LUIS portal](https://www.luis.ai) +- Run `python main.py` + ## Testing the bot using Bot Framework Emulator