Skip to content

Commit

Permalink
Remove fix for #21 as it was fixed in firebird-base; updated document…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
pcisar committed Feb 20, 2024
1 parent 7881246 commit 813b26b
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 46 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `~=`.
Expand Down
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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`).
Expand All @@ -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.

Expand Down
8 changes: 8 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ Changelog

.. currentmodule:: firebird.qa.plugin

Version 0.19.2
==============

* Remove fix for `#21 <https://github.com/FirebirdSQL/firebird-qa/issues/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
==============
Expand Down
86 changes: 50 additions & 36 deletions docs/usage-guide.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

===========
Usage Guide
===========
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/firebird/qa/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021-present The Firebird Projects <www.firebirdsql.org>
#
# SPDX-License-Identifier: MIT
__version__ = "0.19.1"
__version__ = "0.19.2"

0 comments on commit 813b26b

Please sign in to comment.