28 Commits

Author SHA1 Message Date
NiJingzhe fc8b50178a release: build the macOS wheels on macos-15 (GitHub no longer serves macos-14: 'The configuration macos-14-arm64-us-default is not supported' cancelled the macOS job of both v2.2.8 release runs); the wheels still target macOS 14.0 (MACOSX_DEPLOYMENT_TARGET in pyproject.toml)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:00:41 +08:00
NiJingzhe 424a8121b4 ci: the C++ Release and ASan/UBSan jobs and the stub check are required
All three passed on Linux (14/14 doctest executables in both builds; the checked-in stubs, generated on macOS, are
reproduced). clang-tidy stays advisory: it fails on compile errors only, never on its warnings.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 01:23:00 +08:00
NiJingzhe b302ca8452 test/ci: the default bolt is held to 2.2.6's value on each platform; UBSan skips OCCT's own misaligned TopoDS read
- test_fastener: the modeled-thread topology depends on the platform's OCCT build. 2.2.6.post2 (OCP) gives 54 faces /
  116 edges on macOS arm64 and 56 / 117 on Linux x86-64 (measured in a linux/amd64 container; volume equal to 1e-8), and
  this engine gives the same on each. The doctest asserts the value 2.2.6 gives on the platform (Linux x86-64: 56 / 117;
  otherwise the macOS one) instead of failing on Linux.
- tools/ubsan.supp: the alignment reports of the sanitizer job are all inside OCCT's mesher (BRepMesh_* ->
  TopoDS::Face); only that check, only for OCCT's TopoDS.hxx, is suppressed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 00:26:49 +08:00
NiJingzhe 9ae54df950 ci: a Release run of the C++ doctests; clang-tidy only on the engine sources
- cpp-tests (advisory until green once): the per-area doctest executables without a sanitizer. No required job ran
  them; it also tells whether the Linux difference of the default hex bolt (56 faces / 117 edges where macOS builds
  54 / 116) comes from the sanitizer build or from the platform.
- clang-tidy: configured without the Python layer, so the bindings are not in its compile database (Python.h and
  pybind11 not found); it now runs on src/cpp/src/*.cpp only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 00:02:06 +08:00
NiJingzhe 02c3baabf6 Merge PR #65 (the release page carries the update notes) into the serve branch
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-29 20:24:02 +08:00
NiJingzhe cc9c347027 Merge PR #67 (simplecadapi.verify, the verify extra) into the serve branch
verify.to_ocp / from_ocp now delegate to the bridge of this branch (_glue.bridge), which also backs shape.wrapped when
OCP is installed: one conversion, one place. The verifier-scripts skill reference and the CHANGELOG say that
shape.wrapped is an OCP shape with the extra (PR #67 described it as the SDK's own binding). CI: the verifier-bridge
step is kept next to the C++ parity and stub steps.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-29 20:23:53 +08:00
NiJingzhe 53cbdc8ba0 fix: CI stub step quoting; stubs without test-only modules; the sanitize and stub jobs are advisory; dead nested workflows removed
- gen_stubs.sh: the interpreter word-splits (CI sets PYTHON="uv run --no-sync python"); the stubs of the test-only
  modules and two unresolvable builtins imports are left out.
- ci.yml: the ASan/UBSan job and the stub-freshness step are continue-on-error until each has run green once.
- src/cpp/.github/workflows (never read by GitHub) is deleted; CONTRIBUTING/READING_ORDER/LANDING_PLAN corrected.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-29 17:44:08 +08:00
NiJingzhe 764e4a3324 docs: a human README, CONTRIBUTING, reading order and landing plan; the agent notes are retired
- CONTRIBUTING.md: build, the test layers, golden policy, format, error, GIL, thread-safety and parity rules.
- docs/READING_ORDER.md and docs/LANDING_PLAN.md (+ tools/landing_plan.py): how to read the tree, and 10 PRs that
  account for every file of the port (a plan: the stacked branches were not created or built one by one).
- README.md replaced; ARCHITECTURE.md and NATIVE_PROGRESS.md corrected; AGENTS.md and HANDOFF.md removed (what was
  still true moved into the human docs); PORTING_STATUS.md marked as a stale snapshot.
- tests/python/ref.py no longer hard-codes the maintainer's home: SCAD_REF_PYTHON, else the checkout next to this one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-29 16:50:41 +08:00
NiJingzhe 7345e01453 refactor(bindings): one exception translator ordered by priority; the OCCT guard audit is clean and strict
- The four py::register_exception_translator calls (common, reactive graph, reactive units, raw OCCT shim) become
  handlers of one translator that asks them most specific first (ExceptionPriority), so the result no longer depends
  on the order the areas are bound in (UnitValidationError is an Error, StaleLineageError a ValueError).
- check_occt_guard.py accepts operator_scope and a one-line claim that the one caller runs the helper inside
  occt_guard; the 7 reported sites were helpers of guarded operators and now say so. CI runs it with --strict.
- Tests: Standard_Failure, UnitValidationError and StaleLineageError each keep their own Python class.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-29 16:48:22 +08:00
NiJingzhe a4c39a341d ci: format check, ASan/UBSan job, golden strictness, stub freshness, occt-guard audit
- format job (clang-format 18.1.8, no OCCT needed); sanitize job (ASan+UBSan, ctest, LSan suppression file);
  advisory clang-tidy on changed files; occt-guard audit (tools/check_occt_guard.py, non-blocking until clean).
- tests/python/ref.py: SCAD_GOLDEN_STRICT=1 (set in CI) makes a missing golden an error and refuses SCAD_REGOLDEN.
- src/cpp/tests/python now runs in CI (it was not in pytest testpaths).
- tools/gen_stubs.sh generates the .pyi of the extension; CI fails when the checked-in stubs are stale.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-29 16:36:04 +08:00
NiJingzhe b626269ecf feat(verify): simplecadapi.verify and the verify extra for verifier scripts; drop the fem extra
shape.wrapped is the SDK's own binding, so OCP functions reject it and verifier scripts that did
BRepGProp.VolumeProperties_s(solid.wrapped, ...) stopped working with the C++ engine. simplecadapi.verify.to_ocp / from_ocp
bridge through OpenCASCADE's binary format; the verify extra installs OCP 7.9 without VTK. The SDK itself never imports OCP.
The skill gets references/discipline/verifier-scripts.md, whose code the tests execute.

The fem extra (gmsh, ccx2paraview[VTK]) is removed with the README steps that used it; vtk is out of the lock file.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 01:13:18 +08:00
NiJingzhe 37332802ca ci(release): the release page carries the version's update notes
The page used generated notes and the bare tag as its title. It now takes docs/updates/<version>.md (plus a
link to the Chinese notes) and is titled 'simplecadapi <version>', like every earlier release page.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 11:06:36 +08:00
NiJingzhe 56f6fba13f feat(inspect): render inspect.brep with the software renderer; drop VTK
Entity-map callouts re-anchor onto their own geometry when occluded; the
VTK dependency, worker process and xvfb steps are gone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 02:00:42 +08:00
NiJingzhe 8696510ef6 ci: quote the Windows environment of the release build
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 12:43:51 +08:00
NiJingzhe e770913e57 fix: build with Apple clang 15 and MSVC; the release workflow selects platforms and keeps the OCCT cache
First runs of the release workflow on GitHub found portability errors that the local toolchains accept:
- Apple clang 15 (Xcode 15.4) cannot capture a structured binding in a lambda (role_tags.cpp);
- windows.h defines near and far as empty macros: parameters and locals named near/far/small are renamed
  (probes.cpp, sketch/diagnostics.cpp and the C++ tests).
Checked the whole C++ tree with clang 15 + libc++ 15: no other failure.

Workflow: a platforms input for dry runs, Ninja with -k 0 on Windows (all compiler errors in one run), the static
OCCT cache is saved even when the wheel build fails, setup-uv without a cache where nothing is cached.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 12:37:07 +08:00
NiJingzhe 96553c9b4f ci: release jobs that use uv without a cache do not enable its cache
setup-uv's post step failed the validate job: nothing had been cached.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 11:33:45 +08:00
NiJingzhe 1aa809443f ci: the release workflow runs in PhySpace/SimpleCADAPI
The private repository it was restricted to no longer exists; a fork must not try to release.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 02:57:54 +08:00
NiJingzhe 8971279494 feat: the geometry engine is C++ on OpenCASCADE, one package, prebuilt wheels
The modeling API (shapes, operators, sketches, products, queries, the reactive graph) is implemented in
C++20 on OpenCASCADE (src/cpp) and ships inside the wheel as simplecadapi._cpp.  The Python layers that stay
Python (runtime, build, artifacts, editor, inspect, exporter, translators, scene) run on it unchanged; the
previous Python test suite passes on the new engine.

Layout: src/cpp and src/simplecadapi side by side, one distribution built by scikit-build-core.
simplecadapi.core, .operators.*, .ql, .std.* and the other legacy modules are real forwarding modules; the
Python adapter layer is simplecadapi/_glue.  OCP is no longer a dependency and nothing imports it.

Release: .github/workflows/release.yml builds wheels for Linux x86_64 and aarch64, macOS arm64 and Windows
x86_64 (Python 3.10-3.13) against one static OCCT, runs the test suite on the Linux wheels and publishes to
GitHub and PyPI; ci.yml caches the static OCCT for the test jobs.

Errors: every message the library writes is English; the tag-validation and semantic-query errors render in
full with possible causes and fixes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 02:55:35 +08:00
NiJingzhe ac082e1932 ci: run the editor tests, kernel included
The editor's packages join the dev group so the main job no longer skips
test_editor.py, and a separate job runs it with SCA_EDITOR_E2E=1 to boot a real
marimo kernel.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-13 13:02:16 +08:00
NiJingzhe 6d1ddb5282 feat(cli): sca example, sca skill where; ship the editor UI and the demo in the wheel
- sca example u_link [DIR]: copy the bundled motor-mount workspace out, ready for sca edit
- sca skill where: print the install destination without writing
- release: build editor-web before uv build; the sdist carries the built UI and the
  five demo notebooks (the wheel is built from it); verify the wheel's contents
- skill: editor-collaboration domain (selection cell, snapshot, cell references,
  parameters), routed from SKILL.md; version metadata brought up to date
- fix a SyntaxWarning printed on every sca call

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 23:21:58 +08:00
NiJingzhe 263a1fa77a ci(release): run only in the private repository
The public mirror carries the same workflow file; a tag push there can
never publish (no release credentials). Guard the job on the private
slug so mirrored tags stay inert.
2026-09-07 10:47:30 +08:00
NiJingzhe 2fbbcc864c Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	LICENSE
#	README.zh-CN.md
#	skills/simplecadapi/SKILL.md
#	src/simplecadapi/auto_tools/skill_pack.py
2026-09-07 09:39:07 +08:00
NiJingzhe 9f5c6f1524 chore(verifier): sync CI workflows and uv.lock with the dropped collision extra
CI and release workflows installed the collision extra (python-fcl);
both now run 'uv sync --locked --group dev'. uv.lock regenerated:
python-fcl and its cython build dependency removed.
2026-09-04 02:29:40 +08:00
Ni Jingzhe c454a3af10 feat(skill): per-harness skillbuild toolchain replaces skill-pack (#18)
* feat(skill): replace skill-pack with per-harness conditional compiler

skillbuild compiles the skill tree into per-target harness builds:
- <!-- skill:if omp,!claude --> blocks include text only for matching
  targets; name-list conditions only, no else/nesting, fail-loud on
  unknown targets and unpaired/nested directives
- fence-aware: directive-looking lines inside code fences are literal
- layout is the filesystem; tree root configured in skillproj.toml
- post-build assertion: zero directive residue, SKILL.md frontmatter
  name check

Migration to the new model:
- docs/skill/ becomes the self-contained source root (SKILL.md,
  references/, generated api/stdlib/core/guides now under
  references/docs/; SDK_OVERVIEW/LICENSE/inspect are ordinary tree
  files)
- auto_docs_gen output redirected into the tree (docs/api ->
  docs/skill/references/docs/api, likewise stdlib)
- skills/simplecadapi/ is now the compiled omp target output;
  dist/generic/simplecadapi the generic target
- dropped skill-pack entry point (plus dangling evolve/make-export
  entries and their orphaned test), release workflow builds via
  skillbuild + tar; README updated

First real conditional block: harness reading paths in SKILL.md
(skill:// mount on omp vs disk-relative on generic).

Verified: 59 tests pass (skillbuild 31, auto_docs_gen 19, persistence
regression 9); both targets build; outputs residue-clean; full suite
collects (1376 tests).

* refactor(tools): auto_docs_gen moves out of the installed package

tools/ scripts are repo-checkout dev scripts, not packaged CLIs:
- auto_docs_gen.py now lives in tools/ beside the other generators;
  auto_tools/ package removed entirely
- path resolution simplifies: repo root = parent of tools/, fail-loud
  if pyproject.toml missing; site-packages/cwd fallback branches were
  dead code once the script stopped shipping in the wheel
- auto-docs-gen console script dropped from [project.scripts];
  release.yml and README invoke python tools/auto_docs_gen.py
- MANIFEST.in stale src/auto_tools include removed; CadQuery-free
  runtime scan no longer needs the auto_tools filter
- run_examples.py retired (user removal): README example-runner text
  updated to direct examples/ scripts; dangling runner-contract test
  (runpy.run_path into the deleted script) removed

Verified: 53 tests pass (auto_docs_gen + skill_build + ocp runtime
scan) and test_example_model_contract passes; regeneration from
tools/ is byte-identical (zero docs drift).

* refactor(skill): strip harness and build-tool content from the skill tree

The skill is plain harness-neutral content again:
- SKILL.md 'Reading skill files' section removed (the omp skill://
  mount block and its !omp complement were the only conditional
  blocks; the tree compiles identically for every target now)
- references/README.md: build-tool meta removed ('per-harness
  conditional compilation', skillbuild packaging/validation claims —
  link validation was never implemented, so the claim was false)
- live test now asserts the tree stays harness-neutral (zero blocks)
- skillproj.toml targets aligned with the user's output table
  (omp -> skills/simplecadapi-omp, opencode -> skills/simplecadapi-opencode;
  leftover 'generic' entry had no output and failed the build)
- compiled outputs are regenerable artifacts: skills/simplecadapi/
  untracked from git, skills/simplecadapi-*/ gitignored, release.yml
  and README build via skillbuild and tar the omp output directly
  (bsdtar has no --transform; inner dir keeps its suffixed name)

Verified: 49 tests pass; both targets build 372 files with zero
conditional blocks; no omp/conditional/directive residue in the tree
or outputs.

* chore(docs): drop stale architecture review and design notes
2026-08-22 20:20:49 +08:00
NiJingzhe a976395f12 ci: avoid redundant xvfb apt install 2026-08-19 15:15:16 +08:00
NiJingzhe d9f3bf6a14 Add pull request and issue templates 2026-08-13 00:16:03 +08:00
NiJingzhe 916c41e807 chore: prepare v2.0.4b2 release 2026-08-08 04:15:45 +08:00
NiJingzhe 529974944d ci: add tests and tagged releases 2026-08-08 03:25:37 +08:00