From a7cfd9e00c551477b9643ee08ba5f33577d9d148 Mon Sep 17 00:00:00 2001 From: Pavel Cisar Date: Sun, 5 Jun 2022 18:08:54 +0200 Subject: [PATCH] Documentation for v0.15.0 --- docs/changelog.txt | 22 ++++++++++++++++++++++ docs/conf.py | 4 ++-- firebird/qa/plugin.py | 4 ++-- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 08359dfd..3a3cb7f6 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -2,6 +2,28 @@ Changelog ######### +Version 0.15.0 +============== + +* To simplify portable use of databases with special configuration via `databases.conf`, + the plugin initialization now ensures empty subdirectory `QA` in Firebird sample directory. + To define your test databases in `databases.conf`, use next pattern:: + + my_db = $(dir_sampleDB)/QA/my-db.fdb + { + ... + } + + On plugin initialization, the `QA` sub-directory is first emptied and removed, and then + newly created. On non-Windows, full privileges are granted. + +* Added possibility to use databases aliases. The `.db_factory()` parameter `filename` is + now handled as database alias if it starts with `#`, for example `#employee` means alias + `employee`. The alias must be defined in `databases.conf` file. + + When filename is an alias, the `.Database.db_path` property does not contain + full `~pathlib.Path` to the database, but this database alias. + Version 0.14.0 ============== diff --git a/docs/conf.py b/docs/conf.py index 34808d81..a0ba693a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,10 +23,10 @@ copyright = '2022, Pavel Cisar' author = 'Pavel Císař' # The short X.Y version -version = '0.13.0' +version = '0.15.0' # The full version, including alpha/beta/rc tags -release = '0.13.0' +release = '0.15.0' # -- General configuration --------------------------------------------------- diff --git a/firebird/qa/plugin.py b/firebird/qa/plugin.py index 8882e075..33c2fd57 100644 --- a/firebird/qa/plugin.py +++ b/firebird/qa/plugin.py @@ -497,7 +497,7 @@ class Database: Arguments: path: Path to directory where test database should be located. - filename: Database filename. + filename: Database filename, or alias prefixed by `#`. user: User name used to create/restore/connect the test database. Default is taken from server configuration. password: User password used to create/restore/connect the test database. Default @@ -520,7 +520,7 @@ class Database: #: Use utf8_filename DPB flag self.utf8filename = utf8filename #: Full path to test database, or database alias - self.db_path: Path = filename[1:] if filename.startswith('#') else path / filename + self.db_path: Union[Path, str] = filename[1:] if filename.startswith('#') else path / filename #: DSN to test database. self.dsn: str = None #: Firebird CHARACTER SET name for the database