Skip to content

Contributing

OpenCreator is spread over several repositories (see Project layout). This page covers the documentation and the two repositories most changes land in: opencreator-fs and the installer.

Documentation

Edit pages under docs/ and add new pages to nav in mkdocs.yml. For hardware instructions, say which printer model, firmware version and source commit they're for, and how they were tested. Say plainly when something hasn't been tested.

Make sure to use clear language and only delve into techincal specs and docs on parts where it would be expected.

Set up a preview once:

python -m venv .venv
.venv/bin/python -m pip install -r docs/requirements.txt
.venv/bin/python -m zensical serve

Before proposing a change, build the site with warnings treated as errors:

.venv/bin/python -m zensical build --strict

On Windows, use .venv\Scripts\python.exe. The generated site/ directory is ignored by Git; only the source Markdown and configuration should be committed.

Every push to main builds the site with the same strict build (.github/workflows/docs.yml) and publishes it to https://opencreatorcfw.github.io/. A broken link or anchor fails that build, so the site isn't updated until it's fixed.

Some tips that keep the strict build passing:

  • Link to other pages with relative paths to the .md file, for example architecture/boot-and-services.md#logs.
  • Anchors are the heading in lower case, with spaces turned into hyphens and most punctuation dropped: ## Writable root folders and swap (OpenCreator kernel) becomes #writable-root-folders-and-swap-opencreator-kernel.
  • Before renaming a heading, search docs/ for links to its anchor and update them.

Videos and other raw HTML

Markdown images and links work with relative paths. Paths inside raw HTML, such as <video> or <source src="...">, don't: the site loads pages without a full reload, and a relative src is then resolved against the page you came from. Give media in raw HTML its full URL, for example https://opencreatorcfw.github.io/assets/videos/<file>.mp4.

opencreator-fs

Everything OpenCreator puts on the printer's data partition lives here: startup scripts, configs and macros, the updater, the Moonraker components and the MCU firmware. Printers follow its main branch through Moonraker's update manager, so a commit on main reaches every printer at its next update.

Tests

tests/ has Python unittest tests for the macros (print start, notower, AFC loading, pause and resume, runout, VFA, menus), the updater, the plugin manager, the MCU flasher and the Moonraker components. The macro tests render the real Jinja macros from fs/usr/data/config/, so they need jinja2. Run them from the repository root, since they import each other as tests.*:

python -m unittest tests/test_*.py

Add or update a test when you change a macro or the updater.

Commit message markers

Words in the commit message change what happens to a push:

Marker Where Effect
-nover or --nover anywhere in the newest commit's message, as its own word the push gets no 0.1.x release; its commits are listed in the next one (Releases)
--urgent at the end of a line of the message (also --urgent -nover) on printers, a config file that would conflict takes the new template anyway; the user's copy is kept as <file>.mine and their SAVE_CONFIG block is kept

To skip the release on an urgent fix, end the line with --urgent -nover. The updater only recognizes that exact form; --urgent --nover isn't taken as urgent.

--nover only works since commit a7cc3cb; a merge made before that with --nover still got a release. When you merge someone else's pull request, check the marker in the merge commit's message, and check the release list afterwards.

Only use --urgent for a fix that a half-merged config would break, such as a macro one file calls and a conflicted file defines. A message that only mentions the flag in the middle of a line doesn't trigger it. Details are in config-docs/UPDATER.md.

Things to keep in mind

  • Edit the templates in fs/usr/data/config/. The updater merges them into each printer's live config and keeps the user's values; a change that conflicts goes to <file>.conflict on the printer instead.
  • Updated startup scripts, firmwareExe and driver.sh only take effect after the printer reboots.
  • MCU firmware comes from Kalico's scripts/build_c5_update.py all: copy the files from its live/ folder into mcu-firmware/. Printers flash only the boards whose file changed, never during a print.
  • Technical notes for each feature go in config-docs/; user-facing explanations go on this site.

Installer

The installer's steps are in payload-template/ of opencreator-installer. The payload/ folder on a USB drive is generated from it, so edit the template. tests/ holds shell tests (rollback, stock reset, broken Entware, app_startup.sh safety); make sdl builds a desktop preview of the touchscreen app that only runs a demo backend, so it can't change anything. See Project layout for the build targets.