From 005259bf26bc141700863cea8e115421fba5e24d Mon Sep 17 00:00:00 2001 From: tree Date: Wed, 18 May 2022 02:50:40 +0200 Subject: [PATCH] Update --- Makefile | 2 +- spec/22/tracks.yaml | 1 + utils/plan.js | 5 ++++- utils/schema/1/tracks.yaml | 2 ++ utils/update-docs.js | 3 +++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2d1ae62..f51a27b 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ changelog: schedule: plan plan: - deno run --unstable --allow-read --allow-write utils/plan.js + deno run --unstable --allow-read --allow-write utils/plan.js $(num) plan-candidates: js-yaml dist/22/schedule-candidates.json > spec/22/schedule-candidates.yaml diff --git a/spec/22/tracks.yaml b/spec/22/tracks.yaml index 7a2d4e0..185454d 100644 --- a/spec/22/tracks.yaml +++ b/spec/22/tracks.yaml @@ -85,3 +85,4 @@ - id: other name: Ostatní + hidden: true diff --git a/utils/plan.js b/utils/plan.js index b7a38cb..659c6cb 100644 --- a/utils/plan.js +++ b/utils/plan.js @@ -381,7 +381,10 @@ class UTXOPlanner { async function main() { const limit = 100000; let i = 0; + const numResults = Deno.args[0] || 10; + console.log("Planning started .."); + console.log(`Looking for ${numResults} results`); const plans = []; @@ -403,7 +406,7 @@ async function main() { plans.push({ schedule: planner.schedule, metrics }); } - if (plans.length >= 10) { + if (plans.length >= numResults) { const outputFn = "./dist/22/schedule-candidates.json"; console.log(`Writing result: ${outputFn}`); const filtered = plans.sort((x, y) => diff --git a/utils/schema/1/tracks.yaml b/utils/schema/1/tracks.yaml index 0aa74a3..1bb24aa 100644 --- a/utils/schema/1/tracks.yaml +++ b/utils/schema/1/tracks.yaml @@ -15,3 +15,5 @@ items: type: string examples: type: string + hidden: + type: boolean diff --git a/utils/update-docs.js b/utils/update-docs.js index a225040..900a958 100644 --- a/utils/update-docs.js +++ b/utils/update-docs.js @@ -85,6 +85,9 @@ const methods = { async tracksGen() { const output = []; for (const track of tracks) { + if (track.hidden) { + continue; + } output.push( `
\n\n${track.name}\n\n${track.examples.trim()}\n\n
`, );