master
Download ZIP Propose a change
Name Last commit message Last updated
docs Publish 3.1.1 · AdityaAngajala
scripts Publish 3.1.1 · AdityaAngajala
tests Preserve source for molecule-publish-3.0.0 · AdityaAngajala
.adomignore Preserve source for molecule-publish-3.0.0 · AdityaAngajala
.pkgignore Merge PR #261: Require and verify molecule fabrication sources · AdityaAngajala
install.sh Preserve source for molecule-publish-3.0.0 · AdityaAngajala
package.json Publish 3.1.1 · AdityaAngajala
page.json Publish 3.1.1 · AdityaAngajala
README.md Preserve source for molecule-publish-3.0.0 · AdityaAngajala
SKILL.md Publish 3.1.1 · AdityaAngajala
uninstall.sh Publish 1.0.0 · Drew Owens

molecule-publish

Publishes the sources of a molecule to the Adom wiki. The wiki's 3D model registry builds the page's model, render copy, footprint and symbol from those sources; this skill never converts the STEP and never pushes a GLB or footprint/symbol JSON to a molecule page. It is the EDA-agnostic middle of the pipeline; adom-wiki model import takes the page on to Hydrogen.

EDA export skill        molecule-publish                                   adom-wiki model import
(kicad/fusion/altium) -> check -> publish private -> wait for build -> hero -> public -> Hydrogen

What it publishes

Bundle Sources Route The registry builds
KiCad or Fusion/EAGLE molecule STEP, .kicad_pcb or .brd, every schematic sheet, <slug>-fab.zip, export.json board model, web, footprint, symbol
Altium molecule STEP, .PcbDoc, schematics, <slug>-fab.zip, export.json board model, web, footprint, symbol

A STEP with no board file is refused (board-file-required): the build places a molecule's model on the machine pins its board file names. Every board, Altium included, is checked against the pin rule adom.molecule-pins/2: two or four machine pins named MP1 to MP4, all one size and length, and machine contacts named MC<n>.

Fabrication files and the export record are described in docs/fabrication.md. The exact matching rules for each source, and what an exporter must hand over, are in SKILL.md ("Handoff input"). Plain KiCad/EAGLE boards without machine pins use board mode, which still converts and pushes its own GLB, because the registry builds models only for molecule pages.

How a publish runs

  1. scripts/versions_check.py: adom-wiki 1.8.0 or newer and the installed exporters at their current releases.
  2. scripts/bundle_check.py, scripts/pin_names.py, scripts/fab_bundle.py and scripts/bundle_3d.py check the bundle the way the registry will.
  3. adom-wiki pkg publish --private --wait writes the sources in one commit and waits for the build the registry queues from it.
  4. The publish is done when that build passed with no error, wrote the footprint and symbol (metadataComplete: true), and the page's model comes from the pipeline.
  5. The hero is posed from the built model, then the page goes public, APM's render/ assets are refreshed, and adom-wiki model import takes it to Hydrogen.

A write that carries a file the registry generates is refused with REGISTRY_MODEL_FILE_REFUSED; the skill removes the named files from the package folder and publishes again.

Scripts

Script Does
versions_check.py the minimum versions, with the update commands
bundle_check.py which recipe the page builds from, its sources, generated files, the fabrication pair and the record
pin_names.py machine pin and contact names on a .kicad_pcb, .brd or .PcbDoc; a byte copy of the registry program's names.py
pcbdoc.py reads an Altium .PcbDoc into the KiCad board pin_names.py checks; a byte copy of the program's pcbdoc.py
pins.json, contract.json byte copies of the wiki's molecule contract files
fab_bundle.py creates and checks <slug>-fab.zip and export.json
bundle_3d.py custom 3D models under 3d/ for APM
component_graph.py the board's component dependencies, checked before publish
hero_camera.py the page's canonical hero camera
tested_with.py the tested-with:<family> tag

Run the tests with python3 -m unittest discover -s tests from the package directory.