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: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ command line to ease recurring operations:

* `uv run --no-sync invoke check`: Run Ruff lint and format checks.
* `uv run --no-sync invoke test`: Run the pure package tests.
* `uv run --no-sync invoke typecheck`: Run Pyright over the framework package and pure tests.
* `uv run --no-sync invoke typecheck`: Run Pyright over the metapackage and pure tests.
* `uv run --no-sync invoke docs`: Build the MkDocs documentation strictly into temporary storage.
* `uv run --no-sync invoke build`: Build wheel and source distributions into temporary storage.
* `uv run --no-sync invoke --list`: Show available aliases.
Expand Down
4 changes: 1 addition & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._

- [ ] I added a line to the `CHANGELOG.md` file in the `Unreleased` section under the most fitting heading (e.g. `Added`, `Changed`, `Removed`).
- [ ] I ran the pure package tests locally (`uv run invoke test`).
- [ ] I ran lint locally and there are no errors (`uv run invoke lint`).
- [ ] I added new functions/classes and made them available on a second-level import, e.g. `compas.datastructures.Mesh`.
- [ ] I ran the local checks (`uv run --no-sync invoke check typecheck test docs`).
- [ ] I recorded any applicable cross-package verification evidence in this pull request.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have added necessary documentation (if appropriate)
1 change: 0 additions & 1 deletion .github/workflows/scene-candidate-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: scene-candidate-integration

on:
pull_request:
branches: [c3-upgrade]
paths:
- .github/scene-candidates/**
- .github/workflows/scene-candidate-integration.yml
Expand Down
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Added cross-package integration tests for continuous-geometry tessellation, triangle-processing plugin boundaries, serialization, and native geometry backends.
* Added immutable cross-repository candidate manifests, provenance and wheel
verification, secret-isolated native integration, and release-order checks.
* Added a manual clean-install check for the full metapackage.
* Added a framework package matrix and a manual clean-install check for the
declared Python and operating system targets.

### Changed

* Run ordinary CI on pull requests to any base branch and use canonical
checkouts for initiative work.
* Use canonical checkouts for initiative work and run ordinary CI on pull
requests targeting any base branch.
* Keep sibling-checkout fixtures outside the pure suite and validate scene
candidate pins without duplicating their revisions.
* Documented the COMPAS 3 geometry package compatibility matrix, native backend prerequisites, and geometry integration test workflow.
* Replaced legacy development extras and mutable workflows with locked PEP 735 tool groups, uv-based contributor commands, immutable actions, and Python 3.12–3.14 checks.
* Modernized release-candidate automation to build and verify one temporary
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ The integration and release package for the main COMPAS framework packages:
`compas`, `compas_occ`, `compas_cgal`, `compas_libigl`, `compas_gmsh`,
`compas_viewer`, `compas_model`, `compas_shapeop`, and `compas_session`.

In addition to providing one installation target, this repository hosts
full-framework tests, data roundtrips, performance checks, examples, and
documentation.
This repository owns the metapackage, cross-package verification, and release
candidate evidence. Individual package APIs and examples live in their owning
repositories.

## Installation

```bash
pip install compas_framework
```

Python 3.12, 3.13, and 3.14 are supported. Some geometry backends have native
dependencies and may be easier to install through conda-forge.
The metapackage targets Python 3.12, 3.13, and 3.14. Complete runtime
installation across the target matrix still needs hosted verification. Some
geometry backends also require native libraries. See the
[package matrix](docs/packages.md) for current verification coverage.

The COMPAS 3 metapackage does not currently provide Rhino, Grasshopper, or
Blender extras. Those bundles will return after their owning packages declare
Expand Down
10 changes: 5 additions & 5 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ required package files.

Run it only against artifacts built from the same checkout by setting
`COMPAS_FRAMEWORK_DIST_DIR` to their temporary output directory. The local
`uv run invoke build` command builds the current working tree rather than only
`uv run --no-sync invoke build` command builds the current working tree rather than only
committed `HEAD` content.

## Core geometry conversions
Expand Down Expand Up @@ -45,14 +45,14 @@ plugin-dispatch examples:

## Pending native integration fixtures

[`tests/test_native_geometry_backends.py`](https://github.com/compas-dev/compas_framework/blob/main/tests/test_native_geometry_backends.py)
`tests/integration/test_native_geometry_backends.py`
and
[`tests/test_geometry_tessellation_integration.py`](https://github.com/compas-dev/compas_framework/blob/main/tests/test_geometry_tessellation_integration.py)
`tests/integration/test_geometry_tessellation_integration.py`
are pending geometry and typing candidate-integration fixtures. They are
outside the ordinary Ruff, Pyright, and runtime gates and are not authoritative
proof of the accepted target contracts.

They are not used as the candidate gate. The installed-artifact contracts in
`.github/candidates` exercise the approved current boundaries without source
checkout fallbacks. The reviewed live manifest exists, but until its hosted run
succeeds, do not cite either fixture set as positive candidate evidence.
checkout fallbacks. See the [testing strategy](testing.md) for the scope of
recorded candidate evidence.
10 changes: 5 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# COMPAS Framework

`compas_framework` is the integration and release package for the main COMPAS
framework. It provides one tested installation target and a home for workflows
that cross package boundaries.
framework. It provides a single installation target and owns cross-package
verification and release candidate evidence.

The distribution installs `compas`, `compas_occ`, `compas_cgal`,
`compas_libigl`, `compas_gmsh`, `compas_viewer`, `compas_model`,
`compas_shapeop`, and `compas_session`. It does not currently provide Rhino,
Grasshopper, or Blender extras because the published host packages do not yet
declare compatible COMPAS 3 dependencies.

This repository focuses on framework-level plugin discovery, data roundtrips,
performance checks, examples, and documentation. Implementations owned by one
package remain in that package's repository.
See the [testing strategy](testing.md) for the verified scope and the
[package matrix](packages.md) for coverage by package. Implementation and
package-local examples live in their owning repositories.
6 changes: 4 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Installation

The framework supports Python 3.12, 3.13, and 3.14.
The metapackage targets Python 3.12, 3.13, and 3.14. Full runtime support is
verified separately from the package metadata and pure tooling checks. See
the [package matrix](packages.md) for current coverage.

```bash
python -m pip install compas_framework
Expand All @@ -24,7 +26,7 @@ environment:
```bash
git clone https://github.com/compas-dev/compas_framework.git
cd compas_framework
uv sync --frozen --only-group dev --no-install-project
uv sync --locked --only-group dev --no-install-project
```

Alternatively, `environment.yml` bootstraps Python and uv with Conda. Run the
Expand Down
16 changes: 10 additions & 6 deletions docs/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ mixing these releases with COMPAS 2 is unsupported.
| `compas_shapeop` | ShapeOp constraint solving | No geometry-tessellation API role |
| `compas_session` | Session management for COMPAS workflows and tools | No geometry-tessellation API role |

Compatibility is established by the framework test suite and released as one
versioned dependency set.

The table intentionally does not predict package release numbers. Each package
may have a different next major version, but its dependency metadata must express
the same `compas>=3` baseline before coordinated publication.
The [framework matrix](https://github.com/compas-dev/compas_framework/blob/c3-upgrade/framework-matrix.json)
records all required distributions, their configured integration checks, and
the Python and OS targets for clean installation. The native artifact gate
covers Core, OCC, CGAL, and libigl on Linux x86-64 with Python 3.12. The scene
gate covers Core, Viewer, and Model from pinned sources. An empty coverage entry
indicates that the current integration gates do not exercise that package.

Package release numbers can differ. The tooling lock and candidate pins serve
their respective checks. Before promotion, record and verify the release set
and encode its approved compatibility ranges in the wheel metadata.

## Geometry-tessellation release checklist

Expand Down
6 changes: 6 additions & 0 deletions docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ approval and implementation. Main remains untouched.
4. The workflow uploads the verified files only as a temporary GitHub Actions
candidate artifact.

Before promoting a framework release, record the approved compatibility ranges
for all required packages in `pyproject.toml`. Confirm the verified wheel
contains those ranges. After the matching upstream packages are public, run
`framework-install.yml` against the release commit and record the result
alongside the exact-artifact evidence.

For a coordinated native release, every owning repository builds its wheel
once through its protected workflow. The reviewed framework manifest records
the producing run and immutable archive/wheel hashes. After the hosted native
Expand Down
22 changes: 12 additions & 10 deletions docs/testing.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Testing Strategy

Cross-package integration can cover:
Framework tests are organized by the contract they exercise:

- plugin discovery and dispatch through public COMPAS APIs;
- data roundtrips across serialization formats and package boundaries;
- end-to-end workflows combining geometry, algorithms, models, and viewing;
- performance baselines for representative cross-package operations; and
- installation checks for coordinated package releases.
- packaging checks for the supported Python and operating-system matrix.

## Pure repository checks

Expand Down Expand Up @@ -44,10 +44,12 @@ the repository checkout.

## Complete installation

The manual `framework-install` workflow builds one metapackage wheel and tries
a clean installation with its required dependencies from PyPI on each target
in `framework-matrix.json`. Run it after the intended upstream releases are
available. Keep the result alongside the runtime and exact-artifact evidence.
The manual `framework-install.yml` workflow builds the metapackage from a
selected commit and installs it from scratch with its dependencies from PyPI.
It runs dependency checks on every target in the [package matrix](packages.md).
Run it after the matching upstream distributions are available. The runtime
and artifact gates supply separate evidence of cross-package behavior and
exact artifact provenance.

## Native integration

Expand Down Expand Up @@ -83,10 +85,10 @@ checks the schema, provenance rules, archive safety, wheel metadata, offline
revalidation, release-order fixtures, and focused negative cases proving that
a changed digest and a skipped backend are rejected.

The larger `tests/test_native_geometry_backends.py` and
`tests/test_geometry_tessellation_integration.py` files remain pending
strategy-era fixtures outside the ordinary gates. They are not substituted
for the installed-artifact contracts or cited as current integration evidence.
The pending geometry fixtures live under `tests/integration/`. For local
diagnostics, explicitly select a file in that directory from `compas3`. The
fixtures require the Core, OCC, CGAL, and libigl sibling checkouts. Bare
`pytest` runs the pure suite and never loads those checkouts.

Geometry-tessellation performance thresholds are deferred until the framework
has an environment-normalized benchmark runner. Wall-clock assertions in this
Expand Down
13 changes: 12 additions & 1 deletion framework-matrix.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
{
"python": ["3.12", "3.13", "3.14"],
"install_check_os": ["ubuntu-latest", "macos-latest", "windows-latest"]
"install_check_os": ["ubuntu-latest", "macos-latest", "windows-latest"],
"packages": {
"compas": ["native-artifact", "scene-source"],
"compas-cgal": ["native-artifact"],
"compas-gmsh": [],
"compas-libigl": ["native-artifact"],
"compas-model": ["scene-source"],
"compas-occ": ["native-artifact"],
"compas-session": [],
"compas-shapeop": [],
"compas-viewer": ["scene-source"]
}
}
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ where = ["src"]
# ============================================================================

[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests", "src/compas_framework"]
minversion = "9.0"
testpaths = ["tests/test_package.py"]
python_files = ["test_*.py", "*_test.py", "test.py"]
addopts = [
"-ra",
Expand Down Expand Up @@ -165,8 +165,7 @@ line-length = 179
indent-width = 4
target-version = "py312"
extend-exclude = [
"tests/test_geometry_tessellation_integration.py",
"tests/test_native_geometry_backends.py",
"tests/integration",
]

[tool.ruff.lint]
Expand Down
53 changes: 0 additions & 53 deletions tests/conftest.py

This file was deleted.

24 changes: 24 additions & 0 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import sys
from pathlib import Path

import pytest


CODE_ROOT = Path(__file__).resolve().parents[3]
SIBLING_REPOSITORIES = ("compas", "compas_occ", "compas_cgal", "compas_libigl")


def pytest_configure(config):
sources = {name: CODE_ROOT / name / "src" for name in SIBLING_REPOSITORIES}
missing = [str(source) for source in sources.values() if not source.is_dir()]
if missing:
raise pytest.UsageError("Integration tests require sibling checkouts: " + ", ".join(missing))

for name, source in sources.items():
module = sys.modules.get(name)
if module is not None:
module_file = getattr(module, "__file__", None)
if not module_file or not Path(module_file).resolve().is_relative_to(source.resolve()):
raise pytest.UsageError(f"{name} was already imported from {module_file!r}. Start with a fresh Python process.")

sys.path[:0] = [str(source) for source in sources.values()]
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

pytestmark = pytest.mark.integration

CODE_ROOT = Path(__file__).parents[2]
CODE_ROOT = Path(__file__).parents[3]


def _pyproject(repository):
Expand Down
28 changes: 8 additions & 20 deletions tests/test_distribution_artifacts.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,15 @@
import os
import re
import tarfile
import tomllib
import zipfile
from email.parser import BytesParser
from pathlib import Path


RUNTIME_DEPENDENCIES = {
"compas",
"compas-cgal",
"compas-gmsh",
"compas-libigl",
"compas-model",
"compas-occ",
"compas-session",
"compas-shapeop",
"compas-viewer",
}
DEVELOPMENT_DEPENDENCIES = {"build", "invoke", "mkdocs", "pyright", "pytest", "ruff", "twine"}
from packaging.requirements import Requirement
from packaging.utils import canonicalize_name


def canonical_name(requirement: str) -> str:
name = re.split(r"[ (;<>=]", requirement, maxsplit=1)[0]
return re.sub(r"[-_.]+", "-", name).lower()
DEVELOPMENT_DEPENDENCIES = {"build", "invoke", "mkdocs", "pyright", "pytest", "ruff", "twine"}


def test_built_distributions_are_complete():
Expand All @@ -39,11 +26,12 @@ def test_built_distributions_are_complete():
metadata = BytesParser().parsebytes(archive.read(metadata_path))

raw_requirements = metadata.get_all("Requires-Dist", [])
requirements = {canonical_name(requirement) for requirement in raw_requirements}
requirements = {Requirement(value) for value in raw_requirements}
assert "compas_framework/__init__.py" in names
assert set(metadata["Requires-Python"].split(",")) == {">=3.12", "<3.15"}
assert RUNTIME_DEPENDENCIES <= requirements
assert DEVELOPMENT_DEPENDENCIES.isdisjoint(requirements)
assert DEVELOPMENT_DEPENDENCIES.isdisjoint(canonicalize_name(requirement.name) for requirement in requirements)
project = tomllib.loads((Path(__file__).resolve().parents[1] / "pyproject.toml").read_text())["project"]
assert requirements == {Requirement(value) for value in project["dependencies"]}
assert metadata.get_all("Provides-Extra", []) == []
assert all("extra ==" not in requirement for requirement in raw_requirements)

Expand Down
Loading
Loading