-
Notifications
You must be signed in to change notification settings - Fork 2
Add PyPI upload step to release workflow and enhance database compatibility handling #15
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
Conversation
…n tests.yml to ensure database compatibility with default Mode A.
except Exception as e: | ||
pytest.skip(f"Database compatibility check failed: {e}") |
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.
这是在 O
模式测试不通过的用例吗? 打印的异常信息是不是明确下在 PG
模式可以通过, 在 O
模式无法通过?
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.
是的,在O模式下是报错的,PG模式是可以通过的,在数据库中也验证过,如下:test02是O模式,test01是PG模式:
两个数据库在空值,datetime等类型有不通的处理:
test=> \c test02
Password for user root:
SSL connection (cipher: ECDHE-RSA-AES128-GCM-SHA256, bits: 128)
You are now connected to database "test02" as user "root".
test02=> create table testmany (a bigint, b bigint);
CREATE TABLE
test02=> insert into testmany values (1, '');
INSERT 0 1
test02=> \c test01
Password for user root:
SSL connection (cipher: ECDHE-RSA-AES128-GCM-SHA256, bits: 128)
You are now connected to database "test01" as user "root".
test01=> create table testmany (a bigint, b bigint);
CREATE TABLE
test01=> insert into testmany values (1, '');
ERROR: The input syntax of type bigint: "" is invalid.
LINE 1: insert into testmany values (1, '');
^
CONTEXT: referenced column: b
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.
是的,在O模式下是报错的,PG模式是可以通过的,在数据库中也验证过,如下:test02是O模式,test01是PG模式:
两个数据库在空值,datetime等类型有不同的处理:
test=> \c test02
Password for user root:
SSL connection (cipher: ECDHE-RSA-AES128-GCM-SHA256, bits: 128)
You are now connected to database "test02" as user "root".
test02=> create table testmany (a bigint, b bigint);
CREATE TABLE
test02=> insert into testmany values (1, '');
INSERT 0 1
test02=> \c test01
Password for user root:
SSL connection (cipher: ECDHE-RSA-AES128-GCM-SHA256, bits: 128)
You are now connected to database "test01" as user "root".
test01=> create table testmany (a bigint, b bigint);
CREATE TABLE
test01=> insert into testmany values (1, '');
ERROR: The input syntax of type bigint: "" is invalid.
LINE 1: insert into testmany values (1, '');
^
CONTEXT: referenced column: b
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.
OK
Description
This pull request updates the
README.md
file and project URLs for thegaussdb-python
repository to reflect the latest project status, improve clarity, and ensure consistency across documentation. It also incorporates recent changes to enhance database compatibility and streamline the release process.Changes Made
README.md
with clearer installation instructions, updated project URLs, and added references toisort-gaussdb
.test_array.py
to ensure a clean test environment.DBCOMPATIBILITY 'PG'
parameter fromCREATE DATABASE
command in test setup for better compatibility.gaussdb_skip
marker and try-except blocks in multiple test files (test_pool_common.py
,test_exec.py
,test_pgresult.py
,test_adapt.py
,test_column.py
,test_cursor_common.py
,test_cursor_common_async.py
,test_prepared.py
,test_prepared_async.py
,test_composite.py
,test_datetime.py
,test_hstore.py
,test_range.py
).gaussdb
to 1.0.1,gaussdb_pool
to 1.0.1,isort_gaussdb
to 0.0.3.bump_version.py
to supportisort-gaussdb
and removedgaussdb_c
references.isort-gaussdb
and added it to the documentation index.Why
These changes ensure the
gaussdb-python
project documentation is up-to-date, improve test reliability across different database environments, and streamline the release process for easier PyPI publishing. The version bumps and changelog updates reflect the latest development milestones, while compatibility enhancements address issues with GaussDB-specific test cases.Testing
pytest
to verify compatibility changes in test files.README.md
rendering on GitHub to ensure formatting and links are correct.bump_version.py
with-l patch -a update commit tag
to confirm version bumping and tagging.Additional Notes
PYPI_API_TOKEN
for automated releases.Release Commands
To publish the updated packages to PyPI: