-
-
Notifications
You must be signed in to change notification settings - Fork 146
Update project root dirs/files and introduce pyproject.toml
+ uv
project manager.
#379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
pyproject.toml
+ uv
project manager.
@DaniilAnichin, @9en9i, @dolfinus, @mayty, @jimenezj8, @xzkostyan , hello. Could you possibly have thorough and multiple looks at this PR? I think it is high time for project refreshment concerning its infrastructure. |
VERSION = (0, 3, 2) | ||
__version__ = '.'.join(str(x) for x in VERSION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I have not found an easier and cheaper way for uv to use dynamic versioning.
This solution - uv-dynamic-versioning - aims to retrieve data from a VCS.
I tried this solution - setuptools-scm - yet it didn't work (an unexpected version_file
param or smth).
So, if you can find a better solution which allows the uv manager to support dynamic versioning in a cheap and an easy way, feel free to coautor and propose changes and even commits.
@@ -16,18 +16,14 @@ | |||
# import sys | |||
# sys.path.insert(0, os.path.abspath('.')) | |||
|
|||
from clickhouse_sqlalchemy import __version__, VERSION | |||
# https://github.com/sphinx-toolbox/sphinx-pyproject | |||
from sphinx_pyproject import SphinxConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This dependency is vital because the dynamic versioning is proposed to be replaced with a static one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or with hatchling dynamic version is preservable (example). However, I think reading from the "pyproject.toml" as a single metadata source is beneficial in diminishing possible duplication.
[project.entry-points."sqlalchemy.dialects"] | ||
"clickhouse" = "clickhouse_sqlalchemy.drivers.http.base:ClickHouseDialect_http" | ||
"clickhouse.asynch" = "clickhouse_sqlalchemy.drivers.asynch.base:ClickHouseDialect_asynch" | ||
"clickhouse.http" = "clickhouse_sqlalchemy.drivers.http.base:ClickHouseDialect_http" | ||
"clickhouse.native" = "clickhouse_sqlalchemy.drivers.native.base:ClickHouseDialect_native" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahem, could you give a hint how to test the fact these entry points work as before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My guess would be something like "install locally in venv this version + sqlalchemy, try to load engine via dialect specified by dsn"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you help me with listing reproducible steps?
A bit later I'll integrate the uv into the GHA worflow files: https://docs.astral.sh/uv/guides/integration/github/ . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple minors, + as usual a bit iffy about removing version from init, though it also probably is not too important; otherwise lgtm
[project.entry-points."sqlalchemy.dialects"] | ||
"clickhouse" = "clickhouse_sqlalchemy.drivers.http.base:ClickHouseDialect_http" | ||
"clickhouse.asynch" = "clickhouse_sqlalchemy.drivers.asynch.base:ClickHouseDialect_asynch" | ||
"clickhouse.http" = "clickhouse_sqlalchemy.drivers.http.base:ClickHouseDialect_http" | ||
"clickhouse.native" = "clickhouse_sqlalchemy.drivers.native.base:ClickHouseDialect_native" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My guess would be something like "install locally in venv this version + sqlalchemy, try to load engine via dialect specified by dsn"
Fixes #345 .
Similar to the #346 and #348 (closed) PRs.
Drags some changes from the #364 .
Prepares the ground for future drop of Python 3.8 ( #356 ) and Py3.9 with Py3.10 as a minimum version.
Enum tests are fixed to reduce warning messages ( partially in the #357 ).
Features: described in the CHANGELOG.md file.
Checklist:
flake8
and fix issues. -> done with flake8 and ruff.pytest
no tests failed. See https://clickhouse-sqlalchemy.readthedocs.io/en/latest/development.html. -> done aspytest --ignore=tests/types/test_json.py
because of problems in the Fix tests #357 (won't be fixed in this PR).