Skip to content

passing custom args to gen-xxx tools #51

Closed
@noelmcloughlin

Description

@noelmcloughlin
Contributor

There is no method to customize gen-xxx commands invoked by gen-project. For example, we cannot pass --no-metaclasses to gen-owl via the Makefile. Here in this project, I suggest solving the problem using environment variables like #43 as this scales well.

Activity

noelmcloughlin

noelmcloughlin commented on Feb 20, 2023

@noelmcloughlin
ContributorAuthor

See #52 for proposed solution (for gen-owl)

cmungall

cmungall commented on Mar 16, 2023

@cmungall
Member

Actually, there is a way to pass these in

Unfortunately it's not obvious as if you do gen-metadata from the command line the formatting is messed up; see:

So what you want is:

config.yaml:

generator_args: 
  owl: 
     metaclasses: false

the whole system is a little unsatisfying - in general in linkml we eat our own dogfood, and we would have a complete schema for all configuration. However, the click annotations are the source-of-truth for anything CLI, so the yaml here is a kind of jury rigged layer on top of multiple separate click files. I'm not sure there is a much better way to do it without a big revamp. But it could certainly be better documented!

noelmcloughlin

noelmcloughlin commented on Mar 18, 2023

@noelmcloughlin
ContributorAuthor

Thanks. Do you mean we can drop config.yaml into linkml-project-cookiecutter home directory (and github-actions workflow directory) and gen-xxx will read that file?

nlharris

nlharris commented on Aug 15, 2024

@nlharris
Contributor

Can this be merged or closed?

noelmcloughlin

noelmcloughlin commented on Aug 17, 2024

@noelmcloughlin
ContributorAuthor

Yes thanks - fixed in #67

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @cmungall@nlharris@sierra-moxon@noelmcloughlin

        Issue actions

          passing custom args to gen-xxx tools · Issue #51 · linkml/linkml-project-cookiecutter