Package: aitoai
Info:CheckGithubfor the latest source code anddocumentationfor more information.Maintainer:Aito <admin@aito.ai>AboutThe Aito Python SDK is an open-source library that helps you to integrate your Python application
toAitoquicker and more efficiently.The SDK also includes theAito Command Line Interface (CLI)that enables you to interact with Aito
using commands in your command-line shell, e.g: infer a table schema from a file or upload a file to Aito.Support / FeedbackFor issues with, questions about, or feedback, please join oursupport channels.InstallationAito Python SDK can be installed withpip$pipinstallaitoaiCheck ourinstallation guidefor more informationDocumentationYou will needsphinxinstalled to generate the documentation.$ pip install sphinx
$ pip install sphinx_rtd_themeDocumentation can be generated by:$cddocs$makecleanhtmlGenerated documentation can be found in thedocs/build/html/*directory.Dependencies:The Python SDK SQL integration and the tests depend on the ODBC db drivers and
the postgres and mysql functionality.The main drivers can be installed in Debian based Linuxes with:` sudo apt installunixodbc-devodbc-postgresqlpostgresql-clientdefault-mysql-clientpip install pyodbc `You can find more information about installing the MySQL ODBC drivers [here](https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-installation.html)Also note: that the database integration tests require local postgres / mySQL servers.Environment:To run the test, you need to have the following environment variables defined:AITO_GROCERY_DEMO_INSTANCE_URLAITO_GROCERY_DEMO_API_KEYAITO_INSTANCE_URLAITO_API_KEYTestingInstall the required packages:$pipinstall-rrequirements/build.txt$pipinstall-rrequirements/test.txtYou can use our test cli to run tests:$python-mtests-hNoteSome tests require some environment variables to be setup. Use the test CLI list command to discover and display the test suites and casesThere are multiple test suites:CLI suite:$python-mtests-vsuitecliNoteYou need an Aito instance and set up the credentials with`AITO_INSTANCE_URL`and`AITO_API_KEY`to test some functions.SDK suite:$python-mtests-vsuitesdkNoteYou need an Aito instance and set up the credentials with`AITO_INSTANCE_URL`and`AITO_API_KEY`to test some functionsSQL functions tests:Test against Postgres:$python-mtests-vcasesql_functions.test_connection.TestPostgresConnection$python-mtests-vcasesql_functions.test_cli_sql_functions.TestPostgresFunctionsTest against MySQL:$python-mtests-vcasesql_functions.test_connection.TestMySQLConnection$python-mtests-vcasesql_functions.test_cli_sql_functions.TestMySQLFunctionsNoteTo test the SQL functions, you need to installpyodbcand the specific database ODBC driver.Build and test built package:To build the package:$pipinstall-rrequirements/deploy.txt$./scripts/deploytest.pypi--no-publish-bdevWARNING: This will update the version in ‘aito/__init__’ file. DO NOT commit this to Git!The built wheel should be at`dist/`. To install:$pipinstalldist/aitoai-<version>.whlTo test the built package, create an environment variable`TEST_BUILT_PACKAGE`and run the above testsTest the documentation:To test the inline documentation:$python-mtests-vsuiteinline_docsTo test the code blocks in rst files:$cddocs$curl-oreddit_sample.csvhttps://raw.githubusercontent.com/AitoDotAI/kickstart/master/reddit_sample.csv$exportSPHINX_DISABLE_MOCK_REQUIREMENTS=TRUE$makedoctestContributingMaking changesAdd unittest to the appropriate test suite (e.g: test case for Aito Schema:tests/sdk/test_aito_schema.py) or create a new test suite inside thetestsfolderAdd documentation:Inline documentation if applicableUpdate .rst file in docs/source folder (e.g: Add a new Client function to docs/source/sdk.rst)Add inline doc test if applicable (e.g: inline doc test for Aito Client:tests/inline_docs/test_client_inline_docs.py)NoteRemember to update theautodoc_mock_importsin conf.py file if there are additional requirementsUpdate the version in aito/__init__ to e.g. ‘1.2.3rc1’ and write release notes in docs/changelog.rstCheck CircleCI and issue a PRDeploy to production (scripts/deploy) with the appropriate version after the PR is reviewed