Contributing and testing
Strata is developed on GitHub at github.com/Foadsf/freecad-strata. Issues and pull requests are welcome.
Development setup
Clone the repository and make FreeCAD load it from your working copy:
git clone https://github.com/Foadsf/freecad-strata.git C:\dev\freecad-strata
New-Item -ItemType Junction -Path "$env:APPDATA\FreeCAD\v1-1\Mod\Strata" -Target C:\dev\freecad-strata
git clone https://github.com/Foadsf/freecad-strata.git ~/dev/freecad-strata
ln -s ~/dev/freecad-strata ~/.local/share/FreeCAD/v1-1/Mod/Strata
Restart FreeCAD after changing Python files.
Code layout
|
Registers the Strata workbench and starts Strata when FreeCAD’s window is up. |
|
Dependency-free Git plumbing: loose objects, references, history walks. |
|
Splitting |
|
Semantic comparison of FreeCAD documents and plain-language summaries. |
|
The engine: record, versions, workspaces, restore, merge, releases, sync. |
|
FreeCAD glue: save observer, reloading, previews, the 3D comparison. |
|
Installs the panel, commands, menu entries, toolbar and the embedding API. |
|
Theme and icons, version graph, history list, panel and dialogs. |
|
This documentation (Antora); |
|
The test suites below. |
Tests
| Command | What it checks |
|---|---|
|
The engine without FreeCAD: recording, versions, workspaces, restore, merge, releases, sync between two people, and survival of |
|
The engine inside FreeCAD: restored geometry volumes, assembly links, workspace isolation, merge, read-only views, the 3D overlay. |
|
Runs every documentation example and compares its output with the |
|
Drives the real FreeCAD window through every dialog, a workspace switch and a 3D comparison, and makes the screenshots in this documentation. Fails if Strata did not start on its own. |
|
The embedding API, remembered panel visibility across a real shutdown, keyboard shortcuts, the Tools menu and panel keys. |
|
Installs from a repository through the real Addon Manager window, restarts FreeCAD to verify, then uninstalls. |
The GUI tests use a throwaway FreeCAD preferences file and never touch yours.
On Windows they can run on a hidden desktop with a memory limit when STRATA_SURFACEKIT points to a folder containing surfacekit.py; otherwise they open a normal window.
A GUI test must never start Strata itself. It must check that FreeCAD started it. A test that called install() once hid a startup error through several passing runs.
|
Building this documentation
The documentation is written in AsciiDoc in docs/ and built with Antora.
npm ci --prefix docs
npx --prefix docs antora antora-playbook.yml
Open build/site/index.html. On every push to main, the Documentation workflow builds the site and publishes it to the gh-pages branch, which GitHub Pages serves.
Conventions:
-
one sentence per line in
.adocfiles, which makes reviews easier; -
screenshots come from
tests/run_gui_hidden.py, not from hand-made captures, so they always match the code; -
every runnable example has an
.outfile produced bytests/docs_examples_test.py --update. Review the diff before committing it.