Skip to content

Commit 9e44324

Browse files
committed
PYTHON-5862 Address PR feedback: fix bash quoting, improve docs, set UV_EXCLUDE_NEWER in GHA
- Fix nested double-quote bash syntax in combine-coverage.sh (python3 -c argument must use single quotes inside the ${...:-$(...)} expansion) - Add actionable steps to CONTRIBUTING.md Dependabot section - Compute and export UV_EXCLUDE_NEWER in all uv-using GitHub Actions jobs for deterministic package resolution without a lock file
1 parent d2617b1 commit 9e44324

3 files changed

Lines changed: 25 additions & 3 deletions

File tree

.evergreen/combine-coverage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set -eu
88
# Set up the virtual env.
99
. .evergreen/scripts/setup-dev-env.sh
1010
export UV_NO_LOCK=1
11-
export UV_EXCLUDE_NEWER="${UV_EXCLUDE_NEWER:-$(python3 -c "from datetime import datetime, timedelta, timezone; print((datetime.now(timezone.utc) - timedelta(days=7)).strftime('%Y-%m-%dT%H:%M:%SZ'))")}"
11+
export UV_EXCLUDE_NEWER="${UV_EXCLUDE_NEWER:-$(python3 -c 'from datetime import datetime, timedelta, timezone; print((datetime.now(timezone.utc) - timedelta(days=7)).strftime("%Y-%m-%dT%H:%M:%SZ"))')}"
1212
uv sync --group coverage
1313
source .venv/bin/activate
1414

.github/workflows/test-python.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
with:
3434
enable-cache: true
3535
python-version: "3.10"
36+
- name: Set UV_EXCLUDE_NEWER
37+
run: echo "UV_EXCLUDE_NEWER=$(date -u -d '7 days ago' '+%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
3638
- name: Install just
3739
run: uv tool install rust-just
3840
- name: Install Python dependencies
@@ -75,6 +77,8 @@ jobs:
7577
with:
7678
enable-cache: true
7779
python-version: ${{ matrix.python-version }}
80+
- name: Set UV_EXCLUDE_NEWER
81+
run: echo "UV_EXCLUDE_NEWER=$(date -u -d '7 days ago' '+%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
7882
- id: setup-mongodb
7983
uses: mongodb-labs/drivers-evergreen-tools@master
8084
with:
@@ -97,6 +101,8 @@ jobs:
97101
with:
98102
enable-cache: true
99103
python-version: "3.10"
104+
- name: Set UV_EXCLUDE_NEWER
105+
run: echo "UV_EXCLUDE_NEWER=$(date -u -d '7 days ago' '+%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
100106
- id: setup-mongodb
101107
uses: mongodb-labs/drivers-evergreen-tools@master
102108
with:
@@ -125,6 +131,8 @@ jobs:
125131
with:
126132
enable-cache: true
127133
python-version: "3.10"
134+
- name: Set UV_EXCLUDE_NEWER
135+
run: echo "UV_EXCLUDE_NEWER=$(date -u -d '7 days ago' '+%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
128136
- name: Install just
129137
run: uv tool install rust-just
130138
- id: setup-mongodb
@@ -150,6 +158,8 @@ jobs:
150158
with:
151159
enable-cache: true
152160
python-version: "3.10"
161+
- name: Set UV_EXCLUDE_NEWER
162+
run: echo "UV_EXCLUDE_NEWER=$(date -u -d '7 days ago' '+%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
153163
- name: Install just
154164
run: uv tool install rust-just
155165
- name: Install dependencies
@@ -169,6 +179,8 @@ jobs:
169179
with:
170180
enable-cache: true
171181
python-version: "3.10"
182+
- name: Set UV_EXCLUDE_NEWER
183+
run: echo "UV_EXCLUDE_NEWER=$(date -u -d '7 days ago' '+%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
172184
- name: Install just
173185
run: uv tool install rust-just
174186
- name: Install dependencies
@@ -193,6 +205,8 @@ jobs:
193205
with:
194206
enable-cache: true
195207
python-version: "${{matrix.python}}"
208+
- name: Set UV_EXCLUDE_NEWER
209+
run: echo "UV_EXCLUDE_NEWER=$(date -u -d '7 days ago' '+%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
196210
- name: Install just
197211
run: uv tool install rust-just
198212
- name: Install dependencies
@@ -214,6 +228,8 @@ jobs:
214228
with:
215229
enable-cache: true
216230
python-version: "3.10"
231+
- name: Set UV_EXCLUDE_NEWER
232+
run: echo "UV_EXCLUDE_NEWER=$(date -u -d '7 days ago' '+%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
217233
- name: Install just
218234
run: uv tool install rust-just
219235
- name: Install dependencies
@@ -303,6 +319,8 @@ jobs:
303319
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
304320
with:
305321
python-version: "3.9"
322+
- name: Set UV_EXCLUDE_NEWER
323+
run: echo "UV_EXCLUDE_NEWER=$(date -u -d '7 days ago' '+%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
306324
- id: setup-mongodb
307325
uses: mongodb-labs/drivers-evergreen-tools@master
308326
with:

CONTRIBUTING.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,5 +574,9 @@ From the spawn host or Ubuntu image, do the following:
574574
## Dependabot updates
575575

576576
Dependabot will raise PRs at most once per week, grouped by GitHub Actions updates and Python requirement
577-
file updates. To handle a failing Dependabot PR, you can use a method like `gh pr checkout <pr number>`,
578-
then push the changes. If a typing dependency has changed, also run `just typing` and handle any new findings.
577+
file updates. To handle a failing Dependabot PR:
578+
579+
1. Check out the PR: `gh pr checkout <pr number>`
580+
2. Re-run the linters to pick up any formatting changes: `just lint-manual`
581+
3. If a typing dependency changed, run `just typing` and fix any new errors.
582+
4. Commit the changes and push: `git add -u && git commit -m "Address linter/typing issues" && git push`

0 commit comments

Comments
 (0)