From 461ca12a74403d36fb0c010f7d5c9666baf721f6 Mon Sep 17 00:00:00 2001 From: JensDiemer Date: Sat, 1 Jan 2022 14:13:11 +0100 Subject: [PATCH 1/2] Add devshell command: "update_test_snapshots" --- src/inventory_project/dev_shell.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/inventory_project/dev_shell.py b/src/inventory_project/dev_shell.py index 348e477..3081fd0 100644 --- a/src/inventory_project/dev_shell.py +++ b/src/inventory_project/dev_shell.py @@ -184,6 +184,21 @@ class PyInventoryCommandSet(DevShellBaseCommandSet): print(f'updated: {po_file_path}') + def do_update_test_snapshots(self, statement: cmd2.Statement): + """ + Update all test snapshot files by run tests with RAISE_SNAPSHOT_ERRORS=0 + """ + verbose_check_call( + 'pytest', + *statement.arg_list, + cwd=self.config.base_path, + exit_on_error=True, + extra_env={ + # https://github.com/boxine/bx_py_utils#notes-about-snapshot + 'RAISE_SNAPSHOT_ERRORS': '0' + } + ) + class DevShellCommandSet(OriginDevShellCommandSet): From 5820555986c852592e571629c4fedc8761670e9a Mon Sep 17 00:00:00 2001 From: JensDiemer Date: Sat, 1 Jan 2022 14:22:19 +0100 Subject: [PATCH 2/2] Release as v0.13.0 --- README.creole | 4 +++- README.rst | 8 ++++++-- deployment/project.env | 2 +- pyproject.toml | 2 +- src/inventory/__init__.py | 2 +- .../test_admin_item_auto_group_items_1.snapshot.html | 4 ++-- .../test_admin_item_auto_group_items_2.snapshot.html | 4 ++-- .../tests/test_admin_item_login_1.snapshot.html | 2 +- ...n_item_normal_user_create_minimal_item_1.snapshot.html | 4 ++-- ...n_item_normal_user_create_minimal_item_2.snapshot.html | 4 ++-- ...n_memo_normal_user_create_minimal_item_1.snapshot.html | 4 ++-- 11 files changed, 23 insertions(+), 17 deletions(-) diff --git a/README.creole b/README.creole index 44da5f8..979cc2c 100644 --- a/README.creole +++ b/README.creole @@ -174,8 +174,10 @@ Files are separated into: "/src/" and "/development/" == history -* [[https://github.com/jedie/PyInventory/compare/v0.12.0...master|compare v0.12.0...master]] **dev** +* [[https://github.com/jedie/PyInventory/compare/v0.13.0...master|compare v0.13.0...master]] **dev** ** tbc +* [[https://github.com/jedie/PyInventory/compare/v0.12.0...v0.13.0|v0.13.0 - 01.01.2022]] +** [[https://github.com/jedie/PyInventory/pull/83|Update requirements, e.g.: Django v3.2]] * [[https://github.com/jedie/PyInventory/compare/v0.11.0...v0.12.0|v0.12.0 - 22.11.2021]] ** NEW: [[https://github.com/jedie/PyInventory/pull/78|Protect user to overwrite newer Item/Memo/Location with a older one (e.g.: in other browser TAB)]] ** update requirements diff --git a/README.rst b/README.rst index 9f89f2c..8997404 100644 --- a/README.rst +++ b/README.rst @@ -241,10 +241,14 @@ Files are separated into: "/src/" and "/development/" history ------- -* `compare v0.12.0...master `_ **dev** +* `compare v0.13.0...master `_ **dev** * tbc +* `v0.13.0 - 01.01.2022 `_ + + * `Update requirements, e.g.: Django v3.2 `_ + * `v0.12.0 - 22.11.2021 `_ * NEW: `Protect user to overwrite newer Item/Memo/Location with a older one (e.g.: in other browser TAB) `_ @@ -446,4 +450,4 @@ donation ------------ -``Note: this file is generated from README.creole 2021-11-24 17:37:38 with "python-creole"`` \ No newline at end of file +``Note: this file is generated from README.creole 2022-01-01 14:21:31 with "python-creole"`` \ No newline at end of file diff --git a/deployment/project.env b/deployment/project.env index 578439f..8851523 100644 --- a/deployment/project.env +++ b/deployment/project.env @@ -1,3 +1,3 @@ export PROJECT_NAME=pyinventory export PROJECT_PACKAGE_NAME=pyinventory -export PROJECT_VERSION=0.12.0 +export PROJECT_VERSION=0.13.0 diff --git a/pyproject.toml b/pyproject.toml index e4bef50..7e0c175 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "PyInventory" -version = "0.12.0" +version = "0.13.0" description = "Web based management to catalog things including state and location etc. using Python/Django." authors = ["JensDiemer "] homepage = "https://github.com/jedie/PyInventory" diff --git a/src/inventory/__init__.py b/src/inventory/__init__.py index 5761fb9..6216a21 100644 --- a/src/inventory/__init__.py +++ b/src/inventory/__init__.py @@ -4,4 +4,4 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -__version__ = "0.12.0" +__version__ = "0.13.0" diff --git a/src/inventory_project/tests/test_admin_item_auto_group_items_1.snapshot.html b/src/inventory_project/tests/test_admin_item_auto_group_items_1.snapshot.html index aadb7c3..53b3098 100644 --- a/src/inventory_project/tests/test_admin_item_auto_group_items_1.snapshot.html +++ b/src/inventory_project/tests/test_admin_item_auto_group_items_1.snapshot.html @@ -2,7 +2,7 @@ - Select Item to change | PyInventory v0.12.0 + Select Item to change | PyInventory v0.13.0 @@ -43,7 +43,7 @@ diff --git a/src/inventory_project/tests/test_admin_item_auto_group_items_2.snapshot.html b/src/inventory_project/tests/test_admin_item_auto_group_items_2.snapshot.html index f5ffef4..71a97d7 100644 --- a/src/inventory_project/tests/test_admin_item_auto_group_items_2.snapshot.html +++ b/src/inventory_project/tests/test_admin_item_auto_group_items_2.snapshot.html @@ -2,7 +2,7 @@ - Select Item to change | PyInventory v0.12.0 + Select Item to change | PyInventory v0.13.0 @@ -43,7 +43,7 @@ diff --git a/src/inventory_project/tests/test_admin_item_login_1.snapshot.html b/src/inventory_project/tests/test_admin_item_login_1.snapshot.html index 4b8e73b..325b055 100644 --- a/src/inventory_project/tests/test_admin_item_login_1.snapshot.html +++ b/src/inventory_project/tests/test_admin_item_login_1.snapshot.html @@ -2,7 +2,7 @@ - Log in | PyInventory v0.12.0 + Log in | PyInventory v0.13.0 diff --git a/src/inventory_project/tests/test_admin_item_normal_user_create_minimal_item_1.snapshot.html b/src/inventory_project/tests/test_admin_item_normal_user_create_minimal_item_1.snapshot.html index cf37a3c..9ea1c8a 100644 --- a/src/inventory_project/tests/test_admin_item_normal_user_create_minimal_item_1.snapshot.html +++ b/src/inventory_project/tests/test_admin_item_normal_user_create_minimal_item_1.snapshot.html @@ -2,7 +2,7 @@ - Add Item | PyInventory v0.12.0 + Add Item | PyInventory v0.13.0 @@ -84,7 +84,7 @@ diff --git a/src/inventory_project/tests/test_admin_item_normal_user_create_minimal_item_2.snapshot.html b/src/inventory_project/tests/test_admin_item_normal_user_create_minimal_item_2.snapshot.html index ea5d0f1..c29a0ab 100644 --- a/src/inventory_project/tests/test_admin_item_normal_user_create_minimal_item_2.snapshot.html +++ b/src/inventory_project/tests/test_admin_item_normal_user_create_minimal_item_2.snapshot.html @@ -2,7 +2,7 @@ - Change Item | PyInventory v0.12.0 + Change Item | PyInventory v0.13.0 @@ -84,7 +84,7 @@ diff --git a/src/inventory_project/tests/test_admin_memo_normal_user_create_minimal_item_1.snapshot.html b/src/inventory_project/tests/test_admin_memo_normal_user_create_minimal_item_1.snapshot.html index d49046c..d437a1c 100644 --- a/src/inventory_project/tests/test_admin_memo_normal_user_create_minimal_item_1.snapshot.html +++ b/src/inventory_project/tests/test_admin_memo_normal_user_create_minimal_item_1.snapshot.html @@ -2,7 +2,7 @@ - Add Memo | PyInventory v0.12.0 + Add Memo | PyInventory v0.13.0 @@ -80,7 +80,7 @@