diff --git a/.gitignore b/.gitignore index 2f9c59ca..9f146d8d 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ share/python-wheels/ .installed.cfg *.egg MANIFEST +.hatch/ # PyInstaller # Usually these files are written by a python script from a template diff --git a/CHANGELOG.md b/CHANGELOG.md index 415c5a36..86821127 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [0.19.2] - 2024-02-20 + +### Fixed + +- Remove fix for #21. The error was not caused by pytest 8.0, but by `Error` exception from + `firebird-base` package that masked the absence of `__notes__` attribute from `pytest`. + Dependency to pytest reverted to `>=7.4`. + +### Changed + +- Updated documentation. + ## [0.19.1] - 2024-02-09 -### FIXED +### Fixed - Fix for #21. Dependency to pytest changed from `>=8.0.0` to `~=7.4`. Other dependecies changed from `>=` to `~=`. diff --git a/README.md b/README.md index 18196148..18953989 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Firebird QA -This package contains: +This repository contains: - pytest plugin that provides support for testing the Firebird engine. It uses new Python driver for Firebird (`firebird-driver`). @@ -13,12 +13,28 @@ You should definitelly read the [QA suite documentation](https://firebird-qa.rea ## Quickstart - 1. Clone the git repository -2. Install the plugin and required dependencies by running next command from repo. directory:: +2. If you don't have `pipx` tool installed, install it using:: + + ``` + python -m pip install pipx + ``` + + Or you can use any other method listed at [pipx website](https://pipx.pypa.io). - pip install -e . + > Don't forget to run: + > + > pipx ensurepath + > + > once after installation to ensure that tools installed via `pipx` will be available on + > search path. + +3. Install the plugin and required dependencies by running next command: + + ``` + pipx install --include-deps firebird-qa + ``` 3. Adjust Firebird server configuration. diff --git a/docs/changelog.txt b/docs/changelog.txt index 466149a0..1640507b 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -4,6 +4,14 @@ Changelog .. currentmodule:: firebird.qa.plugin +Version 0.19.2 +============== + +* Remove fix for `#21 `_. The error + was not caused by pytest 8.0, but by `Error` exception from `firebird-base` package that + masked the absence of `__notes__` attribute from `pytest`. Dependency to pytest reverted + to `>=7.4`. +* Updated documentation. Version 0.19.1 ============== diff --git a/docs/usage-guide.txt b/docs/usage-guide.txt index cca7474d..97439ea8 100644 --- a/docs/usage-guide.txt +++ b/docs/usage-guide.txt @@ -1,4 +1,3 @@ - =========== Usage Guide =========== @@ -30,56 +29,64 @@ Requirements ------------ 1. Requires Python_ 3.8 or newer. -2. Requires `pip` installer. You may check it's availability from command line with:: +2. Requires pytest_ 7.4 or newer. +3. If you want to develop the Firebird QA plugin itself, you'll also need Hatch_ 1.9 or newer. +4. It's **recommended** to use the pipx_ tool to install and manage `firebird-qa` and `hatch`, + or at least use the separate Python virtual environment to install and run the QA suite, + especially on Linux where Python `site-packages` are managed by Linux distribution package + manager. - > pip --help +Installing pipx +--------------- - If `pip` is not installed, you may install it with:: +You can install `pipx` using `pip` in command prompt / terminal with:: - > python -m ensurepip + python -m pip install pipx -3. It's **recommended** to create separate Python virtual environment to install and run - the QA suite, especially on Linux where Python `site-packages` are managed by Linux - distribution package manager. +or by using other suitable method listed at pipx_ website. - There are multiple ways how to create and manage Python virtual environments, but we - recommend to use virtualenv_, together with virtualenvwrapper_ (for Linux) or - virtualenvwrapper-win_ (for Windows). +.. note:: - On Linux, the `virtualenv` and `virtualenvwrapper` are typically available for installation - from ditribution repository via package manager, which is also the preferred way to - install them on this platform. + Don't forget to run:: - On Windows, you should install `virtualenv` and `virtualenvwrapper-win` via `pip`. + pipx ensurepath -Installation ------------- + once after installation to ensure that tools installed via `pipx` will be available on + search path. + +Installing QA tools for regular use +----------------------------------- + +From command prompt / terminal execute:: + + pipx install --include-deps firebird-qa + +If you want to install specific version, you can use version specification. For example:: -1. Open the command prompt / terminal. + pipx install --include-deps firebird-qa==0.19.0 -2. Clone the firebird-qa repository:: +will install `firebird-qa` version 0.19.0. - > git clone https://github.com/FirebirdSQL/firebird-qa.git +Installing QA tools for plugin development +------------------------------------------ -3. Activate the Python virtual environment you created for QA, or skip this step if you - want to install everything into main site-packages. +Open the command prompt / terminal, switch to QA root directory and execute:: -4. Switch to directory with cloned `firebird-qa` repository. + pipx install --include-deps -e . - .. note:: - We'll refer to this directory as `QA root directory`. +Upgrading QA tools +------------------ -5. Install the plugin with pip, running:: +You can upgrade your installation to latest published version using:: - > pip install -e . + pipx upgrade firebird-qa - This will install Firebird QA plugin for `pytest`, along with required dependencies. +Alternativelly, you can reinstall it using:: - .. important:: + pipx reinstall firebird-qa - You must re-install the plugin every time you see that `git pull` updated - the `setup.cfg` file! +The reinstallation will also upgrade all dependencies. Configuration @@ -150,7 +157,8 @@ Basics 1. Open the terminal / command-line. -2. If you installed Firebird QA in Python virtual environment, **activate it**. +2. If you DID NOT USED `pipx`, but installed Firebird QA in Python virtual environment you + created manually, **activate it**. 3. Switch to QA root directory. @@ -189,17 +197,20 @@ Example:: > pytest ====================================================== test session starts ======================================================= - platform linux -- Python 3.8.12, pytest-7.0.0, pluggy-1.0.0 -- /home/job/python/envs/qa/bin/python + platform linux -- Python 3.11.8, pytest-8.0.1, pluggy-1.4.0 -- /home/pcisar/.local/pipx/venvs/firebird-qa/bin/python cachedir: .pytest_cache System: encodings: sys:utf-8 locale:UTF-8 filesystem:utf-8 Firebird: - server: local [v3.0.9.33562, SuperServer, Firebird/Linux/AMD/Intel/x64] + configuration: firebird-driver.conf + ODS: 13.1 + server: local [v5.0.0.1306, SuperServer, Firebird/Linux/AMD/Intel/x64] home: /opt/firebird bin: /opt/firebird/bin client library: libfbclient.so.2 - rootdir: /home/job/python/projects/firebird-qa, configfile: pytest.ini, testpaths: tests - plugins: firebird-qa-0.12.1 + rootdir: /home/job/python/projects/firebird-qa + configfile: pytest.ini + plugins: firebird-qa-0.19.2 collected 2385 items / 475 deselected / 1910 selected issue.full-join-push-where-predicate PASSED [ 1/1910] @@ -928,3 +939,6 @@ How to use temporary files .. _Python package: https://docs.python.org/3/tutorial/modules.html#packages .. _module: https://docs.python.org/3/tutorial/modules.html .. _docstring: https://docs.python.org/3/glossary.html#term-docstring +.. _pipx: https://pipx.pypa.io +.. _venv: https://docs.python.org/3/library/venv.html +.. _hatch: https://hatch.pypa.io diff --git a/pyproject.toml b/pyproject.toml index 5b61e475..f874b6ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,10 +32,10 @@ classifiers = [ "Framework :: Pytest", ] dependencies = [ - "firebird-base~=1.7.1", - "firebird-driver~=1.10.1", - "pytest~=7.4", - "psutil~=5.9.8", + "firebird-base>=1.7.2", + "firebird-driver~=1.10", + "pytest>=7.4", + "psutil~=5.9", ] [project.urls] diff --git a/src/firebird/qa/__about__.py b/src/firebird/qa/__about__.py index 862cfec1..8d81e332 100644 --- a/src/firebird/qa/__about__.py +++ b/src/firebird/qa/__about__.py @@ -1,4 +1,4 @@ # SPDX-FileCopyrightText: 2021-present The Firebird Projects # # SPDX-License-Identifier: MIT -__version__ = "0.19.1" +__version__ = "0.19.2"