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..113a939a 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 @@ -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/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 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.