From 2818d0131dd6fbc500a00c9c3e57bbed5a9c27eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20=C5=9Aliwi=C5=84ski?= Date: Tue, 6 Jan 2026 20:29:30 +0100 Subject: [PATCH 1/2] Display architecture diagram in README - closes #1244 --- .pre-commit-config.yaml | 1 + README.rst | 12 ++++++++++-- newsfragments/1244.docs.rst | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b5638516..b37168af 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,6 +16,7 @@ repos: - id: trailing-whitespace - id: check-toml - id: end-of-file-fixer + exclude_types: [svg] - id: mixed-line-ending - id: check-yaml - id: pretty-format-json diff --git a/README.rst b/README.rst index a5eaa153..7fa12827 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -.. image:: https://raw.githubusercontent.com/dbfixtures/pytest-postgresql/master/logo.png +.. image:: https://raw.githubusercontent.com/dbfixtures/pytest-postgresql/main/logo.png :width: 100px :height: 100px @@ -32,7 +32,7 @@ How to use .. warning:: - Tested on PostgreSQL versions >= 10. See tests for more details. + Tested on PostgreSQL versions >= 14. See tests for more details. Install with: @@ -44,6 +44,14 @@ You will also need to install ``psycopg``. See `its installation instructions `_). +How does it work +---------------- + +.. image:: https://raw.githubusercontent.com/dbfixtures/pytest-postgresql/main/docs/images/architecture.svg + :alt: Project Architecture Diagram + :align: center + + Plugin contains three fixtures: * **postgresql** - it's a client fixture that has functional scope. diff --git a/newsfragments/1244.docs.rst b/newsfragments/1244.docs.rst index 38554dfb..c11b5a80 100644 --- a/newsfragments/1244.docs.rst +++ b/newsfragments/1244.docs.rst @@ -1 +1 @@ -Add plugins' architecture diagram. +Add plugins' architecture diagram and display it in project's README. From 89ac6a20149278e3875415c2efd8d967d3725680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20=C5=9Aliwi=C5=84ski?= Date: Tue, 6 Jan 2026 20:36:56 +0100 Subject: [PATCH 2/2] Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks" This reverts commit f330664bca3fe66ed3ea2dbed2216ee83d419a5c. --- README.rst | 2 +- docs/images/architecture.svg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 7fa12827..113a939a 100644 --- a/README.rst +++ b/README.rst @@ -32,7 +32,7 @@ How to use .. warning:: - Tested on PostgreSQL versions >= 14. See tests for more details. + Tested on PostgreSQL versions >= 10. See tests for more details. Install with: diff --git a/docs/images/architecture.svg b/docs/images/architecture.svg index 31c3732b..b7f7b2e6 100644 --- a/docs/images/architecture.svg +++ b/docs/images/architecture.svg @@ -1 +1 @@ -Per-test DB (clone)Template DB (seeded)PostgreSQL processpostgresql_proc_factoryPytest runnerPer-test DB (clone)Template DB (seeded)PostgreSQL processpostgresql_proc_factoryPytest runnerTemplate is created and seeded once per full runloop[per test]request postgresql_proc with load=[load_database]1start server2invoke load_database (create metadata, seed data)3request clone of TemplateDB4create cloned database for test5run test using cloned DB6teardown: commit transaction7teardown: drop_all metadata (cleanup)8 +Per-test DB (clone)Template DB (seeded)PostgreSQL processpostgresql_proc_factoryPytest runnerPer-test DB (clone)Template DB (seeded)PostgreSQL processpostgresql_proc_factoryPytest runnerTemplate is created and seeded once per full runloop[per test]request postgresql_proc with load=[load_database]1start server2invoke load_database (create metadata, seed data)3request clone of TemplateDB4create cloned database for test5run test using cloned DB6teardown: commit transaction7teardown: drop_all metadata (cleanup)8 \ No newline at end of file