Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .evergreen/combine-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ set -eu

# Set up the virtual env.
. .evergreen/scripts/setup-dev-env.sh
export UV_NO_LOCK=1
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'))")}"
uv sync --group coverage
Comment thread
aclark4life marked this conversation as resolved.
Comment thread
aclark4life marked this conversation as resolved.
source .venv/bin/activate

Expand Down
4 changes: 0 additions & 4 deletions .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ else
fi

cleanup_tests() {
# Avoid leaving the lock file in a changed state when we change the resolution type.
if [ -n "${TEST_MIN_DEPS:-}" ]; then
git checkout uv.lock || true
fi
cd $PREV_DIR
}

Expand Down
1 change: 1 addition & 0 deletions .evergreen/scripts/setup-dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ if [ -z "${CI:-}" ]; then
export PYMONGO_C_EXT_MUST_BUILD=1
fi

export UV_NO_LOCK=1
(
cd $ROOT && uv sync
Comment thread
aclark4life marked this conversation as resolved.
Comment thread
aclark4life marked this conversation as resolved.
)
Expand Down
7 changes: 7 additions & 0 deletions .evergreen/scripts/setup_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import platform
import shutil
import stat
from datetime import datetime, timedelta, timezone
from pathlib import Path
from urllib import request

Expand Down Expand Up @@ -169,6 +170,12 @@ def handle_test_env() -> None:

write_env("PIP_QUIET") # Quiet by default.
write_env("PIP_PREFER_BINARY") # Prefer binary dists by default.
write_env("UV_NO_LOCK", "1")
if not os.environ.get("UV_EXCLUDE_NEWER"):
exclude_newer = (datetime.now(timezone.utc) - timedelta(days=7)).strftime(
"%Y-%m-%dT%H:%M:%SZ"
)
write_env("UV_EXCLUDE_NEWER", exclude_newer)
Comment thread
aclark4life marked this conversation as resolved.
Outdated

# Set an environment variable for the test name and sub test name.
write_env(f"TEST_{test_name.upper()}")
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ defaults:
run:
shell: bash -eux {0}

env:
UV_NO_LOCK: "1"

Comment thread
aclark4life marked this conversation as resolved.
permissions:
contents: read

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ xunit-results/
coverage.xml
server.log
.coverage
uv.lock
11 changes: 0 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,3 @@ repos:
language: python
require_serial: true
additional_dependencies: ["shrub.py>=3.10.0", "pyyaml>=6.0.2"]
Comment thread
aclark4life marked this conversation as resolved.

- id: uv-lock
name: uv-lock
entry: uv lock
language: python
require_serial: true
files: ^(uv\.lock|pyproject\.toml|requirements.txt|requirements/.*\.txt)$
pass_filenames: false
fail_fast: true
additional_dependencies:
- "uv>=0.8.4"
6 changes: 2 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,5 @@ From the spawn host or Ubuntu image, do the following:
## Dependabot updates

Dependabot will raise PRs at most once per week, grouped by GitHub Actions updates and Python requirement
file updates. We have a pre-commit hook that will update the `uv.lock` file when requirements change.
To update the lock file on a failing PR, you can use a method like `gh pr checkout <pr number>`, then run
`just lint uv-lock` to update the lock file, and then push the changes. If a typing dependency has changed,
also run `just typing` and handle any new findings.
file updates. To handle a failing Dependabot PR, you can use a method like `gh pr checkout <pr number>`,
then push the changes. If a typing dependency has changed, also run `just typing` and handle any new findings.
Comment thread
aclark4life marked this conversation as resolved.
Outdated
2,729 changes: 0 additions & 2,729 deletions uv.lock

This file was deleted.

Loading