Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: include new columns in generated model.csv file #511

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/create/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,14 @@ export async function main(): Promise<void> {

// Prompt the user to select a code generation format
const genFormat = await chooseCodeFormat()
console.log()

// Update the `sde.config.js` file to use the chosen mdl file and
// generate a sample `.check.yaml` file
if (!args.dryRun) {
await updateSdeConfig(projDir, mdlPath, genFormat)
await generateCheckYaml(projDir, mdlPath)
console.log()
}
console.log()

// If the user chose the default template, offer to set up CSV files
if (templateName === 'template-default' && !args.dryRun) {
Expand Down
7 changes: 6 additions & 1 deletion packages/create/src/step-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,13 @@ export async function chooseGenConfig(projDir: string, mdlPath: string): Promise
const origModelCsvContent = await readFile(modelCsvFile, 'utf8')
const modelCsvHeader = origModelCsvContent.split('\n')[0]

// Disable bundled listing and customization features by default
const bundleListing = 'false'
const customLookups = 'false'
const customOutputs = 'false'

// Add line and write out updated `model.csv`
const modelCsvLine = `${initialTime},${finalTime},${datPart}`
const modelCsvLine = `${initialTime},${finalTime},${datPart},${bundleListing},${customLookups},${customOutputs}`
const newModelCsvContent = `${modelCsvHeader}\n${modelCsvLine}\n`
await writeFile(modelCsvFile, newModelCsvContent)

Expand Down