Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8805cc5

Browse files
Usage of external testgres.os_ops and testgres.common (#289)
This patch splits testgres into tree parts:- testgres- testgres.os_ops- testgres.commontestgres.os_ops and testgres.common are packed into separated packages.
1 parenta060d47 commit8805cc5

File tree

51 files changed

+158
-3690
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+158
-3690
lines changed

‎docs/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ help:
1717
# Catch-all target: route all unknown targets to Sphinx using the new
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
20+
@pip install --force-reinstall ..
2021
@$(SPHINXBUILD) -M$@"$(SOURCEDIR)""$(BUILDDIR)"$(SPHINXOPTS)$(O)

‎docs/source/conf.py‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,19 @@
1414
#
1515
importos
1616
importsys
17-
sys.path.insert(0,os.path.abspath('../..'))
17+
importtestgres
18+
19+
asserttestgres.__path__isnotNone
20+
assertlen(testgres.__path__)==1
21+
asserttype(testgres.__path__[0]==str)# noqa: E721
22+
p=os.path.dirname(testgres.__path__[0])
23+
asserttype(p)==str# noqa: E721
24+
sys.path.insert(0,os.path.abspath(p))
1825

1926
# -- Project information -----------------------------------------------------
2027

2128
project=u'testgres'
29+
package_name=u'testgres'
2230
copyright=u'2016-2023, Postgres Professional'
2331
author=u'Postgres Professional'
2432

‎setup.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"port-for>=0.4",
1212
"six>=1.9.0",
1313
"psutil",
14-
"packaging"
14+
"packaging",
15+
"testgres.os_ops>=0.0.2,<1.0.0"
1516
]
1617

1718
# Add compatibility enum class
@@ -29,7 +30,8 @@
2930
setup(
3031
version='1.11.1',
3132
name='testgres',
32-
packages=['testgres','testgres.operations','testgres.impl'],
33+
packages=['testgres','testgres.impl'],
34+
package_dir={"testgres":"src"},
3335
description='Testing utility for PostgreSQL and its extensions',
3436
url='https://github.com/postgrespro/testgres',
3537
long_description=readme,

‎testgres/__init__.py‎renamed to ‎src/__init__.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151

5252
from .configimporttestgres_config
5353

54-
from .operations.os_opsimportOsOperations,ConnectionParams
55-
from .operations.local_opsimportLocalOperations
56-
from .operations.remote_opsimportRemoteOperations
54+
fromtestgres.operations.os_opsimportOsOperations,ConnectionParams
55+
fromtestgres.operations.local_opsimportLocalOperations
56+
fromtestgres.operations.remote_opsimportRemoteOperations
5757

5858
__all__= [
5959
"get_new_node",
File renamed without changes.

‎testgres/backup.py‎renamed to ‎src/backup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from .exceptionsimportBackupException
1515

16-
from .operations.os_opsimportOsOperations
16+
fromtestgres.operations.os_opsimportOsOperations
1717

1818
from .utilsimport \
1919
get_bin_path2, \

‎testgres/cache.py‎renamed to ‎src/cache.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
get_bin_path2, \
1717
execute_utility2
1818

19-
from .operations.local_opsimportLocalOperations
20-
from .operations.os_opsimportOsOperations
19+
fromtestgres.operations.local_opsimportLocalOperations
20+
fromtestgres.operations.os_opsimportOsOperations
2121

2222

2323
defcached_initdb(data_dir,logfile=None,params=None,os_ops:OsOperations=None,bin_path=None,cached=True):

‎testgres/config.py‎renamed to ‎src/config.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
fromcontextlibimportcontextmanager
1010

1111
from .constsimportTMP_CACHE
12-
from .operations.os_opsimportOsOperations
13-
from .operations.local_opsimportLocalOperations
12+
fromtestgres.operations.os_opsimportOsOperations
13+
fromtestgres.operations.local_opsimportLocalOperations
1414

1515
log_level=os.getenv('LOGGING_LEVEL','WARNING').upper()
1616
log_format=os.getenv('LOGGING_FORMAT','%(asctime)s - %(levelname)s - %(message)s')
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp