[Cleanup] Set up poetry, lockfile, mypy, and black#1
Merged
Conversation
src/databricks/sql/thrift_backend.py:356: error: Not all arguments converted during string formatting
arikfr
approved these changes
May 31, 2022
|
I would also revise the folder structure to be more idiomatic (doesn't have to be in this PR). |
Contributor
Author
|
Thanks @arikfr that's coming next :) |
moderakh
reviewed
May 31, 2022
| description = "Atomic file writes." | ||
| category = "dev" | ||
| optional = false | ||
| python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" |
Collaborator
There was a problem hiding this comment.
">=2.7
are we supporting python 2?
I think pysql only support python 3. isn't that right? why do we need python 2 version of the dependency here?
moderakh
approved these changes
May 31, 2022
| description = "Classes Without Boilerplate" | ||
| category = "dev" | ||
| optional = false | ||
| python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" |
Contributor
Author
|
I would disregard any specs you see in the lockfile, as this is
procedurally generated by Poetry. The only relevant specification is in
pyproject.toml which says Python 3.7 or above.
…On Tue, May 31, 2022 at 16:58, Moe Derakhshani ***@***.***> wrote:
***@***.**** approved this pull request.
------------------------------
In cmdexec/clients/python/poetry.lock
<#1 (comment)>
:
> @@ -0,0 +1,575 @@
+[[package]]
+name = "atomicwrites"
+version = "1.4.0"
+description = "Atomic file writes."
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+
+[[package]]
+name = "attrs"
+version = "21.4.0"
+description = "Classes Without Boilerplate"
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
ditto.
—
Reply to this email directly, view it on GitHub
<#1 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AECG7B5POD5OP5ATFA45SE3VM2DQRANCNFSM5XN64NFA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
moderakh
approved these changes
May 31, 2022
Collaborator
moderakh
left a comment
There was a problem hiding this comment.
Thanks. LGTM.
One question, not related to this PR. The name of the repo is databricks-sql-connector I wonder as in future we are going to have SDK for other languages (go, nodejs) how we should name the repos?
maybe ${lang}-databricks-sql-connector ?
Contributor
Author
|
That works for me. Can I make that change right away? |
susodapop
pushed a commit
that referenced
this pull request
Jun 2, 2022
* Updated pyproject.toml using interactive `poetry init` * Specify dependencies to match those in setup.cfg * Revise dependency specifications and build a fresh lockfile. * Move .gitignore to base * Update .gitignore * Specify readme.md location (needed for Pypi) * Add mypy specification. Ignore generated files. * Fix failing mypy checks * Add black dependency * Black the codebase
jayantsing-db
added a commit
to jayantsing-db/databricks-sql-python
that referenced
this pull request
Apr 9, 2025
jayantsing-db
added a commit
to jayantsing-db/databricks-sql-python
that referenced
this pull request
May 12, 2025
Signed-off-by: Jayant Singh <jayant.singh@databricks.com>
saishreeeee
pushed a commit
that referenced
this pull request
Jun 4, 2025
* Updated pyproject.toml using interactive `poetry init` * Specify dependencies to match those in setup.cfg * Revise dependency specifications and build a fresh lockfile. * Move .gitignore to base * Update .gitignore * Specify readme.md location (needed for Pypi) * Add mypy specification. Ignore generated files. * Fix failing mypy checks * Add black dependency * Black the codebase Signed-off-by: Sai Shree Pradhan <saishree.pradhan@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR handles a few cleanup tasks. None of these changes should affect the behaviour of the connector / package. These are administrative / build changes that will streamline build / publish in the future.
setup.cfgwithpyproject.tomlv2.0.2mypyintopyproject.tomlso type checks can be run withpoetry run mypy. Generated files from thrift are not checked.blackintopyproject.tomlso code formatting can be checked automaticallymaintainersmetadata to a Databricks distro (databricks-sql-connector-maintainers@databricks.com)These changes make way for subsequently automating build / publish using Github actions, which will be borrowed from the https://github.com/databricks/databricks-sql-cli repository.
How is this tested?
Manually for now:
poetry installpoetry run mypy srcpoetry run black src --checkpoetry build