src-py-lib 0.1.2__tar.gz → 0.1.3__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.
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/.github/workflows/release.yml +28 -19
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/.github/workflows/validate.yml +20 -9
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/PKG-INFO +1 -1
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/pyproject.toml +1 -1
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/uv.lock +1 -1
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/.github/workflows/ci.yml +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/.gitignore +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/.markdownlint-cli2.yaml +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/.python-version +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/AGENTS.md +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/LICENSE +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/README.md +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/SECURITY.md +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/renovate.json +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/__init__.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/clients/__init__.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/clients/github.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/clients/google_sheets.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/clients/graphql.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/clients/linear.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/clients/one_password.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/clients/slack.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/clients/sourcegraph.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/py.typed +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/utils/__init__.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/utils/config.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/utils/http.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/utils/json_cache.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/utils/json_types.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/utils/logging.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/src/src_py_lib/utils/tsv.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/tests/test_import.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/tests/test_logging_http_clients.py +0 -0
- {src_py_lib-0.1.2 → src_py_lib-0.1.3}/tests/test_tsv.py +0 -0
|
@@ -28,10 +28,10 @@ jobs:
|
|
|
28
28
|
uses: ./.github/workflows/validate.yml
|
|
29
29
|
with:
|
|
30
30
|
ref: ${{ github.event.inputs.tag || github.ref }}
|
|
31
|
+
build-package: false
|
|
31
32
|
|
|
32
33
|
wheel:
|
|
33
34
|
name: Build wheel
|
|
34
|
-
needs: validate
|
|
35
35
|
runs-on: ubuntu-24.04
|
|
36
36
|
env:
|
|
37
37
|
IMPORT_NAME: src_py_lib
|
|
@@ -53,7 +53,7 @@ jobs:
|
|
|
53
53
|
cache: pip
|
|
54
54
|
|
|
55
55
|
- name: Cache uv
|
|
56
|
-
uses: actions/cache@
|
|
56
|
+
uses: actions/cache@v5
|
|
57
57
|
with:
|
|
58
58
|
path: ~/.cache/uv
|
|
59
59
|
key: uv-${{ runner.os }}-py${{ env.PYTHON_VERSION }}-${{ hashFiles('uv.lock') }}
|
|
@@ -61,9 +61,7 @@ jobs:
|
|
|
61
61
|
uv-${{ runner.os }}-py${{ env.PYTHON_VERSION }}-
|
|
62
62
|
|
|
63
63
|
- name: Install build tools
|
|
64
|
-
run:
|
|
65
|
-
python -m pip install --upgrade pip
|
|
66
|
-
python -m pip install "uv==${UV_VERSION}"
|
|
64
|
+
run: python -m pip install "uv==${UV_VERSION}"
|
|
67
65
|
|
|
68
66
|
- name: Validate release inputs
|
|
69
67
|
id: release
|
|
@@ -145,7 +143,6 @@ jobs:
|
|
|
145
143
|
run: |
|
|
146
144
|
python -m venv build/release/install-venv
|
|
147
145
|
. build/release/install-venv/bin/activate
|
|
148
|
-
python -m pip install --upgrade pip
|
|
149
146
|
python -m pip install "${{ steps.build.outputs.wheel_path }}"
|
|
150
147
|
python - <<'PY'
|
|
151
148
|
import os
|
|
@@ -213,22 +210,34 @@ jobs:
|
|
|
213
210
|
${{ steps.build.outputs.wheel_path }}
|
|
214
211
|
${{ steps.build.outputs.source_distribution_path }}
|
|
215
212
|
|
|
213
|
+
github-release:
|
|
214
|
+
name: Publish GitHub release assets
|
|
215
|
+
needs: [validate, wheel]
|
|
216
|
+
runs-on: ubuntu-24.04
|
|
217
|
+
|
|
218
|
+
steps:
|
|
219
|
+
- name: Download release assets
|
|
220
|
+
uses: actions/download-artifact@v7
|
|
221
|
+
with:
|
|
222
|
+
name: src-py-lib-release
|
|
223
|
+
path: release-assets
|
|
224
|
+
|
|
216
225
|
- name: Publish GitHub release assets
|
|
217
226
|
env:
|
|
218
227
|
GH_TOKEN: ${{ github.token }}
|
|
219
228
|
run: |
|
|
220
|
-
release_tag="${{
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
"
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
release_tag="${{ github.event.inputs.tag || github.ref_name }}"
|
|
230
|
+
notes_path="$(find release-assets -name release-notes.md -print -quit)"
|
|
231
|
+
mapfile -t release_assets < <(find release-assets -type f ! -name release-notes.md | sort)
|
|
232
|
+
|
|
233
|
+
if [[ -z "${notes_path}" ]]; then
|
|
234
|
+
echo "::error title=Missing release notes::release-notes.md was not found in release artifact."
|
|
235
|
+
exit 1
|
|
236
|
+
fi
|
|
237
|
+
if [[ "${#release_assets[@]}" -eq 0 ]]; then
|
|
238
|
+
echo "::error title=Missing release assets::No release assets were downloaded."
|
|
239
|
+
exit 1
|
|
240
|
+
fi
|
|
232
241
|
|
|
233
242
|
if gh release view "${release_tag}" >/dev/null 2>&1; then
|
|
234
243
|
gh release edit "${release_tag}" --title "${release_tag}" --notes-file "${notes_path}"
|
|
@@ -243,7 +252,7 @@ jobs:
|
|
|
243
252
|
|
|
244
253
|
pypi:
|
|
245
254
|
name: Publish PyPI package
|
|
246
|
-
needs: wheel
|
|
255
|
+
needs: [validate, wheel]
|
|
247
256
|
runs-on: ubuntu-24.04
|
|
248
257
|
permissions:
|
|
249
258
|
contents: read
|
|
@@ -7,6 +7,11 @@ on:
|
|
|
7
7
|
description: "Git ref to validate. Defaults to the caller's ref."
|
|
8
8
|
required: false
|
|
9
9
|
type: string
|
|
10
|
+
build-package:
|
|
11
|
+
description: "Build and smoke-test package artifacts. Release builds do this separately."
|
|
12
|
+
required: false
|
|
13
|
+
type: boolean
|
|
14
|
+
default: true
|
|
10
15
|
|
|
11
16
|
permissions:
|
|
12
17
|
contents: read
|
|
@@ -35,7 +40,7 @@ jobs:
|
|
|
35
40
|
|
|
36
41
|
- name: Cache actionlint
|
|
37
42
|
id: cache-actionlint
|
|
38
|
-
uses: actions/cache@
|
|
43
|
+
uses: actions/cache@v5
|
|
39
44
|
with:
|
|
40
45
|
path: ~/.local/bin/actionlint
|
|
41
46
|
key: actionlint-${{ runner.os }}-${{ runner.arch }}-${{ env.ACTIONLINT_VERSION }}
|
|
@@ -44,15 +49,22 @@ jobs:
|
|
|
44
49
|
if: steps.cache-actionlint.outputs.cache-hit != 'true'
|
|
45
50
|
run: |
|
|
46
51
|
mkdir -p "${HOME}/.local/bin"
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
asset="actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz"
|
|
53
|
+
checksums="actionlint_${ACTIONLINT_VERSION}_checksums.txt"
|
|
54
|
+
base_url="https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}"
|
|
55
|
+
|
|
56
|
+
curl -fsSLO "${base_url}/${asset}"
|
|
57
|
+
curl -fsSLO "${base_url}/${checksums}"
|
|
58
|
+
grep " ${asset}$" "${checksums}" | sha256sum --check
|
|
59
|
+
tar -xzf "${asset}" -C "${HOME}/.local/bin" actionlint
|
|
60
|
+
chmod 0755 "${HOME}/.local/bin/actionlint"
|
|
49
61
|
|
|
50
62
|
- name: Lint GitHub Actions
|
|
51
63
|
run: |
|
|
52
64
|
"${HOME}/.local/bin/actionlint"
|
|
53
65
|
|
|
54
66
|
- name: Cache npm
|
|
55
|
-
uses: actions/cache@
|
|
67
|
+
uses: actions/cache@v5
|
|
56
68
|
with:
|
|
57
69
|
path: ~/.npm
|
|
58
70
|
key: npm-${{ runner.os }}-markdownlint-cli2-${{ env.MARKDOWNLINT_CLI2_VERSION }}
|
|
@@ -67,7 +79,7 @@ jobs:
|
|
|
67
79
|
cache: pip
|
|
68
80
|
|
|
69
81
|
- name: Cache uv
|
|
70
|
-
uses: actions/cache@
|
|
82
|
+
uses: actions/cache@v5
|
|
71
83
|
with:
|
|
72
84
|
path: ~/.cache/uv
|
|
73
85
|
key: uv-${{ runner.os }}-py${{ env.PYTHON_VERSION }}-${{ hashFiles('uv.lock') }}
|
|
@@ -75,9 +87,7 @@ jobs:
|
|
|
75
87
|
uv-${{ runner.os }}-py${{ env.PYTHON_VERSION }}-
|
|
76
88
|
|
|
77
89
|
- name: Install uv
|
|
78
|
-
run:
|
|
79
|
-
python -m pip install --upgrade pip
|
|
80
|
-
python -m pip install "uv==${UV_VERSION}"
|
|
90
|
+
run: python -m pip install "uv==${UV_VERSION}"
|
|
81
91
|
|
|
82
92
|
- name: Validate lockfile
|
|
83
93
|
run: uv lock --check
|
|
@@ -106,13 +116,14 @@ jobs:
|
|
|
106
116
|
PY
|
|
107
117
|
|
|
108
118
|
- name: Build wheel
|
|
119
|
+
if: inputs.build-package
|
|
109
120
|
run: uv build --wheel --out-dir dist --no-create-gitignore
|
|
110
121
|
|
|
111
122
|
- name: Smoke test installed wheel
|
|
123
|
+
if: inputs.build-package
|
|
112
124
|
run: |
|
|
113
125
|
python -m venv build/ci-venv
|
|
114
126
|
. build/ci-venv/bin/activate
|
|
115
|
-
python -m pip install --upgrade pip
|
|
116
127
|
python -m pip install dist/*.whl
|
|
117
128
|
python - <<'PY'
|
|
118
129
|
import os
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: src-py-lib
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Reusable libraries for Sourcegraph projects
|
|
5
5
|
Project-URL: Homepage, https://github.com/sourcegraph/src-py-lib
|
|
6
6
|
Project-URL: Issues, https://github.com/sourcegraph/src-py-lib/issues
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|