From 66c7c100390601267eba80ba62916592e37e0984 Mon Sep 17 00:00:00 2001 From: Thomas Falch Johansen Date: Wed, 23 Oct 2024 12:02:51 +0200 Subject: [PATCH] chore: make it easier to generate changelog on release (#660) use jinja2 templates to allow for automatic generation updated last 6 changelogs that were missing Refs: ECALC-1630 --- docs/config/meta.json | 1 + docs/docs/changelog/meta.json | 0 docs/docs/changelog/separator.md | 7 - docs/docs/changelog/v8-21.md | 4 +- docs/docs/changelog/{next.md => v8-22.md} | 30 ++-- docs/docs/changelog/v8-23.md | 23 ++++ docs/docs/changelog/v8-24.md | 17 +++ docs/docs/changelog/v8-25.md | 17 +++ docs/docs/changelog/v8-26.md | 22 +++ docs/drafts/next.draft.md | 15 ++ docs/src/pages/versions.tsx | 160 ---------------------- docs/templates/next.md.template | 16 +++ 12 files changed, 122 insertions(+), 190 deletions(-) create mode 100644 docs/config/meta.json delete mode 100644 docs/docs/changelog/meta.json delete mode 100644 docs/docs/changelog/separator.md rename docs/docs/changelog/{next.md => v8-22.md} (52%) create mode 100644 docs/docs/changelog/v8-23.md create mode 100644 docs/docs/changelog/v8-24.md create mode 100644 docs/docs/changelog/v8-25.md create mode 100644 docs/docs/changelog/v8-26.md create mode 100644 docs/drafts/next.draft.md delete mode 100644 docs/src/pages/versions.tsx create mode 100644 docs/templates/next.md.template diff --git a/docs/config/meta.json b/docs/config/meta.json new file mode 100644 index 0000000000..2323123705 --- /dev/null +++ b/docs/config/meta.json @@ -0,0 +1 @@ +{"current_index": -36} \ No newline at end of file diff --git a/docs/docs/changelog/meta.json b/docs/docs/changelog/meta.json deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/docs/changelog/separator.md b/docs/docs/changelog/separator.md deleted file mode 100644 index 6a3000e4e8..0000000000 --- a/docs/docs/changelog/separator.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -slug: separator -title: --- -authors: ecalc-team -tags: [release, eCalc] -sidebar_position: -1000 ---- diff --git a/docs/docs/changelog/v8-21.md b/docs/docs/changelog/v8-21.md index e0b49b4b1b..bb28475e02 100644 --- a/docs/docs/changelog/v8-21.md +++ b/docs/docs/changelog/v8-21.md @@ -1,9 +1,9 @@ --- slug: v8.21-release -title: v8.21 (Latest) +title: v8.21 authors: ecalc-team tags: [release, eCalc] -sidebar_position: -1001 +sidebar_position: -30 --- # eCalc diff --git a/docs/docs/changelog/next.md b/docs/docs/changelog/v8-22.md similarity index 52% rename from docs/docs/changelog/next.md rename to docs/docs/changelog/v8-22.md index bc72526121..3eff18fe80 100644 --- a/docs/docs/changelog/next.md +++ b/docs/docs/changelog/v8-22.md @@ -1,14 +1,12 @@ --- -slug: latest -title: Next +slug: "v8.22-release" +title: "v8.22" authors: ecalc-team tags: [release, eCalc] -sidebar_position: -1002 +sidebar_position: -31 --- -# eCalc - - +# eCalc v8.22 ## New Features @@ -21,28 +19,18 @@ sidebar_position: -1002 is any downstream choking, this will happen between the outlet of the last compressor stage and the outlet of the compressor train. This means that in a situation with downstream choking, the fluid stream leaving the compressor train will have lower e.g. pressure and density than the fluid stream leaving the last compressor stage. -- `POWER_ADJUSTMENT_FACTOR` for models: Optional factor to adjust the power (MW). Previously only the - `POWER_ADJUSTMENT_CONSTANT` has been available for models, now it is possible to adjust/scale the power with a - constant and a factor. It can be used to calibrate equipment. -## Fixes + +## Bug Fixes - If a compressor train is not able to reach the requested inlet or outlet pressure, both the compressor stages and the compressor train used to be reported as invalid. This is now changed. If the compressor stages are operating within their capacity, they will now be reported as valid even if the compressor train as a whole is not able to reach the requested inlet or outlet pressures. -- Emission intensities are no longer calculated and reported in the results, due to the following discrepancies: -CO2 intensity is defined as the total emission divided by the total HC export. eCalc only calculates the future data, so the correct CO2 intensity should be found by adding the historical to these future data. The hydrocarbon export rate is still reported to help the user calculate the CO2 intensity outside of eCalc. -Methane intensity was incorrectly calculated based on HC export. The common definition is the methane emission divided by the natural gas throughput of the wanted equipment- or installation level. This is safest done outside of eCalc to ensure proper definition. ## Breaking changes - This version includes a rewrite of the yaml validation, which should catch more errors than before. - - Main changes: - - Economics has been removed. TAX, PRICE and QUOTA keywords will now give an error. - - Misplaced keywords will now cause an error instead of being ignored. - -- H2O is no longer supported in composition. Use 'water' instead. - -- The CLI command `ecalc show results` has been removed. The reason being additional maintenance for something that did not seem to be used a lot. +- Economics has been removed. TAX, PRICE and QUOTA keywords will now give an error. +- Misplaced keywords will now cause an error instead of being ignored. + \ No newline at end of file diff --git a/docs/docs/changelog/v8-23.md b/docs/docs/changelog/v8-23.md new file mode 100644 index 0000000000..09e02394e2 --- /dev/null +++ b/docs/docs/changelog/v8-23.md @@ -0,0 +1,23 @@ +--- +slug: "v8.23-release" +title: "v8.23" +authors: ecalc-team +tags: [release, eCalc] +sidebar_position: -32 +--- + +# eCalc v8.23 + +## Features + +- `POWER_ADJUSTMENT_FACTOR` for models: Optional factor to adjust the power (MW). Previously only the + `POWER_ADJUSTMENT_CONSTANT` has been available for models, now it is possible to adjust/scale the power with a + constant and a factor. It can be used to calibrate equipment. + +## Bug Fixes + +- Default pressure control was added to variable speed train, but missing for single speed and multiple streams. + +## Breaking changes + +- H2O is no longer supported in composition. Use 'water' instead. diff --git a/docs/docs/changelog/v8-24.md b/docs/docs/changelog/v8-24.md new file mode 100644 index 0000000000..845d384a89 --- /dev/null +++ b/docs/docs/changelog/v8-24.md @@ -0,0 +1,17 @@ +--- +slug: "v8.24-release" +title: "v8.24" +authors: ecalc-team +tags: [release, eCalc] +sidebar_position: -33 +--- + +# eCalc v8.24 + +Security updates only. + +## Features + +## Bug Fixes + +## Breaking changes \ No newline at end of file diff --git a/docs/docs/changelog/v8-25.md b/docs/docs/changelog/v8-25.md new file mode 100644 index 0000000000..6dd6a3c615 --- /dev/null +++ b/docs/docs/changelog/v8-25.md @@ -0,0 +1,17 @@ +--- +slug: "v8.25-release" +title: "v8.25" +authors: ecalc-team +tags: [release, eCalc] +sidebar_position: -34 +--- + +# eCalc v8.25 + +## Features + +## Bug Fixes + +## Breaking changes + +- The CLI command `ecalc show results` has been removed. The reason being additional maintenance for something that did not seem to be used a lot. diff --git a/docs/docs/changelog/v8-26.md b/docs/docs/changelog/v8-26.md new file mode 100644 index 0000000000..ff98001505 --- /dev/null +++ b/docs/docs/changelog/v8-26.md @@ -0,0 +1,22 @@ +--- +slug: "v8.26-release" +title: "v8.26" +authors: ecalc-team +tags: [release, eCalc] +sidebar_position: -35 +--- + +# eCalc v8.26 + +## Features + +## Bug Fixes + +- Emission intensities are no longer calculated and reported in the results, due to the following discrepancies: +CO2 intensity is defined as the total emission divided by the total HC export. eCalc only calculates the future data, so the correct CO2 intensity should be found by adding the historical to these future data. The hydrocarbon export rate is still reported to help the user calculate the CO2 intensity outside of eCalc. +Methane intensity was incorrectly calculated based on HC export. The common definition is the methane emission divided by the natural gas throughput of the wanted equipment- or installation level. This is safest done outside of eCalc to ensure proper definition. + + +## Breaking changes + + diff --git a/docs/drafts/next.draft.md b/docs/drafts/next.draft.md new file mode 100644 index 0000000000..62e0bf8119 --- /dev/null +++ b/docs/drafts/next.draft.md @@ -0,0 +1,15 @@ +--- +slug: "{{ version_slug }}" +title: "{{ version_title }}" +authors: ecalc-team +tags: [release, eCalc] +sidebar_position: -36 +--- + +# eCalc {{ version }} + +## Features + +## Bug Fixes + +## Breaking changes diff --git a/docs/src/pages/versions.tsx b/docs/src/pages/versions.tsx deleted file mode 100644 index eeff66d267..0000000000 --- a/docs/src/pages/versions.tsx +++ /dev/null @@ -1,160 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import React from 'react'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import Link from '@docusaurus/Link'; -import Translate from '@docusaurus/Translate'; -import { - useVersions, - useLatestVersion, -} from '@docusaurus/plugin-content-docs/lib/client'; -import Layout from '@theme/Layout'; -import Heading from '@theme/Heading'; - -const docsPluginId = undefined; // Default docs plugin instance - -function DocumentationLabel() { - return ( - Documentation - ); -} - -function ReleaseNotesLabel() { - return ( - - Release Notes - - ); -} - -export default function Version(): JSX.Element { - const { - siteConfig: { organizationName, projectName }, - } = useDocusaurusContext(); - const versions = useVersions(docsPluginId); - const latestVersion = useLatestVersion(docsPluginId); - const currentVersion = versions.find( - (version) => version.name === 'current', - )!; - const pastVersions = versions.filter( - (version) => version !== latestVersion && version.name !== 'current', - ); - const repoUrl = `https://github.com/${organizationName!}/${projectName!}`; - - return ( - -
- - - eCalc documentation versions - - - -
- - - Current version (Stable) - - -

- - Here you can find the documentation for current released version. - -

- - - - - - - - -
{latestVersion.label} - - - - - - - -
-
- - {currentVersion !== latestVersion && ( -
- - - Next version (Unreleased) - - -

- - Here you can find the documentation for work-in-process - unreleased version. - -

- - - - - - - - -
{currentVersion.label} - - - - - - - -
-
- )} - - {pastVersions.length > 0 && ( -
- - - Past versions (Not maintained anymore) - - -

- - Here you can find documentation for previous versions of eCalc. - -

- - - {pastVersions.map((version) => ( - - - - - - ))} - -
{version.label} - - - - - - - -
-
- )} -
-
- ); -} diff --git a/docs/templates/next.md.template b/docs/templates/next.md.template new file mode 100644 index 0000000000..d83d764efa --- /dev/null +++ b/docs/templates/next.md.template @@ -0,0 +1,16 @@ +--- +slug: "{{ version_slug }}" +title: "{{ version_title }}" +authors: ecalc-team +tags: [release, eCalc] +sidebar_position: {{ index }} +--- + +# eCalc {{ version }} + +## Features + +## Bug Fixes + +## Breaking changes +