From 6bb445e56e2e28cc314dc6f475b3ac834d44e071 Mon Sep 17 00:00:00 2001 From: jiajunsu Date: Wed, 9 Nov 2022 11:03:28 +0800 Subject: [PATCH 1/3] Update install command, use `pip` instead of `setup.py` --- README.en.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.en.md b/README.en.md index 7214fe6..ef20b4a 100644 --- a/README.en.md +++ b/README.en.md @@ -19,7 +19,7 @@ This project has been tested with test suites of SQLAlchemy. ## Installation ``` ->>> python setup.py install +>>> python -m pip install opengauss-sqlalchemy ``` ## Usage diff --git a/README.md b/README.md index 3cf2405..7fcb1f1 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ ## 安装 ``` ->>> python setup.py install +>>> python -m pip install opengauss-sqlalchemy ``` ## 使用方法 -- Gitee From 9b1301aed1702c8a90e395677046e850e80b01ee Mon Sep 17 00:00:00 2001 From: jiajunsu Date: Wed, 9 Nov 2022 11:14:26 +0800 Subject: [PATCH 2/3] Fix typo in readme.en --- README.en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.en.md b/README.en.md index ef20b4a..2fd1e58 100644 --- a/README.en.md +++ b/README.en.md @@ -188,7 +188,7 @@ Table("some_table", ..., opengauss_to="GROUP group_name") ### Steps to install and config centralized opengauss for testing 1. Add OS user for opengauss ```>>> useradd omm -g dbgrp``` -2. Change owner of opengass dir ```>>> chown omm:dbgrp ${db_dir} -R``` +2. Change owner of opengauss dir ```>>> chown omm:dbgrp ${db_dir} -R``` 3. Switch to user omm ```>>> su - omm``` 4. Install opengauss ```>>> sh install.sh -w ${db_password} -p 37200``` 5. Start opengauss ```>>> gs_ctl start -D ${db_dir}/data/single_node/``` -- Gitee From a22ac44cf5da5c849be9fe73eee55c8e34c40dde Mon Sep 17 00:00:00 2001 From: jiajunsu Date: Thu, 10 Nov 2022 11:44:35 +0800 Subject: [PATCH 3/3] Format code with flake8 --- setup.py | 2 +- test/test_compiler.py | 2 +- test/test_suite.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index c8b3eba..2d3e835 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ from setuptools import setup with open(os.path.join(os.path.dirname(__file__), "opengauss_sqlalchemy", "__init__.py")) as fd: VERSION = re.compile(r'.*__version__ = "(.*?)"', re.S).match(fd.read()).group(1) -long_description = (Path(__file__).parent/ "README.md").read_text() +long_description = (Path(__file__).parent / "README.md").read_text() setup( diff --git a/test/test_compiler.py b/test/test_compiler.py index 0ef2c8b..ce1ccc7 100644 --- a/test/test_compiler.py +++ b/test/test_compiler.py @@ -474,7 +474,7 @@ class DDLCompilerTest(fixtures.TestBase, AssertsCompiledSQL): ) self.assert_compile( schema.CreateTable(tbl), - "CREATE TABLE atable (id INTEGER) WITH (ORIENTATION = COLUMN) COMPRESS", + "CREATE TABLE atable (id INTEGER) WITH (ORIENTATION = COLUMN) COMPRESS", ) def test_create_table_partition_by_list(self): diff --git a/test/test_suite.py b/test/test_suite.py index a226f42..c3c295b 100644 --- a/test/test_suite.py +++ b/test/test_suite.py @@ -73,9 +73,9 @@ class LongNameBlowoutTest(_LongNameBlowoutTest): assert len(actual_name) > 255 if reflected_name is not None: - overlap = actual_name[0 : len(reflected_name)] + overlap = actual_name[0: len(reflected_name)] if len(overlap) < len(actual_name): - eq_(overlap[0:-5], reflected_name[0 : len(overlap) - 5]) + eq_(overlap[0:-5], reflected_name[0: len(overlap) - 5]) else: eq_(overlap, reflected_name) -- Gitee