Skip to content

Model ~/.metanorma/config.yml with LutaML#366

Draft
ribose-jeffreylau wants to merge 2 commits into
mainfrom
365-config
Draft

Model ~/.metanorma/config.yml with LutaML#366
ribose-jeffreylau wants to merge 2 commits into
mainfrom
365-config

Conversation

@ribose-jeffreylau
Copy link
Copy Markdown
Contributor

Metanorma PR checklist

Fixes #365

@ribose-jeffreylau ribose-jeffreylau added the enhancement New feature or request label Mar 5, 2025
@ribose-jeffreylau ribose-jeffreylau self-assigned this Mar 5, 2025
Copy link
Copy Markdown
Contributor

@ronaldtse ronaldtse left a comment

Choose a reason for hiding this comment

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

LGTM

@ribose-jeffreylau
Copy link
Copy Markdown
Contributor Author

This actually is not as straightforward as initially thought.

Currently, the config Hash is being manipulated with .merge (in multiple places) and is then passed to Metanorma::Compile:

options = @compile_options.merge(
format: :asciidoc, output_dir: build_asset_output_directory(source),
site_generate: true
)
options[:baseassetpath] = Pathname.new(source.to_s).dirname.to_s
Metanorma::Cli::Compiler.compile(source.to_s, options)

Not sure how best to handle mutations to a LutaML model for now...

@ronaldtse
Copy link
Copy Markdown
Contributor

This thing is not supposed to be manipulated after. The merges are just used to set defaults or additional things, they can be easily changed to method setters. Now being a lutaml-model we can set those things earlier on and can also allow the user to set them in the config, which is a great feature.

Base automatically changed from 353-name to main March 7, 2025 04:42
@opoudjis
Copy link
Copy Markdown
Contributor

@ribose-jeffreylau @ronaldtse This PR has been unactioned for six months. Is it still to be fixed?

@opoudjis
Copy link
Copy Markdown
Contributor

@ribose-jeffreylau @ronaldtse Update on this please. Metanorma is being plagued by PRs sitting unactioned for months.

@opoudjis
Copy link
Copy Markdown
Contributor

opoudjis commented Mar 2, 2026

@ronaldtse @ribose-jeffreylau This has now been sitting unactioned for a full year. If I do not hear back from either of you in the next week, I will be closing this PR.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model ~/.metanorma/config.yml with LutaML

3 participants