Project Generator — linkml documentation

# Project Generator

## Overview

The ProjectGenerator is a wrapper for all other generators, and will generate a complete project folder, with subfolders for jsonschema, python, etc

See also

linkml-model-template

## Docs

### Command Line

#### gen-project

Generate an entire project LinkML schema

Generate all downstream artefacts using default configuration:

> gen-project -d . personinfo.yaml

Exclusion lists: all except ShEx:

> gen-project –exclude shex -d . personinfo.yaml

Inclusion lists: only jsonschema and python:

> gen-project -I python -I jsonschema -d . personinfo.yaml

Configuration, on command line:

> gen-project -A ‘jsonschema: {top_class: Container}’ -d . personinfo.yaml

Configuration, via yaml file:

> gen-project –config config.yaml personinfo.yaml

config.yaml:

> directory: . generator_args:

> > json_schema:

> >   top_class: Container

    gen-project [OPTIONS] YAMLFILE

Options

-d, --dir <dir>

  directory in which to place generated files. E.g. linkml_model, biolink_model

-A, --generator-arguments <generator_arguments>

  yaml configuration for generators

-C, --config-file <config_file>

  path to yaml configuration

-X, --exclude <exclude>

  list of artefacts to be excluded

-I, --include <include>

  list of artefacts to be included. If not set, defaults to all

--mergeimports, --no-mergeimports

  Merge imports into source file

Arguments

YAMLFILE

  Required argument

### Code

class linkml.generators.projectgen.ProjectGenerator