mockstack 0.12.0__tar.gz → 0.12.1__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.
- {mockstack-0.12.0 → mockstack-0.12.1}/.github/workflows/ci.yml +3 -7
- {mockstack-0.12.0 → mockstack-0.12.1}/.github/workflows/publish-docs.yml +3 -3
- {mockstack-0.12.0 → mockstack-0.12.1}/.github/workflows/publish-to-pypi.yml +6 -6
- mockstack-0.12.1/.github/workflows/smoke-test-pypi.yml +83 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/PKG-INFO +1 -1
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack.egg-info/PKG-INFO +1 -1
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack.egg-info/SOURCES.txt +1 -0
- mockstack-0.12.1/uv.lock +2030 -0
- mockstack-0.12.0/uv.lock +0 -1535
- {mockstack-0.12.0 → mockstack-0.12.1}/.dockerignore +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/.env.example +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/.gitignore +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/.pre-commit-config.yaml +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/CODE_OF_CONDUCT.md +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/CONTRIBUTING.md +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/Dockerfile +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/LICENSE +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/README.md +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/SECURITY.md +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/docker-entrypoint.sh +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/docs/assets/favicon.ico +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/docs/assets/logo.png +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/docs/assets/mockstack.png +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/docs/configuration.md +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/docs/ollama.md +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/docs/strategies/base.md +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/docs/strategies/filefixtures.md +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/docs/strategies/proxyrules.md +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/examples/filefixtures-with-templates/.env.example +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/examples/filefixtures-with-templates/README.md +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/examples/filefixtures-with-templates/templates/servicename-api-v1-items.j2 +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/examples/filefixtures-with-templates/templates/servicename2-api-v2-user.533ec889-7c68-45c8-b21e-4a7e455d1234.j2 +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/examples/llm/README.md +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/examples/llm/mockstack-langchain-example.ipynb +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/examples/llm/templates/ollama-openai-v1-chat-completions.j2 +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/examples/llm/templates/openai-v1-chat-completions.j2 +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/examples/llm/templates/openai-v1-deployments-gpt-4o-chat-completions.j2 +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/examples/proxyrules-with-rules-file/.env.example +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/examples/proxyrules-with-rules-file/README.md +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/examples/proxyrules-with-rules-file/rules.yml +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mkdocs.yml +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/__init__.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/config.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/constants.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/display.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/exceptions.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/identifiers.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/intent.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/lifespan.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/llm/__init__.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/llm/ollama.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/main.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/middleware.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/routers/__init__.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/routers/catchall.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/routers/homepage.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/rules.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/strategies/__init__.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/strategies/base.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/strategies/create_mixin.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/strategies/factory.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/strategies/filefixtures.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/strategies/proxyrules.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/telemetry.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/templating.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/__init__.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/conftest.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/fixtures/__init__.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/fixtures/proxyrules.yml +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/fixtures/templates/__init__.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/fixtures/templates/example-template.j2 +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/llm/__init__.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/llm/test_ollama.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/routers/__init__.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/routers/test_catchall.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/routers/test_homepage.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/strategies/__init__.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/strategies/test_create_mixin.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/strategies/test_filefixtures.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/strategies/test_proxyrules.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/test_display.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/test_identifiers.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/test_intent.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/test_middleware.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/test_rules.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/test_telemetry.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack/tests/test_templating.py +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack.egg-info/dependency_links.txt +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack.egg-info/entry_points.txt +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack.egg-info/requires.txt +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/mockstack.egg-info/top_level.txt +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/pyproject.toml +0 -0
- {mockstack-0.12.0 → mockstack-0.12.1}/setup.cfg +0 -0
|
@@ -23,20 +23,16 @@ jobs:
|
|
|
23
23
|
python-version: ["3.11", "3.12", "3.13"]
|
|
24
24
|
|
|
25
25
|
steps:
|
|
26
|
-
- uses: actions/checkout@
|
|
26
|
+
- uses: actions/checkout@v6
|
|
27
27
|
- name: Install uv and set the python version
|
|
28
|
-
uses: astral-sh/setup-uv@
|
|
28
|
+
uses: astral-sh/setup-uv@v8.1.0
|
|
29
29
|
with:
|
|
30
30
|
python-version: ${{ matrix.python-version }}
|
|
31
31
|
version: "latest"
|
|
32
32
|
- name: Install ruff
|
|
33
|
-
uses: astral-sh/ruff-action@
|
|
33
|
+
uses: astral-sh/ruff-action@v4.0.0
|
|
34
34
|
with:
|
|
35
35
|
version: "latest"
|
|
36
|
-
- name: Set up Python ${{ matrix.python-version }}
|
|
37
|
-
uses: actions/setup-python@v3
|
|
38
|
-
with:
|
|
39
|
-
python-version: ${{ matrix.python-version }}
|
|
40
36
|
- name: Install the project
|
|
41
37
|
run: uv sync --all-extras --dev
|
|
42
38
|
- name: Run ruff lint and formatting checks
|
|
@@ -13,16 +13,16 @@ jobs:
|
|
|
13
13
|
deploy:
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
15
|
steps:
|
|
16
|
-
- uses: actions/checkout@
|
|
16
|
+
- uses: actions/checkout@v6
|
|
17
17
|
- name: Configure Git Credentials
|
|
18
18
|
run: |
|
|
19
19
|
git config --global user.name "${GITHUB_ACTOR}"
|
|
20
20
|
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
|
|
21
|
-
- uses: actions/setup-python@
|
|
21
|
+
- uses: actions/setup-python@v6
|
|
22
22
|
with:
|
|
23
23
|
python-version: 3.x
|
|
24
24
|
- run: echo "cache_id=$(date --utc '+%V')" >> "${GITHUB_ENV}"
|
|
25
|
-
- uses: actions/cache@
|
|
25
|
+
- uses: actions/cache@v5
|
|
26
26
|
with:
|
|
27
27
|
key: mkdocs-material-${{ env.cache_id }}
|
|
28
28
|
path: .cache
|
|
@@ -10,11 +10,11 @@ jobs:
|
|
|
10
10
|
build:
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
steps:
|
|
13
|
-
- uses: actions/checkout@
|
|
13
|
+
- uses: actions/checkout@v6
|
|
14
14
|
with:
|
|
15
15
|
persist-credentials: false
|
|
16
16
|
- name: Set up Python
|
|
17
|
-
uses: actions/setup-python@
|
|
17
|
+
uses: actions/setup-python@v6
|
|
18
18
|
with:
|
|
19
19
|
python-version: "3.x"
|
|
20
20
|
- name: Install pypa/build
|
|
@@ -23,7 +23,7 @@ jobs:
|
|
|
23
23
|
- name: Build a binary wheel and a source tarball
|
|
24
24
|
run: python3 -m build
|
|
25
25
|
- name: Store the distribution packages
|
|
26
|
-
uses: actions/upload-artifact@
|
|
26
|
+
uses: actions/upload-artifact@v7
|
|
27
27
|
with:
|
|
28
28
|
name: python-package-distributions
|
|
29
29
|
path: dist/
|
|
@@ -42,7 +42,7 @@ jobs:
|
|
|
42
42
|
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
43
43
|
steps:
|
|
44
44
|
- name: Download all the dists
|
|
45
|
-
uses: actions/download-artifact@
|
|
45
|
+
uses: actions/download-artifact@v8
|
|
46
46
|
with:
|
|
47
47
|
name: python-package-distributions
|
|
48
48
|
path: dist/
|
|
@@ -62,7 +62,7 @@ jobs:
|
|
|
62
62
|
id-token: write # IMPORTANT: mandatory for sigstore
|
|
63
63
|
steps:
|
|
64
64
|
- name: Download all the dists
|
|
65
|
-
uses: actions/download-artifact@
|
|
65
|
+
uses: actions/download-artifact@v8
|
|
66
66
|
with:
|
|
67
67
|
name: python-package-distributions
|
|
68
68
|
path: dist/
|
|
@@ -98,7 +98,7 @@ jobs:
|
|
|
98
98
|
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
99
99
|
steps:
|
|
100
100
|
- name: Download all the dists
|
|
101
|
-
uses: actions/download-artifact@
|
|
101
|
+
uses: actions/download-artifact@v8
|
|
102
102
|
with:
|
|
103
103
|
name: python-package-distributions
|
|
104
104
|
path: dist/
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Weekly smoke test that installs mockstack from PyPI without the lock file
|
|
2
|
+
# and boots the server. Catches breaking changes in transitive dependencies
|
|
3
|
+
# (fastapi, starlette, uvicorn, pydantic, ...) that would otherwise only
|
|
4
|
+
# surface when end-users run `uvx mockstack`.
|
|
5
|
+
|
|
6
|
+
name: Smoke Test (PyPI, latest deps)
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
schedule:
|
|
13
|
+
# Mondays at 06:17 UTC. Off-the-hour to avoid GH-Actions cron congestion.
|
|
14
|
+
- cron: '17 6 * * 1'
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
smoke-test:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
24
|
+
steps:
|
|
25
|
+
- name: Install uv with Python ${{ matrix.python-version }}
|
|
26
|
+
uses: astral-sh/setup-uv@v8.1.0
|
|
27
|
+
with:
|
|
28
|
+
python-version: ${{ matrix.python-version }}
|
|
29
|
+
version: "latest"
|
|
30
|
+
# We don't `actions/checkout` (the smoke test installs from PyPI),
|
|
31
|
+
# so silence setup-uv's empty-workdir + no-lock-to-cache warnings.
|
|
32
|
+
ignore-empty-workdir: true
|
|
33
|
+
enable-cache: false
|
|
34
|
+
|
|
35
|
+
- name: Show resolved dependency versions
|
|
36
|
+
run: |
|
|
37
|
+
set -euo pipefail
|
|
38
|
+
uvx --from mockstack python -c \
|
|
39
|
+
"import fastapi, starlette, uvicorn, pydantic; \
|
|
40
|
+
print(f'fastapi={fastapi.__version__}'); \
|
|
41
|
+
print(f'starlette={starlette.__version__}'); \
|
|
42
|
+
print(f'uvicorn={uvicorn.__version__}'); \
|
|
43
|
+
print(f'pydantic={pydantic.__version__}')"
|
|
44
|
+
|
|
45
|
+
- name: Boot mockstack and probe HTTP
|
|
46
|
+
run: |
|
|
47
|
+
set -euo pipefail
|
|
48
|
+
mkdir -p /tmp/mockstack-templates
|
|
49
|
+
uvx mockstack --templates-dir /tmp/mockstack-templates --port 18999 \
|
|
50
|
+
> server.log 2>&1 &
|
|
51
|
+
SERVER_PID=$!
|
|
52
|
+
echo "started mockstack pid=$SERVER_PID"
|
|
53
|
+
|
|
54
|
+
# Poll for readiness for up to 30s. /openapi.json is served by FastAPI
|
|
55
|
+
# itself, so a 200 here proves import + app construction + uvicorn boot
|
|
56
|
+
# + HTTP serving are all healthy end-to-end.
|
|
57
|
+
for i in $(seq 1 30); do
|
|
58
|
+
if curl -fsS http://127.0.0.1:18999/openapi.json -o /dev/null; then
|
|
59
|
+
echo "ready after ${i}s"
|
|
60
|
+
READY=1
|
|
61
|
+
break
|
|
62
|
+
fi
|
|
63
|
+
if ! kill -0 "$SERVER_PID" 2>/dev/null; then
|
|
64
|
+
echo "server died before becoming ready; logs:"
|
|
65
|
+
cat server.log
|
|
66
|
+
exit 1
|
|
67
|
+
fi
|
|
68
|
+
sleep 1
|
|
69
|
+
done
|
|
70
|
+
|
|
71
|
+
if [ "${READY:-0}" != "1" ]; then
|
|
72
|
+
echo "server never became ready; logs:"
|
|
73
|
+
cat server.log
|
|
74
|
+
kill "$SERVER_PID" 2>/dev/null || true
|
|
75
|
+
exit 1
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
# Final assertion + capture status
|
|
79
|
+
curl -fsS http://127.0.0.1:18999/openapi.json -o /dev/null
|
|
80
|
+
echo "smoke test passed"
|
|
81
|
+
|
|
82
|
+
kill "$SERVER_PID" 2>/dev/null || true
|
|
83
|
+
wait "$SERVER_PID" 2>/dev/null || true
|