amigo_sdk 0.9.0__tar.gz → 0.10.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.
Potentially problematic release.
This version of amigo_sdk might be problematic. Click here for more details.
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/.github/workflows/auto-release.yml +12 -10
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/.github/workflows/release.yml +12 -7
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/.gitignore +4 -1
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/PKG-INFO +1 -1
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/specs/openapi-baseline.json +1 -1
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/src/amigo_sdk/__init__.py +1 -1
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/src/amigo_sdk/generated/model.py +15 -9
- amigo_sdk-0.9.0/openapi-new.json +0 -1
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/.github/workflows/test.yml +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/CONTRIBUTING.md +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/LICENSE +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/README.md +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/pyproject.toml +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/scripts/__init__.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/scripts/aliases.json +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/scripts/check.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/scripts/gen_models.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/src/amigo_sdk/_retry_utils.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/src/amigo_sdk/auth.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/src/amigo_sdk/config.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/src/amigo_sdk/errors.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/src/amigo_sdk/http_client.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/src/amigo_sdk/resources/conversation.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/src/amigo_sdk/resources/organization.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/src/amigo_sdk/resources/service.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/src/amigo_sdk/resources/user.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/src/amigo_sdk/sdk_client.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/__init__.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/conftest.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/integration/test_conversation_integration.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/integration/test_organization_integration.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/integration/test_user_integration.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/resources/__init__.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/resources/helpers.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/resources/test_conversation.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/resources/test_organization.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/resources/test_service.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/resources/test_user.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/test_auth.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/test_config.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/test_errors.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/test_http_client.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/test_retry_utils.py +0 -0
- {amigo_sdk-0.9.0 → amigo_sdk-0.10.0}/tests/test_sdk_client.py +0 -0
|
@@ -30,7 +30,9 @@ jobs:
|
|
|
30
30
|
echo "spec_url=$SPEC_URL" >> $GITHUB_OUTPUT
|
|
31
31
|
|
|
32
32
|
- name: Fetch current production spec
|
|
33
|
-
run:
|
|
33
|
+
run: |
|
|
34
|
+
mkdir -p specs
|
|
35
|
+
curl -fSL -o specs/openapi-new.json "${{ steps.spec.outputs.spec_url }}"
|
|
34
36
|
|
|
35
37
|
- name: Check baseline presence
|
|
36
38
|
id: baseline
|
|
@@ -46,7 +48,7 @@ jobs:
|
|
|
46
48
|
run: |
|
|
47
49
|
mkdir -p specs
|
|
48
50
|
if [ ! -f specs/openapi-baseline.json ]; then
|
|
49
|
-
cp openapi-new.json specs/openapi-baseline.json
|
|
51
|
+
cp specs/openapi-new.json specs/openapi-baseline.json
|
|
50
52
|
fi
|
|
51
53
|
|
|
52
54
|
- name: Diagnostics (spec and baseline)
|
|
@@ -71,7 +73,7 @@ jobs:
|
|
|
71
73
|
with_entries(.value |= sort_deep)
|
|
72
74
|
else . end;
|
|
73
75
|
(del(.info) | del(.servers)) | sort_deep
|
|
74
|
-
' openapi-new.json > new.norm.json
|
|
76
|
+
' specs/openapi-new.json > new.norm.json
|
|
75
77
|
if [ -f baseline.norm.json ]; then
|
|
76
78
|
echo "BASELINE_NORM_SHA=$(sha256sum baseline.norm.json | awk '{print $1}')"
|
|
77
79
|
else
|
|
@@ -99,10 +101,10 @@ jobs:
|
|
|
99
101
|
BASELINE_PATHS_COUNT=0
|
|
100
102
|
BASELINE_SCHEMAS_COUNT=0
|
|
101
103
|
fi
|
|
102
|
-
NEW_PATHS_SHA=$(jq -cS '(.paths // {})' openapi-new.json | sha256sum | awk '{print $1}')
|
|
103
|
-
NEW_SCHEMAS_SHA=$(jq -cS '(.components.schemas // {})' openapi-new.json | sha256sum | awk '{print $1}')
|
|
104
|
-
NEW_PATHS_COUNT=$(jq -r '(.paths // {}) | keys | length' openapi-new.json)
|
|
105
|
-
NEW_SCHEMAS_COUNT=$(jq -r '(.components.schemas // {}) | keys | length' openapi-new.json)
|
|
104
|
+
NEW_PATHS_SHA=$(jq -cS '(.paths // {})' specs/openapi-new.json | sha256sum | awk '{print $1}')
|
|
105
|
+
NEW_SCHEMAS_SHA=$(jq -cS '(.components.schemas // {})' specs/openapi-new.json | sha256sum | awk '{print $1}')
|
|
106
|
+
NEW_PATHS_COUNT=$(jq -r '(.paths // {}) | keys | length' specs/openapi-new.json)
|
|
107
|
+
NEW_SCHEMAS_COUNT=$(jq -r '(.components.schemas // {}) | keys | length' specs/openapi-new.json)
|
|
106
108
|
echo "BASELINE paths: count=$BASELINE_PATHS_COUNT sha=$BASELINE_PATHS_SHA"
|
|
107
109
|
echo "NEW paths: count=$NEW_PATHS_COUNT sha=$NEW_PATHS_SHA"
|
|
108
110
|
echo "BASELINE schemas: count=$BASELINE_SCHEMAS_COUNT sha=$BASELINE_SCHEMAS_SHA"
|
|
@@ -114,7 +116,7 @@ jobs:
|
|
|
114
116
|
else
|
|
115
117
|
: > baseline.paths.txt
|
|
116
118
|
fi
|
|
117
|
-
jq -r '(.paths // {}) | keys | sort[]' openapi-new.json > new.paths.txt
|
|
119
|
+
jq -r '(.paths // {}) | keys | sort[]' specs/openapi-new.json > new.paths.txt
|
|
118
120
|
echo "Removed paths (in baseline, not in new):"; comm -23 baseline.paths.txt new.paths.txt || true
|
|
119
121
|
echo "Added paths (in new, not in baseline):"; comm -13 baseline.paths.txt new.paths.txt || true
|
|
120
122
|
|
|
@@ -124,7 +126,7 @@ jobs:
|
|
|
124
126
|
else
|
|
125
127
|
: > baseline.schemas.txt
|
|
126
128
|
fi
|
|
127
|
-
jq -r '(.components.schemas // {}) | keys | sort[]' openapi-new.json > new.schemas.txt
|
|
129
|
+
jq -r '(.components.schemas // {}) | keys | sort[]' specs/openapi-new.json > new.schemas.txt
|
|
128
130
|
echo "Removed schemas (in baseline, not in new):"; comm -23 baseline.schemas.txt new.schemas.txt || true
|
|
129
131
|
echo "Added schemas (in new, not in baseline):"; comm -13 baseline.schemas.txt new.schemas.txt || true
|
|
130
132
|
|
|
@@ -152,7 +154,7 @@ jobs:
|
|
|
152
154
|
with_entries(.value |= sort_deep)
|
|
153
155
|
else . end;
|
|
154
156
|
(del(.info) | del(.servers)) | sort_deep
|
|
155
|
-
' openapi-new.json > new.norm.json
|
|
157
|
+
' specs/openapi-new.json > new.norm.json
|
|
156
158
|
if diff -q baseline.norm.json new.norm.json >/dev/null 2>&1; then
|
|
157
159
|
echo "changed=false" >> $GITHUB_OUTPUT
|
|
158
160
|
else
|
|
@@ -51,13 +51,20 @@ jobs:
|
|
|
51
51
|
needs: test
|
|
52
52
|
|
|
53
53
|
steps:
|
|
54
|
+
- name: Create GitHub App token (release-bot)
|
|
55
|
+
id: app-token
|
|
56
|
+
uses: actions/create-github-app-token@v2
|
|
57
|
+
with:
|
|
58
|
+
app-id: ${{ secrets.RELEASE_BOT_APP_ID }}
|
|
59
|
+
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
|
|
60
|
+
|
|
54
61
|
- name: Checkout code
|
|
55
62
|
uses: actions/checkout@v4
|
|
56
63
|
with:
|
|
57
64
|
# Fetch full history for version tagging
|
|
58
65
|
fetch-depth: 0
|
|
59
66
|
# Use a token that can push tags and create releases
|
|
60
|
-
token: ${{
|
|
67
|
+
token: ${{ steps.app-token.outputs.token }}
|
|
61
68
|
|
|
62
69
|
- name: Ensure jq
|
|
63
70
|
run: sudo apt-get update && sudo apt-get install -y jq
|
|
@@ -69,13 +76,11 @@ jobs:
|
|
|
69
76
|
if [ -z "$SPEC_URL" ]; then
|
|
70
77
|
SPEC_URL="https://api.amigo.ai/v1/openapi.json"
|
|
71
78
|
fi
|
|
72
|
-
curl -fSL -o openapi-new.json "$SPEC_URL"
|
|
73
79
|
mkdir -p specs
|
|
74
|
-
|
|
80
|
+
curl -fSL -o specs/openapi-new.json "$SPEC_URL"
|
|
81
|
+
cp specs/openapi-new.json specs/openapi-baseline.json
|
|
75
82
|
|
|
76
|
-
#
|
|
77
|
-
- name: Set spec path for generator
|
|
78
|
-
run: echo "OPENAPI_SPEC_PATH=$GITHUB_WORKSPACE/openapi-new.json" >> $GITHUB_ENV
|
|
83
|
+
# Generator always fetches remote; no local spec path needed
|
|
79
84
|
|
|
80
85
|
- name: Setup Python
|
|
81
86
|
uses: actions/setup-python@v5
|
|
@@ -152,7 +157,7 @@ jobs:
|
|
|
152
157
|
if: ${{ !inputs.dry_run }}
|
|
153
158
|
uses: actions/create-release@v1
|
|
154
159
|
env:
|
|
155
|
-
GITHUB_TOKEN: ${{
|
|
160
|
+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
156
161
|
with:
|
|
157
162
|
tag_name: "v${{ steps.new_version.outputs.version }}"
|
|
158
163
|
release_name: "Release v${{ steps.new_version.outputs.version }}"
|