Repository navigation
import: erwin import into an empty folder bootstraps a full project - #44
Merged
Merged
Conversation
An erwin export is a whole model, but importing it into an empty folder only wrote object YAMLs plus a bare mdl-project.yaml — no .mdl/lock.yaml, no .mdl/state/, no .gitignore, and in VS Code the command aborted unless a project already existed. Nobody migrates off erwin onto an orphan model. mdl import erwin now scaffolds a runnable project around the import when --out is empty, configurable and structure-respecting: - --scaffold model|workspace|none (default model). workspace also lays down the transform/warehouse dbt project with a zero-setup DuckDB profiles.yml, CODEOWNERS and a .code-workspace; model writes just the skeleton. - --dbt-target names the dbt target/profile written into the config. - The layout is persisted to mdl-project.yaml under a new scaffold: block (ProjectConfig.scaffold) and joins writer._USER_OWNED_CONFIG so a re-import reproduces, never rewrites, it. - An --out that already holds a project (mdl-project.yaml or .mdl/, at the root or a model/ subdir) is respected: no re-scaffold, user config preserved. VS Code: importErwin no longer requires an existing model. In an empty workspace it confirms, then scaffolds using modelith.import.scaffold / modelith.import.dbtTarget and sets modelith.modelDir to the written model so the panels resolve it. bootstrap_project + scaffold_workspace_skeleton reuse the audited init/collab plumbing. CLI 0.6.7, extension 0.3.15.
…config, generate follows it Splits the concerns the erwin-scaffold work had coupled. Creating the logical model and generating the dbt project are now distinct steps, the project's dbt-project location is one config value editable from the CLI, and generate honours it. - mdl import erwin defaults to a MODEL-ONLY project (--scaffold model): the .mdl skeleton + object YAMLs, no dbt shell. --scaffold workspace still lays (or reuses) a dbt project; --scaffold none writes objects only. Producing the dbt project is otherwise a separate mdl generate step, matching mdl init (plain = model-only; --workspace/--demo = model + dbt). - New : the general mdl-project.yaml doorway (the reverse: block keeps its richer reverse-config surface). Comment-preserving, dotted keys, and the whole doc is re-validated through ProjectConfig before writing so a bad set is rejected, not half-applied. e.g. mdl config set scaffold.dbt_project_dir transform/warehouse - mdl generate now defaults its output to config.scaffold.dbt_project_dir (resolved relative to the model dir) when set, else target/dbt; an explicit -o still wins. The key import stamps is no longer dead. - VS Code: importErwin shows a layout QuickPick (model|workspace|none) on a fresh bootstrap, seeded by modelith.import.scaffold, instead of a confirm-only modal. CLI 0.6.8, extension 0.3.16.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An erwin export is a whole model, but importing it into an empty folder only wrote object YAMLs plus a bare mdl-project.yaml — no .mdl/lock.yaml, no .mdl/state/, no .gitignore, and in VS Code the command aborted unless a project already existed. Nobody migrates off erwin onto an orphan model.
mdl import erwin now scaffolds a runnable project around the import when --out is empty, configurable and structure-respecting:
VS Code:
importErwin no longer requires an existing model. In an empty workspace it confirms, then scaffolds using modelith.import.scaffold / modelith.import.dbtTarget and sets modelith.modelDir to the written model so the panels resolve it. bootstrap_project + scaffold_workspace_skeleton reuse the audited init/collab plumbing.
CLI 0.6.7, extension 0.3.15.