src-py-lib 0.3.1__tar.gz → 0.3.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.3.3/.github/workflows/diff-tour.yml +27 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/.github/workflows/release.yml +8 -8
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/.github/workflows/validate.yml +9 -9
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/PKG-INFO +7 -7
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/pyproject.toml +9 -9
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/clients/sourcegraph.py +8 -2
- src_py_lib-0.3.3/uv.lock +603 -0
- src_py_lib-0.3.1/uv.lock +0 -538
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/.github/CODEOWNERS +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/.github/workflows/ci.yml +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/.gitignore +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/.markdownlint-cli2.yaml +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/.python-version +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/AGENTS.md +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/LICENSE +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/README.md +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/SECURITY.md +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/renovate.json +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/__init__.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/clients/__init__.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/clients/github.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/clients/google_sheets.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/clients/graphql.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/clients/linear.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/clients/one_password.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/clients/slack.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/py.typed +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/utils/__init__.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/utils/config.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/utils/events.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/utils/http.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/utils/json_cache.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/utils/json_types.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/utils/logging.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/utils/telemetry.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/src/src_py_lib/utils/tsv.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/tests/test_import.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/tests/test_logging_http_clients.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/tests/test_tsv.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/tests/test_unicode_scan.py +0 -0
- {src_py_lib-0.3.1 → src_py_lib-0.3.3}/tests/unicode_scan.py +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This GitHub Action imported from the shared action
|
|
2
|
+
# https://github.com/sourcegraph/actions/blob/main/diff-tour/
|
|
3
|
+
# Please make fixes / enhancements in the shared action,
|
|
4
|
+
# so all of our repos get the benefits
|
|
5
|
+
|
|
6
|
+
name: Diff Tour link
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
pull_request:
|
|
10
|
+
# `edited` fires when the base branch changes; `synchronize` does not
|
|
11
|
+
# `closed` fires on merge and on plain close; either way the comment is
|
|
12
|
+
# updated to a link that survives deleting the head branch
|
|
13
|
+
types: [closed, edited, opened, reopened, synchronize]
|
|
14
|
+
|
|
15
|
+
# The only permission needed. The action does not check out your repo, so
|
|
16
|
+
# `contents: read` is not required, even for private repos
|
|
17
|
+
permissions:
|
|
18
|
+
pull-requests: write
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
diff-tour:
|
|
22
|
+
name: Comment
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
# Diff Tour resolves branch names against the base repo, so skip fork PRs
|
|
25
|
+
if: github.event.pull_request.head.repo.full_name == github.repository
|
|
26
|
+
steps:
|
|
27
|
+
- uses: sourcegraph/actions/diff-tour@4430dc1e4dde002387a4b655b41f6431ca75b1c1 # main
|
|
@@ -67,19 +67,19 @@ jobs:
|
|
|
67
67
|
|
|
68
68
|
steps:
|
|
69
69
|
- name: Check out release ref
|
|
70
|
-
uses: actions/checkout@v7
|
|
70
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
71
71
|
with:
|
|
72
72
|
fetch-depth: 0
|
|
73
73
|
persist-credentials: false
|
|
74
74
|
ref: ${{ needs.release_ref.outputs.tag }}
|
|
75
75
|
|
|
76
76
|
- name: Set up Python
|
|
77
|
-
uses: actions/setup-python@
|
|
77
|
+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
78
78
|
with:
|
|
79
79
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
80
80
|
|
|
81
81
|
- name: Cache uv
|
|
82
|
-
uses: actions/cache@v6
|
|
82
|
+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
83
83
|
with:
|
|
84
84
|
path: ~/.cache/uv
|
|
85
85
|
key: uv-${{ runner.os }}-py${{ env.PYTHON_VERSION }}-${{ hashFiles('uv.lock') }}
|
|
@@ -251,7 +251,7 @@ jobs:
|
|
|
251
251
|
echo "path=${notes_path}" >> "${GITHUB_OUTPUT}"
|
|
252
252
|
|
|
253
253
|
- name: Upload workflow artifact
|
|
254
|
-
uses: actions/upload-artifact@v7
|
|
254
|
+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
255
255
|
with:
|
|
256
256
|
name: src-py-lib-release
|
|
257
257
|
path: |
|
|
@@ -262,7 +262,7 @@ jobs:
|
|
|
262
262
|
${{ steps.notes.outputs.path }}
|
|
263
263
|
|
|
264
264
|
- name: Upload PyPI artifact
|
|
265
|
-
uses: actions/upload-artifact@v7
|
|
265
|
+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
266
266
|
with:
|
|
267
267
|
name: pypi-distributions
|
|
268
268
|
path: |
|
|
@@ -278,7 +278,7 @@ jobs:
|
|
|
278
278
|
|
|
279
279
|
steps:
|
|
280
280
|
- name: Download release assets
|
|
281
|
-
uses: actions/download-artifact@v8
|
|
281
|
+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
282
282
|
with:
|
|
283
283
|
name: src-py-lib-release
|
|
284
284
|
path: release-assets
|
|
@@ -326,13 +326,13 @@ jobs:
|
|
|
326
326
|
|
|
327
327
|
steps:
|
|
328
328
|
- name: Download built distribution
|
|
329
|
-
uses: actions/download-artifact@v8
|
|
329
|
+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
330
330
|
with:
|
|
331
331
|
name: pypi-distributions
|
|
332
332
|
path: dist
|
|
333
333
|
|
|
334
334
|
- name: Publish PyPI package
|
|
335
|
-
uses: pypa/gh-action-pypi-publish@
|
|
335
|
+
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
|
|
336
336
|
with:
|
|
337
337
|
packages-dir: dist
|
|
338
338
|
skip-existing: true
|
|
@@ -98,7 +98,7 @@ jobs:
|
|
|
98
98
|
|
|
99
99
|
steps:
|
|
100
100
|
- name: Check out code
|
|
101
|
-
uses: actions/checkout@v7
|
|
101
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
102
102
|
with:
|
|
103
103
|
persist-credentials: false
|
|
104
104
|
ref: ${{ inputs.ref || github.ref }}
|
|
@@ -130,13 +130,13 @@ jobs:
|
|
|
130
130
|
|
|
131
131
|
steps:
|
|
132
132
|
- name: Check out code
|
|
133
|
-
uses: actions/checkout@v7
|
|
133
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
134
134
|
with:
|
|
135
135
|
persist-credentials: false
|
|
136
136
|
ref: ${{ inputs.ref || github.ref }}
|
|
137
137
|
|
|
138
138
|
- name: Cache npm
|
|
139
|
-
uses: actions/cache@v6
|
|
139
|
+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
140
140
|
with:
|
|
141
141
|
path: ~/.npm
|
|
142
142
|
key: npm-${{ runner.os }}-markdownlint-cli2-${{ env.MARKDOWNLINT_CLI2_VERSION }}
|
|
@@ -156,19 +156,19 @@ jobs:
|
|
|
156
156
|
|
|
157
157
|
steps:
|
|
158
158
|
- name: Check out code
|
|
159
|
-
uses: actions/checkout@v7
|
|
159
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
160
160
|
with:
|
|
161
161
|
fetch-depth: 0
|
|
162
162
|
persist-credentials: false
|
|
163
163
|
ref: ${{ inputs.ref || github.ref }}
|
|
164
164
|
|
|
165
165
|
- name: Set up Python
|
|
166
|
-
uses: actions/setup-python@
|
|
166
|
+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
167
167
|
with:
|
|
168
168
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
169
169
|
|
|
170
170
|
- name: Cache uv
|
|
171
|
-
uses: actions/cache@v6
|
|
171
|
+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
172
172
|
with:
|
|
173
173
|
path: ~/.cache/uv
|
|
174
174
|
key: uv-${{ runner.os }}-py${{ env.PYTHON_VERSION }}-${{ hashFiles('uv.lock') }}
|
|
@@ -219,19 +219,19 @@ jobs:
|
|
|
219
219
|
|
|
220
220
|
steps:
|
|
221
221
|
- name: Check out code
|
|
222
|
-
uses: actions/checkout@v7
|
|
222
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
223
223
|
with:
|
|
224
224
|
fetch-depth: 0
|
|
225
225
|
persist-credentials: false
|
|
226
226
|
ref: ${{ inputs.ref || github.ref }}
|
|
227
227
|
|
|
228
228
|
- name: Set up Python
|
|
229
|
-
uses: actions/setup-python@
|
|
229
|
+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
230
230
|
with:
|
|
231
231
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
232
232
|
|
|
233
233
|
- name: Cache uv
|
|
234
|
-
uses: actions/cache@v6
|
|
234
|
+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
235
235
|
with:
|
|
236
236
|
path: ~/.cache/uv
|
|
237
237
|
key: uv-${{ runner.os }}-py${{ env.PYTHON_VERSION }}-${{ hashFiles('uv.lock') }}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: src-py-lib
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.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
|
|
@@ -17,12 +17,12 @@ Classifier: Programming Language :: Python :: 3
|
|
|
17
17
|
Classifier: Typing :: Typed
|
|
18
18
|
Requires-Python: >=3.11
|
|
19
19
|
Requires-Dist: httpx<1,>=0.28.1
|
|
20
|
-
Requires-Dist: opentelemetry-api<2,>=1.
|
|
21
|
-
Requires-Dist: pydantic<3,>=2.
|
|
22
|
-
Requires-Dist: python-dotenv<2,>=1.2.
|
|
20
|
+
Requires-Dist: opentelemetry-api<2,>=1.45.2
|
|
21
|
+
Requires-Dist: pydantic<3,>=2.14.3
|
|
22
|
+
Requires-Dist: python-dotenv<2,>=1.2.4
|
|
23
23
|
Provides-Extra: otel
|
|
24
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-http<2,>=1.
|
|
25
|
-
Requires-Dist: opentelemetry-sdk<2,>=1.
|
|
24
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http<2,>=1.45.2; extra == 'otel'
|
|
25
|
+
Requires-Dist: opentelemetry-sdk<2,>=1.45.2; extra == 'otel'
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
27
|
|
|
28
28
|
# src-py-lib
|
|
@@ -4,10 +4,10 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[dependency-groups]
|
|
6
6
|
dev = [
|
|
7
|
-
"opentelemetry-exporter-otlp-proto-http>=1.
|
|
8
|
-
"opentelemetry-sdk>=1.
|
|
9
|
-
"pyright>=1.1.
|
|
10
|
-
"ruff>=0.15.
|
|
7
|
+
"opentelemetry-exporter-otlp-proto-http>=1.45.2,<2",
|
|
8
|
+
"opentelemetry-sdk>=1.45.2,<2",
|
|
9
|
+
"pyright>=1.1.414",
|
|
10
|
+
"ruff>=0.15.21",
|
|
11
11
|
]
|
|
12
12
|
|
|
13
13
|
[project]
|
|
@@ -32,9 +32,9 @@ classifiers = [
|
|
|
32
32
|
]
|
|
33
33
|
dependencies = [
|
|
34
34
|
"httpx>=0.28.1,<1",
|
|
35
|
-
"opentelemetry-api>=1.
|
|
36
|
-
"pydantic>=2.
|
|
37
|
-
"python-dotenv>=1.2.
|
|
35
|
+
"opentelemetry-api>=1.45.2,<2",
|
|
36
|
+
"pydantic>=2.14.3,<3",
|
|
37
|
+
"python-dotenv>=1.2.4,<2",
|
|
38
38
|
]
|
|
39
39
|
keywords = [
|
|
40
40
|
"Sourcegraph"
|
|
@@ -46,8 +46,8 @@ Issues = "https://github.com/sourcegraph/src-py-lib/issues"
|
|
|
46
46
|
|
|
47
47
|
[project.optional-dependencies]
|
|
48
48
|
otel = [
|
|
49
|
-
"opentelemetry-exporter-otlp-proto-http>=1.
|
|
50
|
-
"opentelemetry-sdk>=1.
|
|
49
|
+
"opentelemetry-exporter-otlp-proto-http>=1.45.2,<2",
|
|
50
|
+
"opentelemetry-sdk>=1.45.2,<2",
|
|
51
51
|
]
|
|
52
52
|
|
|
53
53
|
[tool.hatch.build.targets.wheel]
|
|
@@ -160,7 +160,10 @@ class SourcegraphClientConfig(Config):
|
|
|
160
160
|
env_var="SRC_ENDPOINT",
|
|
161
161
|
cli_flag="--src-endpoint",
|
|
162
162
|
metavar="URL",
|
|
163
|
-
help=
|
|
163
|
+
help=(
|
|
164
|
+
"Sourcegraph instance URL\n"
|
|
165
|
+
"Required as either env var or arg. Recommended to set SRC_ENDPOINT env var"
|
|
166
|
+
),
|
|
164
167
|
help_group="Sourcegraph",
|
|
165
168
|
required=True,
|
|
166
169
|
)
|
|
@@ -169,7 +172,10 @@ class SourcegraphClientConfig(Config):
|
|
|
169
172
|
env_var="SRC_ACCESS_TOKEN",
|
|
170
173
|
cli_flag="--src-access-token",
|
|
171
174
|
metavar="TOKEN",
|
|
172
|
-
help=
|
|
175
|
+
help=(
|
|
176
|
+
"Sourcegraph access token, or op:// secret reference\n"
|
|
177
|
+
"Required as either env var or arg. Recommended to set SRC_ACCESS_TOKEN env var"
|
|
178
|
+
),
|
|
173
179
|
help_group="Sourcegraph",
|
|
174
180
|
secret=True,
|
|
175
181
|
required=True,
|