From 0017ef7c496074a6395dba467169b617ae801a70 Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Thu, 9 Jan 2025 12:51:59 +0100 Subject: [PATCH 1/3] Prepare release 1.4.2 --- CHANGELOG.md | 10 ++++ changelog/+nodes-order.added.md | 1 - changelog/109.added.md | 1 - changelog/158.added.me | 1 - changelog/159.added.md | 1 - pyproject.toml | 88 ++++++++++++++------------------- 6 files changed, 47 insertions(+), 55 deletions(-) delete mode 100644 changelog/+nodes-order.added.md delete mode 100644 changelog/109.added.md delete mode 100644 changelog/158.added.me delete mode 100644 changelog/159.added.md diff --git a/CHANGELOG.md b/CHANGELOG.md index cad316dc..cde19ccb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,16 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang +## [1.4.2](https://github.com/opsmill/infrahub-sdk-python/tree/v1.4.2) - 2025-01-09 + +### Added + +- Adds `infrahubctl info` command to display information of the connectivity status of the SDK. ([#109](https://github.com/opsmill/infrahub-sdk-python/issues/109)) +- Add `count` method to both sync and async clients to retrieve the number of objects of a given kind ([#158](https://github.com/opsmill/infrahub-sdk-python/issues/158)) +- Add the ability to batch API queries for `all` and `filter` functions. ([#159](https://github.com/opsmill/infrahub-sdk-python/issues/159)) +- `client.all` and `client.filters` now support `order` parameter allowing to disable order of retrieve nodes in order to enhance performances + + ## [1.4.1](https://github.com/opsmill/infrahub-sdk-python/tree/v1.3.0) - 2025-01-05 ### Fixed diff --git a/changelog/+nodes-order.added.md b/changelog/+nodes-order.added.md deleted file mode 100644 index 957690e2..00000000 --- a/changelog/+nodes-order.added.md +++ /dev/null @@ -1 +0,0 @@ -`client.all` and `client.filters` now support `order` parameter allowing to disable order of retrieve nodes in order to enhance performances diff --git a/changelog/109.added.md b/changelog/109.added.md deleted file mode 100644 index 31b81370..00000000 --- a/changelog/109.added.md +++ /dev/null @@ -1 +0,0 @@ -Adds `infrahubctl info` command to display information of the connectivity status of the SDK. \ No newline at end of file diff --git a/changelog/158.added.me b/changelog/158.added.me deleted file mode 100644 index 06304c04..00000000 --- a/changelog/158.added.me +++ /dev/null @@ -1 +0,0 @@ -Add `count` method to both sync and async clients to retrieve the number of objects of a given kind \ No newline at end of file diff --git a/changelog/159.added.md b/changelog/159.added.md deleted file mode 100644 index c7e95c81..00000000 --- a/changelog/159.added.md +++ /dev/null @@ -1 +0,0 @@ -Add the ability to batch API queries for `all` and `filter` functions. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f89684da..51fbc632 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [project] name = "infrahub-sdk" -version = "1.4.1" +version = "1.4.2" requires-python = ">=3.9" [tool.poetry] name = "infrahub-sdk" -version = "1.4.1" +version = "1.4.2" description = "Python Client to interact with Infrahub" authors = ["OpsMill "] readme = "README.md" @@ -164,33 +164,19 @@ disallow_untyped_defs = true [[tool.mypy.overrides]] module = "infrahub_sdk.ctl.check" -disable_error_code = [ - "call-overload" -] +disable_error_code = ["call-overload"] [[tool.mypy.overrides]] module = "infrahub_sdk.ctl.generator" -disable_error_code = [ - "attr-defined", -] +disable_error_code = ["attr-defined"] [[tool.mypy.overrides]] module = "infrahub_sdk.ctl.schema" -disable_error_code = [ - "arg-type", - "attr-defined", - "misc", - "union-attr", -] +disable_error_code = ["arg-type", "attr-defined", "misc", "union-attr"] [[tool.mypy.overrides]] module = "infrahub_sdk.utils" -disable_error_code = [ - "arg-type", - "attr-defined", - "return-value", - "union-attr", -] +disable_error_code = ["arg-type", "attr-defined", "return-value", "union-attr"] [tool.ruff] line-length = 120 @@ -215,31 +201,31 @@ task-tags = ["FIXME", "TODO", "XXX"] select = ["ALL"] ignore = [ - "D", # pydocstyle - "DOC", # pydoclint - "CPY", # flake8-copyright - "T201", # use of `print` - "ISC", # flake8-implicit-str-concat - "COM812", # missing-trailing-comma + "D", # pydocstyle + "DOC", # pydoclint + "CPY", # flake8-copyright + "T201", # use of `print` + "ISC", # flake8-implicit-str-concat + "COM812", # missing-trailing-comma ################################################################################################## # Rules below needs to be Investigated # ################################################################################################## - "PT", # flake8-pytest-style - "PGH", # pygrep-hooks - "ERA", # eradicate commented-out code - "SLF001", # flake8-self - "EM", # flake8-errmsg - "TRY", # tryceratops - "TD", # flake8-todos - "FIX", # flake8-fixme - "TID", # flake8-tidy-imports - "FBT", # flake8-boolean-trap - "G", # flake8-logging-format - "FLY", # flynt - "RSE", # flake8-raise - "BLE", # flake8-blind-except (BLE) - "A", # flake8-builtins + "PT", # flake8-pytest-style + "PGH", # pygrep-hooks + "ERA", # eradicate commented-out code + "SLF001", # flake8-self + "EM", # flake8-errmsg + "TRY", # tryceratops + "TD", # flake8-todos + "FIX", # flake8-fixme + "TID", # flake8-tidy-imports + "FBT", # flake8-boolean-trap + "G", # flake8-logging-format + "FLY", # flynt + "RSE", # flake8-raise + "BLE", # flake8-blind-except (BLE) + "A", # flake8-builtins ################################################################################################## # The ignored rules below should be removed once the code has been updated, they are included # @@ -313,21 +299,21 @@ max-complexity = 17 ################################################################################################## # Review and change the below later # ################################################################################################## - "ANN201", # ANN201 Missing return type annotation for public function - "ANN202", # Missing return type annotation for private function - "ANN204", # Missing return type annotation for special method - "ANN401", # Dynamically typed expressions (typing.Any) are disallowed + "ANN201", # ANN201 Missing return type annotation for public function + "ANN202", # Missing return type annotation for private function + "ANN204", # Missing return type annotation for special method + "ANN401", # Dynamically typed expressions (typing.Any) are disallowed ] "infrahub_sdk/client.py" = [ ################################################################################################## # Review and change the below later # ################################################################################################## - "PLR0904", # Too many public methods + "PLR0904", # Too many public methods ] "infrahub_sdk/pytest_plugin/models.py" = [ - "S105", # 'PASS' is not a password but a state + "S105", # 'PASS' is not a password but a state ] @@ -342,10 +328,10 @@ max-complexity = 17 ################################################################################################## # Review and change the below later # ################################################################################################## - "ANN001", # Missing type annotation for function argument - "ANN201", # ANN201 Missing return type annotation for public function - "ANN202", # Missing return type annotation for private function - "ANN204", # Missing return type annotation for special method + "ANN001", # Missing type annotation for function argument + "ANN201", # ANN201 Missing return type annotation for public function + "ANN202", # Missing return type annotation for private function + "ANN204", # Missing return type annotation for special method ] "tests/unit/sdk/test_client.py" = [ From 799991990cbf6eabf88ef5da165ade3dbc14c185 Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Thu, 9 Jan 2025 12:55:31 +0100 Subject: [PATCH 2/3] Lint markdown --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cde19ccb..45684fa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,6 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang - Add the ability to batch API queries for `all` and `filter` functions. ([#159](https://github.com/opsmill/infrahub-sdk-python/issues/159)) - `client.all` and `client.filters` now support `order` parameter allowing to disable order of retrieve nodes in order to enhance performances - ## [1.4.1](https://github.com/opsmill/infrahub-sdk-python/tree/v1.3.0) - 2025-01-05 ### Fixed From 2f6b35024708e5c3e97bf3d76e2eea33a7b0202a Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Thu, 9 Jan 2025 14:52:38 +0100 Subject: [PATCH 3/3] Looks like it's 1.5.0 after all --- CHANGELOG.md | 2 +- pyproject.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45684fa9..dfe6e861 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang -## [1.4.2](https://github.com/opsmill/infrahub-sdk-python/tree/v1.4.2) - 2025-01-09 +## [1.5.0](https://github.com/opsmill/infrahub-sdk-python/tree/v1.5.0) - 2025-01-09 ### Added diff --git a/pyproject.toml b/pyproject.toml index 51fbc632..fe9c6a98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [project] name = "infrahub-sdk" -version = "1.4.2" +version = "1.5.0" requires-python = ">=3.9" [tool.poetry] name = "infrahub-sdk" -version = "1.4.2" +version = "1.5.0" description = "Python Client to interact with Infrahub" authors = ["OpsMill "] readme = "README.md"