Skip to content

Hla 1142 module creation docs - #77

Open
MJGaughran wants to merge 5 commits into
mainfrom
hla-1142-module-creation-docs
Open

Hla 1142 module creation docs#77
MJGaughran wants to merge 5 commits into
mainfrom
hla-1142-module-creation-docs

Conversation

@MJGaughran

Copy link
Copy Markdown
Contributor

Adds documentation on how to create a deploy-tools Module.

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.48%. Comparing base (a30100b) to head (1e78091).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #77   +/-   ##
=======================================
  Coverage   99.48%   99.48%           
=======================================
  Files          27       27           
  Lines         979      979           
=======================================
  Hits          974      974           
  Misses          5        5           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

<name>/<version>.yaml one file per Module version
├── deprecated: false lifecycle flag
└── module
├── name / version / description

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldnt these be on seperate lines?

└── applications one or more, each of:
├── apptainer container image + entrypoints
├── shell a bash script
└── binary a downloaded, hash-checked executable

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description text should probably be spaced in the same way for all of the options, for apptainer, shell and binary the space between option and description is smaller

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to application types section below?


## A Module

A Module is the unit an end user loads. Alongside its `name` and `version` it carries:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the name and version just excluded from the table for brevity?

| `allow_updates` | Permit in-place changes to this version — see [the guard rails](deprecation-lifecycle.md#the-guard-rails). |
| `exclude_from_defaults` | Keep this version out of automatic default selection — see [default versions](default-versions.md#excluding-a-version-from-the-automatic-default). |

`load_script` and `unload_script` run extra commands when the Module is loaded and

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are load_script and load_script also Module config options? It doesnt explicitly say what they are or where/if they are configured, it just says they are run when the Module is loaded.

I think its a bit confusing because I might expect all of the options to be in the table, even the obvious or not recommended for general use options.

Every entry under `applications` sets `app_type` to select one of three kinds; a single
Module can mix them.

| `app_type` | Provides | Key fields |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this table use Key fields instead of just fields? If its because it only contains a subset of fields, then shouldnt the table also use Key fields as it is also a subset of fields.


**Apptainer** uses one container image with one or more `entrypoints`, each mapping an
executable name to a command run inside the container. Options — container `mounts`,
`command_args`, `apptainer_args`, `host_binaries` — can be set per entrypoint or shared

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these fields documented in prose here and not in either the tree diagram at the top or their own table? I see that some of them are documented in the second table, but not all, it just seems a bit inconsistent to me.

Comment on lines +92 to +95
```{literalinclude} ../../src/deploy_tools/demo_configuration/settings.yaml
:language: yaml
:lines: 3-
```

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these sections look broken in github MD preview, but I assume they work in the generated docs?

@@ -0,0 +1,78 @@
# Write a Module configuration

To add or change a Module you edit YAML in the configuration folder. This guide covers the

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a comma after Module?

repository-wide instead of per file):

```yaml
# yaml-language-server: $schema=https://raw.githubusercontent.com/DiamondLightSource/deploy-tools/main/src/deploy_tools/models/schemas/release.json

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line only for vscode or does it work for other editors?

Comment on lines +65 to +69
You don't run `deploy-tools` yourself. Open a merge request in the configuration
repository; CI validates the change and, once it is merged, deploys it (see
[drive deploy-tools from CI](ci-pipeline.md)). The `yaml-language-server` schema line
catches structural mistakes in your editor as you type, before you open the request.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember that this documentation is for anyone using deploy-tools. While we don't recommend using deploy-tools manually, someone else using deploy-tools may choose to use it that way. Also maybe "in your configuration repository" rather than "in the configuration repository" would make more sense? And maybe change the text to say "see [drive deploy-tools from CI] for a guide on setting up your configuration repository."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants