Skip to content

Commit f99a19e

Browse files
authored
Merge pull request #186 from opsmill/dga-20241230-rn-1.3
Prep for 1.3 and add release note
2 parents 8e560d6 + 97388b6 commit f99a19e

File tree

5 files changed

+47
-6
lines changed

5 files changed

+47
-6
lines changed

CHANGELOG.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,50 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang
1111

1212
<!-- towncrier release notes start -->
1313

14+
## [1.3.0](https://github.com/opsmill/infrahub-sdk-python/tree/v1.3.0) - 2024-12-30
15+
16+
### Added
17+
18+
#### Testing library (**Alpha**)
19+
20+
A new collection of tools and utilities to help with testing is available under `infrahub_sdk.testing`.
21+
22+
The first component available is a `TestInfrahubDockerClient`, a pytest Class designed to help creating integration tests based on Infrahub. See a simple example below to help you get started.
23+
24+
> the installation of `infrahub-testcontainers` is required
25+
26+
```python
27+
import pytest
28+
29+
from infrahub_sdk import InfrahubClient
30+
from infrahub_sdk.testing.docker import TestInfrahubDockerClient
31+
32+
class TestInfrahubNode(TestInfrahubDockerClient):
33+
34+
@pytest.fixture(scope="class")
35+
def infrahub_version(self) -> str:
36+
"""Required (for now) to define the version of infrahub to use."""
37+
return "1.0.10"
38+
39+
@pytest.fixture(scope="class")
40+
async def test_create_tag(self, default_branch: str, client: InfrahubClient) -> None:
41+
obj = await client.create(kind="BuiltinTag", name="Blue")
42+
await obj.save()
43+
assert obj.id
44+
```
45+
46+
### Changed
47+
48+
- The Pydantic models for the schema have been split into multiple versions to align better with the different phase of the lifecycle of the schema.
49+
- User input: includes only the options available for a user to define (NodeSchema, AttributeSchema, RelationshipSchema, GenericSchema)
50+
- API: Format of the schema as exposed by the API in infrahub with some read only settings (NodeSchemaAPI, AttributeSchemaAPI, RelationshipSchemaAPI, GenericSchemaAPI)
51+
52+
### Fixed
53+
54+
- Fix behaviour of attribute value coming from resource pools for async client ([#66](https://github.com/opsmill/infrahub-sdk-python/issues/66))
55+
- Convert import_root to a string if it was submitted as a Path object to ensure that anything added to sys.path is a string
56+
- Fix relative imports for the pytest plugin, note that the relative imports can't be at the top level of the repository alongside .infrahub.yml. They have to be located within a subfolder. ([#166](https://github.com/opsmill/infrahub-sdk-python/issues/166))
57+
1458
## [1.2.0](https://github.com/opsmill/infrahub-sdk-python/tree/v1.2.0) - 2024-12-19
1559

1660
### Added
@@ -60,7 +104,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang
60104

61105
### Removed
62106

63-
- Breaking change: Removed all exports from infrahub_sdk/__init__.py except InfrahubClient, InfrahubClientSync and Config. If you previously imported other classes such as InfrahubNode from the root level these need to change to instead be an absolute path.
107+
- Breaking change: Removed all exports from `infrahub_sdk/__init__.py` except InfrahubClient, InfrahubClientSync and Config. If you previously imported other classes such as InfrahubNode from the root level these need to change to instead be an absolute path.
64108

65109
### Added
66110

changelog/+513f19bc.fixed.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/166.fixed.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/66.fixed.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[project]
22
name = "infrahub-sdk"
3-
version = "1.2.0-dev0"
3+
version = "1.3.0"
44
requires-python = ">=3.9"
55

66
[tool.poetry]
77
name = "infrahub-sdk"
8-
version = "1.2.0"
8+
version = "1.3.0"
99
description = "Python Client to interact with Infrahub"
1010
authors = ["OpsMill <info@opsmill.com>"]
1111
readme = "README.md"

0 commit comments

Comments
 (0)