Skip to content

Commit 93094cf

Browse files
authored
Merge pull request #117 from opsmill/prep-release-1.0.0
Prep release 1.0.0
2 parents 8bd0832 + 7a47662 commit 93094cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2144
-8433
lines changed

.github/file-filters.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ ci_config: &ci_config
33
- ".github/workflows/ci.yml"
44
- ".github/file-filters.yml"
55

6+
coverage_config: &coverage_config
7+
- "codecov.yml"
8+
69
github_workflows: &github_workflows
710
- ".github/workflows/*.yml"
811

@@ -20,6 +23,8 @@ doc_files: &doc_files
2023
python_all: &python_all
2124
- "**/*.py"
2225
- *poetry_files
26+
- *ci_config
27+
- *coverage_config
2328

2429
yaml_all: &yaml_all
2530
- "**/*.{yml,yaml}"

.github/workflows/ci.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
- name: "Check out repository code"
7676
uses: "actions/checkout@v4"
7777
- name: "Setup environment"
78-
run: "pip install ruff==0.5.0"
78+
run: "pip install ruff==0.7.1"
7979
- name: "Linting: ruff check"
8080
run: "ruff check ."
8181
- name: "Linting: ruff format"
@@ -142,12 +142,31 @@ jobs:
142142
run: |
143143
pipx install poetry
144144
poetry config virtualenvs.prefer-active-python true
145-
pip install invoke toml
145+
pip install invoke toml codecov
146146
- name: "Install Package"
147147
run: "poetry install --all-extras"
148148
- name: "Mypy Tests"
149149
run: "poetry run mypy --show-error-codes infrahub_sdk/"
150150
# - name: "Pylint Tests"
151151
# run: "poetry run pylint infrahub_sdk/"
152152
- name: "Unit Tests"
153-
run: "poetry run pytest tests/unit/"
153+
run: "poetry run pytest --cov infrahub_sdk tests/unit/"
154+
- name: "Upload coverage to Codecov"
155+
run: |
156+
codecov --flags python-${{ matrix.python-version }}
157+
env:
158+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
159+
160+
# The pytest-cov plugin doesn't quite work with content that is
161+
# auto-imported by our own infrahub pytest plugin, this workaround
162+
# reports the missing lines
163+
- name: "Report coverage for pytest-plugin"
164+
if: matrix.python-version == '3.12'
165+
run: |
166+
source $(poetry env info --path)/bin/activate
167+
coverage run --source=infrahub_sdk -m pytest tests/unit/pytest_plugin
168+
coverage report -m
169+
coverage xml
170+
codecov --flags python-filler-${{ matrix.python-version }}
171+
env:
172+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.yamllint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ extends: default
44
ignore: |
55
/.venv
66
/examples
7+
tests/unit/sdk/test_data/schema_encoding_error.yml
78
89
rules:
910
new-lines: disable

changelog/+8dff6891.removed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
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.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Changed the default connection timeout in the SDK to 60s.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added `infrahubctl menu` command to load menu definitions into Infrahub
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixes an issue where InfrahubClient was not properly URL encoding URL parameters.

changelog/102.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CTL: Return friendly error on encoding violations when reading files.

changelog/25.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add support for specific timeout per request on InfrahubClient and InfrahubNode function calls.

changelog/64.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix SDK playback hash generation to read the correct filename

0 commit comments

Comments
 (0)