Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
persist-credentials: false
- uses: prefix-dev/setup-pixi@9936258fee697aff89b3fed6ca1f80a382ef694e # v0.11.3
- run: pixi run lint
- run: pixi run test-scripts
- run: pixi run update-tables
- run: pixi run build-docs

dependabot:
Expand Down
122 changes: 120 additions & 2 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,13 @@ lint = {
pyyaml = ">=6.0.3,<7"
py-rattler = ">=0.28.1,<0.29"
niquests = ">=3.21.2,<4"
pytest = ">=9.2.0,<10"

[feature.scripts.tasks]
test-scripts = {
cmd = "pytest scripts",
description = "Test package table generation",
}
check-dependabot-merge = {
cmd = "python scripts/check_dependabot_merge.py",
description = "Check whether every Dependabot update qualifies for auto-merge",
Expand Down
4 changes: 2 additions & 2 deletions scripts/compare_pkg_completeness.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

import niquests
import yaml
from rattler import MatchSpec, PackageRecord
from rattler import BuildString, MatchSpec, PackageRecord
from urllib3.util.retry import Retry

# The distro list and the platform list are shared with the site through
Expand Down Expand Up @@ -289,7 +289,7 @@ def collect_mutexes(repos: dict[str, list[Artifact]]) -> tuple[str, MutexRecords
PackageRecord(
name=artifact["name"],
version=artifact["version"],
build=artifact["build"],
build=BuildString(artifact["build"]),
build_number=artifact.get("build_number", 0),
subdir=platform,
)
Expand Down
23 changes: 23 additions & 0 deletions scripts/test_compare_pkg_completeness.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""Regression tests for package availability across mutex builds."""

from compare_pkg_completeness import collect_mutexes, mutex_matcher


def test_matches_version_and_build_across_platforms() -> None:
name, records = collect_mutexes(
{
"linux-64": [
{"name": "ros-distro-mutex", "version": "0.6.0", "build": "noetic_0"},
{"name": "ros-distro-mutex", "version": "0.7.0", "build": "noetic_2"},
],
"osx-arm64": [
{"name": "ros-distro-mutex", "version": "0.6.0", "build": "noetic_1"},
],
}
)
match = mutex_matcher(records)
assert name == "ros-distro-mutex"
assert match(f"{name} 0.6.* noetic_0") == {"0.6.0"}
assert match(f"{name} 0.6.* noetic_1") == {"0.6.0"}
assert match(f"{name} >=0.6.0,<0.8.0a0") == {"0.6.0", "0.7.0"}
assert match(f"{name} 0.6.* noetic_2") == set()
Loading