真的。Python SDK,
aitoai的Python项目详细描述
Info: | Check Github for the latest source code and documentation for more information. |
---|---|
Maintainer: | Aito <admin@aito.ai> |
关于
aitopythonsdk是一个开源库,可以帮助您集成Python应用程序 使Aito更快更有效。在
SDK还包括Aito Command Line Interface (CLI),使您能够与Aito交互 在命令行shell中使用命令,例如:从文件推断表模式或将文件上载到Aito。在
支持/反馈
有关的问题、问题或反馈,请加入我们的support channels。在
测试
安装所需的软件包:
$ pip install -r requirements/build.txt $ pip install -r requirements/test.txt
您可以使用我们的测试cli来运行测试:
$ python -m tests -h
注意
有些测试需要设置一些环境变量。使用testclilist命令来发现和显示测试套件和用例
有多个测试套件:
- CLI套件:
$ python -m tests -v suite cli
Note
You need an Aito instance and set up the credentials with ^{tt2}$ and ^{tt3}$ to test some functions.
- SDK套件:
$ python -m tests -v suite sdk
Note
You need an Aito instance and set up the credentials with ^{tt2}$ and ^{tt3}$ to test some functions
- SQL函数测试:
Test against Postgres:
$ python -m tests -v case sql_functions.test_connection.TestPostgresConnection $ python -m tests -v case sql_functions.test_cli_sql_functions.TestPostgresFunctionsTest against MySQL:
$ python -m tests -v case sql_functions.test_connection.TestMySQLConnection $ python -m tests -v case sql_functions.test_cli_sql_functions.TestMySQLFunctionsNote
To test the SQL functions, you need to install pyodbc and the specific database ODBC driver.
- 生成和测试生成包:
To build the package:
$ pip install -r requirements/deploy.txt $ ./scripts/deploy test.pypi --no-publishThe built wheel should be at ^{tt6}$. To install:
$ pip install dist/aitoai-<version>.whl
To test the built package, create an environment variable ^{tt7}$ and run the above tests
- 测试文档:
To test the inline documentation:
$ python -m tests -v suite inline_docs
To test the code blocks in rst files:
$cd docs $ make doctest
贡献
- 做出改变
- 将unittest添加到适当的测试套件中(例如:Aito Schema的测试用例:tests/sdk/test-Aito_架构.py或在tests文件夹中创建新的测试套件
- 添加文档:
- 内联文档(如适用)
- 更新docs/source文件夹中的.rst文件(例如:向docs/source添加一个新的客户端函数/软件开发工具包.rst)在
- 如果适用,添加内联文档测试(例如:Aito客户机的内联文档测试:测试/内联文档/测试客户机内联测试_文档.py)
注意
请记住在中更新autodoc_mock_导入配置文件如有其他要求,提交
- 检查电路并发布PR
- 审查请购单后,使用适当的版本部署到生产(脚本/部署)
- 项目
标签: