No description
- Soft service skip: services without name or image are silently omitted
from YAML rather than blocking generation. Error only when ALL services
are invalid.
- Global-only admins GID: removed admins_gid from ServiceSpec; StackSpec
field is the sole source. Empty value defaults to 1002 at generation
time (never user-visible in the output).
- Admins GID row in per-service ServiceEditor removed; MCFWindow keeps the
global row with placeholder text hinting at the 1002 default.
- parse_compose_yaml(): new public function that reconstructs an MCF
StackSpec from a raw Docker Compose YAML string. Detects caddy network /
CDP labels / internal port, group_add → global GID, and serialises
unrecognised keys back into additional_yaml.
- ImportWindow: modal Adw.Window with NavigationView. Source page has:
- Open File (Gtk.FileDialog async) for YAML files
- Browse Templates (pushes template picker page)
- Paste YAML text area + Import button
Templates page: FlowBox of card buttons showing SVG icon + capitalised
name for every *.yaml in templates/ that has a matching *.svg.
- MCFWindow: import button added to header bar (left side). _loading flag
prevents the 'cannot close last tab' guard from firing during bulk-replace.
_load_stack_spec() replaces all current editors with the imported stack.
_add_service_with_spec() and ServiceEditor.load_spec() wire new data into
the UI.
- Tests updated: removed test_per_service_admins_gid_overrides_global;
added test_empty_admins_gid_defaults_to_1002,
test_invalid_service_without_name_is_skipped,
test_all_invalid_services_raises_error,
test_parse_compose_yaml_basic. 18 tests pass.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
||
|---|---|---|
| templates | ||
| tests | ||
| .gitignore | ||
| app.py | ||
| mcf_generator.py | ||
| README.md | ||
| requirements.txt | ||
MCF Generator
A GTK 4 + libadwaita GUI for generating Docker Compose YAML that follows the Malasaur Compose Format draft.
Run
The virtual environment has been created as .venv with --system-site-packages so it can use the OS-provided GTK, libadwaita, GtkSourceView, PyGObject, and PyYAML bindings.
source .venv/bin/activate
python app.py
Checks
.venv/bin/python -m unittest discover -s tests
.venv/bin/python -m py_compile app.py mcf_generator.py
Notes
restart: unless-stoppedis always generated.container_namealways matches the service name.- Empty optional sections are omitted.
- Named volume sources such as
cache:/cacheare declared at the top level. - Environment variables are generated as a YAML mapping.
- When CDP is enabled, every service joins
caddyand gets CDP labels. If no internal port is set,caddy.reverse_proxyuses"{{upstreams}}". - The tool does not create or edit
.env.