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.
- vantage_python-0.3.0/.github/workflows/pypi-publish.yml +52 -0
- {vantage_python-0.2.0 → vantage_python-0.3.0}/.github/workflows/test.yml +11 -0
- vantage_python-0.3.0/.gitignore +7 -0
- {vantage_python-0.2.0 → vantage_python-0.3.0}/Makefile +7 -3
- {vantage_python-0.2.0 → vantage_python-0.3.0}/PKG-INFO +2 -2
- {vantage_python-0.2.0 → vantage_python-0.3.0}/README.md +1 -1
- {vantage_python-0.2.0 → vantage_python-0.3.0}/autogen.py +1 -1
- {vantage_python-0.2.0 → vantage_python-0.3.0}/pyproject.toml +1 -1
- vantage_python-0.3.0/src/vantage/_async/client.py +2675 -0
- vantage_python-0.3.0/src/vantage/_sync/client.py +2675 -0
- vantage_python-0.3.0/src/vantage/_types.py +1938 -0
- vantage_python-0.2.0/.github/workflows/pypi-publish.yml +0 -25
- vantage_python-0.2.0/.gitignore +0 -12
- {vantage_python-0.2.0 → vantage_python-0.3.0}/LICENSE +0 -0
- {vantage_python-0.2.0 → vantage_python-0.3.0}/src/vantage/__init__.py +0 -0
- {vantage_python-0.2.0 → vantage_python-0.3.0}/src/vantage/_async/__init__.py +0 -0
- {vantage_python-0.2.0 → vantage_python-0.3.0}/src/vantage/_base.py +0 -0
- {vantage_python-0.2.0 → vantage_python-0.3.0}/src/vantage/_sync/__init__.py +0 -0
- {vantage_python-0.2.0 → vantage_python-0.3.0}/src/vantage/py.typed +0 -0
- {vantage_python-0.2.0 → vantage_python-0.3.0}/tests/test_e2e.py +0 -0
|
@@ -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
|
|
@@ -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
|
-
|
|
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.
|
|
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
|
|
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
|
|
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", "
|
|
251
|
+
for code in ["200", "201", "202", "203"]:
|
|
252
252
|
if code not in responses:
|
|
253
253
|
continue
|
|
254
254
|
response = responses[code]
|