Skip to content

feat(cli): inline field docs in generated resources-server config (M6a)#1638

Merged
wprazuch merged 1 commit into
wprazuch/dataset-sourcefrom
wprazuch/init-config-docs
Jun 24, 2026
Merged

feat(cli): inline field docs in generated resources-server config (M6a)#1638
wprazuch merged 1 commit into
wprazuch/dataset-sourcefrom
wprazuch/init-config-docs

Conversation

@wprazuch

Copy link
Copy Markdown
Contributor

What

Generated resources-server configs (ng_init_resources_server) now carry inline
comments explaining each non-obvious field — domain, resources_server, the
policy_model magic name, and the datasets/source: block — so new users
understand the scaffold without leaving the file. Addresses friction #7 (no inline
documentation in generated configs).

While here, the scaffold now emits the canonical source: dataset block instead of
the deprecated gitlab_identifier, so a freshly created server starts on the
recommended schema (depends on #1637).

Notes

  • Chose inline comments over an indirected FIELD_DOCS constant (suggested in the
    RFC): there is a single generation site, so a one-line-per-field constant would add
    indirection without reuse. Easy to extract later if a second site appears.

Tests

  • Extended test_init_resources_server_includes_domain to assert the generated config
    (a) contains the inline docs, (b) uses source: {type: gitlab} rather than
    gitlab_identifier, and (c) validates cleanly with no DeprecationWarning.

Part of the configuration-friction epic (#1205), milestone M6a. Targets
wprazuch/dataset-source since it builds on the source: schema; will retarget to
the shared base once that merges.

@copy-pr-bot

copy-pr-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@wprazuch wprazuch force-pushed the wprazuch/dataset-source branch from db8b03c to 695207e Compare June 22, 2026 13:45
@wprazuch wprazuch requested a review from a team as a code owner June 22, 2026 13:45
@wprazuch wprazuch force-pushed the wprazuch/init-config-docs branch from 5e9d480 to 9bbd7f1 Compare June 22, 2026 13:45
@wprazuch wprazuch force-pushed the wprazuch/dataset-source branch 4 times, most recently from 2905987 to 6ca5c48 Compare June 24, 2026 07:21
The generated resources-server config's dataset comment referenced the deprecated
gitlab_identifier/huggingface_identifier; point it at the unified source: block instead.
Inline field documentation (friction #7) is already provided by the CLI scaffold; this PR
is reduced to the source: alignment on top of it.

Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
@wprazuch wprazuch force-pushed the wprazuch/init-config-docs branch from 9bbd7f1 to b6933fb Compare June 24, 2026 08:10
@wprazuch wprazuch merged commit 6ca368c into wprazuch/dataset-source Jun 24, 2026
16 checks passed
@wprazuch wprazuch deleted the wprazuch/init-config-docs branch June 24, 2026 08:15
wprazuch added a commit that referenced this pull request Jun 25, 2026
…a) (#1638)

## What

Generated resources-server configs (`ng_init_resources_server`) now
carry inline
comments explaining each non-obvious field — `domain`,
`resources_server`, the
`policy_model` magic name, and the `datasets`/`source:` block — so new
users
understand the scaffold without leaving the file. Addresses friction #7
(no inline
documentation in generated configs).

While here, the scaffold now emits the canonical `source:` dataset block
instead of
the deprecated `gitlab_identifier`, so a freshly created server starts
on the
recommended schema (depends on #1637).

## Notes

- Chose inline comments over an indirected `FIELD_DOCS` constant
(suggested in the
RFC): there is a single generation site, so a one-line-per-field
constant would add
indirection without reuse. Easy to extract later if a second site
appears.

## Tests

- Extended `test_init_resources_server_includes_domain` to assert the
generated config
(a) contains the inline docs, (b) uses `source: {type: gitlab}` rather
than
`gitlab_identifier`, and (c) validates cleanly with no
`DeprecationWarning`.

Part of the configuration-friction epic (#1205), milestone M6a. Targets
`wprazuch/dataset-source` since it builds on the `source:` schema; will
retarget to
the shared base once that merges.

Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
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.

1 participant