vantage-python 0.2.0__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,52 @@
1
+ name: Publish Package
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ id-token: write
10
+ contents: write
11
+
12
+ jobs:
13
+ check-if-tag:
14
+ name: Check if Tag is Present
15
+ runs-on: ubuntu-22.04
16
+ outputs:
17
+ TAG_NOT_PRESENT: ${{ steps.get-tag.outputs.TAG_NOT_PRESENT }}
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - name: Get the tag from Python and check if it's present
21
+ id: get-tag
22
+ run: |
23
+ pip install toml
24
+ VERSION=$(python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])")
25
+ if git tag -l "v$VERSION" | grep -q .; then
26
+ echo "Tag v$VERSION is present"
27
+ echo "TAG_NOT_PRESENT=false" >> $GITHUB_OUTPUT
28
+ else
29
+ echo "Tag v$VERSION is not present"
30
+ echo "TAG_NOT_PRESENT=true" >> $GITHUB_OUTPUT
31
+
32
+ git tag "v$VERSION"
33
+ git config user.name "github-actions[bot]"
34
+ git config user.email "github-actions[bot]@users.noreply.github.com"
35
+ git push origin "v$VERSION"
36
+ fi
37
+
38
+ publish:
39
+ name: Publish Package to PyPI
40
+ runs-on: ubuntu-22.04
41
+ needs: check-if-tag
42
+ if: needs.check-if-tag.outputs.TAG_NOT_PRESENT == 'true'
43
+ steps:
44
+ - uses: actions/checkout@v4
45
+ - uses: actions/setup-python@v5
46
+ with:
47
+ python-version: "3.14"
48
+ - run: pip install build twine
49
+ - run: pip install -e ".[dev]"
50
+ - run: python -m build
51
+ - name: Publish release distributions to PyPI
52
+ uses: pypa/gh-action-pypi-publish@v1.13.0
@@ -34,3 +34,14 @@ jobs:
34
34
  - run: pip install -e ".[dev]"
35
35
  - run: python autogen.py
36
36
  - run: python -c "from vantage import Client, AsyncClient"
37
+
38
+ compare-to-api:
39
+ name: Compare to API
40
+ runs-on: ubuntu-22.04
41
+ steps:
42
+ - uses: actions/checkout@v4
43
+ - uses: actions/setup-python@v5
44
+ with:
45
+ python-version: "3.14"
46
+ - run: pip install -e ".[dev]"
47
+ - run: make diff
@@ -0,0 +1,7 @@
1
+ # Python specific
2
+ __pycache__/
3
+ dist/
4
+ build/
5
+ *.egg-info/
6
+ .pytest_cache/
7
+ .venv/
@@ -1,10 +1,14 @@
1
- .PHONY: install publish
1
+ .PHONY: install generate diff publish
2
2
 
3
3
  install:
4
- python3 autogen.py
5
4
  python3 -m pip install -e ".[dev]"
6
5
 
7
- publish:
6
+ generate:
8
7
  python3 autogen.py
8
+
9
+ diff: generate
10
+ git diff --exit-code src/vantage
11
+
12
+ publish:
9
13
  python3 -m build
10
14
  twine upload dist/*
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vantage-python
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Python SDK for the Vantage API
5
5
  Project-URL: Homepage, https://github.com/vantage-sh/vantage-python
6
6
  Project-URL: Repository, https://github.com/vantage-sh/vantage-python
@@ -96,7 +96,7 @@ except VantageAPIError as e:
96
96
  make install
97
97
  ```
98
98
 
99
- This fetches the latest OpenAPI schema from the Vantage API and generates Pydantic models, sync client, and async client. Your pip version will need to be up to date for this.
99
+ This generates Pydantic models, sync client, and the async client. Your pip version will need to be up to date for this. If you wish to generate the client first, you should use `make generate`.
100
100
 
101
101
  ### Testing
102
102
 
@@ -75,7 +75,7 @@ except VantageAPIError as e:
75
75
  make install
76
76
  ```
77
77
 
78
- This fetches the latest OpenAPI schema from the Vantage API and generates Pydantic models, sync client, and async client. Your pip version will need to be up to date for this.
78
+ This generates Pydantic models, sync client, and the async client. Your pip version will need to be up to date for this. If you wish to generate the client first, you should use `make generate`.
79
79
 
80
80
  ### Testing
81
81
 
@@ -248,7 +248,7 @@ def extract_response_type(
248
248
  responses: dict[str, Any], schemas: dict[str, Any]
249
249
  ) -> str | None:
250
250
  """Extract successful response type."""
251
- for code in ["200", "201", "202", "204"]:
251
+ for code in ["200", "201", "202", "203"]:
252
252
  if code not in responses:
253
253
  continue
254
254
  response = responses[code]
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "vantage-python"
7
- version = "0.2.0"
7
+ version = "0.3.0"
8
8
  description = "Python SDK for the Vantage API"
9
9
  readme = "README.md"
10
10
  license = "MIT"