Skip to content

Commit 6d5fbf7

Browse files
authored
chore(docs): update docusaurus (#1485)
## Type of Work - [x] Patch: X.Y.**Z+1**. **NEGLIGIBLE** visible changes, does not change input or output - OR changes behaviour. Use chore:, refactor: etc - [ ] Minor: X.**Y+1**.Z. Minor changes, might ADD new input (YAML), or other **backwards-compatible** changes. Use feat:, fix: - [ ] Major: **X+1**.Y.Z. Major and most likely **BREAKING** changes, wo. backwards compatibility, or removing temporary backwards compatibility functionality. Use ! or BREAKING:. ## Have you remembered and considered? - [ ] IF FEAT: I have remembered to update documentation - [ ] IF FIX OR FEAT: I have remembered to update manual changelog (`docs/drafts/next.draft.md`) - [ ] IF BREAKING: I have remembered to update migration guide (`docs/docs/migration_guides/`) - [ ] IF BREAKING: I have committed with `BREAKING:` in footer or `!` in header - [ ] I have added tests (if not, comment why) - [x] I have used conventional commits syntax (if you squash, make sure that conventional commit is used) - [ ] I have included the Github issue nr in the footer! ## What is this PR all about? * Updated Docusaurus from `3.9.2` to `3.10.0` ([release notes here](https://docusaurus.io/blog/releases/3.10)) * Since Docusaurus is moving away from proprietary syntax, heading ids had to be changed ([link](https://docusaurus.io/blog/releases/3.10#strict-heading-ids)). So I ran the command `npx docusaurus write-heading-ids --syntax mdx-comment --migrate` to update all heading ids: ```mdx -## My Heading {#my-id} +## My Heading {/* #my-id */} ``` This changed the old ids' syntax, but also created heading ids for all headings. But I think that is a good thing? * Overriding a couple of transitive dependencies to fix high and moderate vulnerabilities * `serialize-javascript` version `7.0.5` to fix https://github.com/equinor/ecalc/security/dependabot/59 (overriding the peer dependency is safe [link](facebook/docusaurus#11801 (comment))) * `lodash-es` version `4.18.1`to fix https://github.com/equinor/ecalc/security/dependabot/62 and https://github.com/equinor/ecalc/security/dependabot/63 ## What else did you consider? We should rename all our `.md` files to `.mdx`, [see documentation here](https://docusaurus.io/blog/releases/3.10#strict-mdx), but this should be done in another PR ## Between the lines?
1 parent a132c19 commit 6d5fbf7

File tree

209 files changed

+1645
-1637
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

209 files changed

+1645
-1637
lines changed

docs/docs/about/getting_started/cli/cli_reference.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $ ecalc [OPTIONS] COMMAND [ARGS]...
3030
* `selftest`: Test that eCalc has been successfully...
3131
* `show`: Command to show information in the model...
3232

33-
## `ecalc run`
33+
## `ecalc run` {/* #ecalc-run */}
3434

3535
**Usage**:
3636

@@ -56,7 +56,7 @@ $ ecalc run [OPTIONS] MODEL_FILE
5656
* `--date-format-option [0|1|2]`: Date format option. 0: "YYYY-MM-DD HH:MM:SS" (Accepted variant of ISO8601), 1: "YYYYMMDD HH:MM:SS" (ISO8601), 2: "DD.MM.YYYY HH:MM:SS". Default 0 (ISO 8601) [default: 0]
5757
* `--help`: Show this message and exit.
5858

59-
## `ecalc selftest`
59+
## `ecalc selftest` {/* #ecalc-selftest */}
6060

6161
Test that eCalc has been successfully installed
6262

@@ -70,7 +70,7 @@ $ ecalc selftest [OPTIONS]
7070

7171
* `--help`: Show this message and exit.
7272

73-
## `ecalc show`
73+
## `ecalc show` {/* #ecalc-show */}
7474

7575
Command to show information in the model or results.
7676

@@ -89,7 +89,7 @@ $ ecalc show [OPTIONS] COMMAND [ARGS]...
8989
* `results`: Show results.
9090
* `yaml`: Show yaml model.
9191

92-
### `ecalc show results`
92+
### `ecalc show results` {/* #ecalc-show-results */}
9393

9494
Show results. You need to run eCalc™ before this will be available.
9595

@@ -110,7 +110,7 @@ $ ecalc show results [OPTIONS]
110110
* `-f, --output-frequency [NONE|YEAR|MONTH|DAY]`: Frequency of output. Options are DAY, MONTH, YEAR. If not specified, it will give time steps equal to the union of all input given with INFLUENCE_TIME_VECTOR set to True. Down-sampling the result may lead to loss of data, and rates such as MW may not add up to cumulative values [default: NONE]
111111
* `--help`: Show this message and exit.
112112

113-
### `ecalc show yaml`
113+
### `ecalc show yaml` {/* #ecalc-show-yaml */}
114114

115115
Show yaml model. This will show the yaml after processing !include.
116116

docs/docs/about/getting_started/cli/faq.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ description: eCalc FAQ
66
While running eCalc as a Unix command-line tool, you may come across seemingly incomprehensible error messages.
77
This page tries to explain some common error messages and proposes how to fix them.
88

9-
## Indentation errors
9+
## Indentation errors {/* #indentation-errors */}
1010
In YAML, the indentation is very important and specifies the level in the hierarchy for the input.
1111
If you have the wrong indentation somewhere, you may get both YAML read errors and/or eCalc setup errors.
1212

13-
### Error messages due to YAML read problems
13+
### Error messages due to YAML read problems {/* #error-messages-due-to-yaml-read-problems */}
1414
The following error messages are common when you have formatting issues in your YAML file:
1515

1616
~~~~~~~~text
@@ -27,7 +27,7 @@ while parsing a block mapping in <setupfile>, line <n>, column <m>
2727
expected <block end>, but found '<block mapping start>'
2828
~~~~~~~~
2929

30-
### Error messages due to invalid eCalc configuration
30+
### Error messages due to invalid eCalc configuration {/* #error-messages-due-to-invalid-ecalc-configuration */}
3131
The configuration expects a sub-hierarchy of data. After reading YAML, this data sub-hierarchy would be of object type
3232
dictionary (dict) and in some cases contain lists or other objects. If invalid data is input, the error message would
3333
indicate that the type is wrong because it is not a 'dict'/'list' or other type
@@ -40,10 +40,10 @@ None should be instance of 'dict'
4040
None should be instance of 'list'
4141
~~~~~~~~
4242

43-
### Proposed solution
43+
### Proposed solution {/* #proposed-solution */}
4444
Check your YAML setup file for correct indentation and correct format of values for each eCalc key.
4545

46-
## Special characters in Unicode
46+
## Special characters in Unicode {/* #special-characters-in-unicode */}
4747
eCalc uses [ruamel.yaml](https://pypi.org/project/ruamel.yaml/) to read the YAML setup files. Some (text) files have an encoding not supported and will thus result in an error message.
4848

4949
One example of this is an unrecognized "[BOM](https://en.wikipedia.org/wiki/Byte_order_mark)" character in "[UTF-8 Unicode](https://nl.wikipedia.org/wiki/UTF-8)".
@@ -55,7 +55,7 @@ while scanning a simple key in "<setupfile.yml>", line <n>, column 1
5555
could not find expected ':', line <n>, column 1
5656
~~~~~~~~
5757

58-
### Proposed solution
58+
### Proposed solution {/* #proposed-solution-1 */}
5959
Check the encoding of your setupfile (and inputfiles):
6060

6161
~~~~~~~~bash

docs/docs/about/getting_started/cli/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ You must minimum have **Python 3.11** installed to use eCalc.
1616

1717
See all commands and options in the [CLI reference](/about/getting_started/cli/cli_reference.md)
1818

19-
## Example Usage
19+
## Example Usage {/* #example-usage */}
2020

21-
#### Use show command to inspect results
21+
#### Use show command to inspect results {/* #use-show-command-to-inspect-results */}
2222

2323
First run ecalc (here shown with default output folder)
2424

@@ -50,22 +50,22 @@ or write the full csv result to a file (this will give the same output as `ecalc
5050
$ ecalc show results --output-format csv --file results.csv
5151
~~~~~~~~
5252

53-
#### Output Monthly CSV data
53+
#### Output Monthly CSV data {/* #output-monthly-csv-data */}
5454
~~~~~~~~bash
5555
$ ecalc run -f MONTH /somelocation/myfield.yml
5656
~~~~~~~~
5757

58-
#### Specify different output folder
58+
#### Specify different output folder {/* #specify-different-output-folder */}
5959
~~~~~~~~bash
6060
$ ecalc run -o /somedirectory/foo/bar/ /somelocation/myfield.yml
6161
~~~~~~~~
6262

63-
#### Specify a different naming prefix to outputs
63+
#### Specify a different naming prefix to outputs {/* #specify-a-different-naming-prefix-to-outputs */}
6464
~~~~~~~~bash
6565
$ ecalc run -n myfield_myproject /somelocation/myfield.yml
6666
~~~~~~~~
6767

68-
#### Show stack trace for debugging
68+
#### Show stack trace for debugging {/* #show-stack-trace-for-debugging */}
6969
~~~~~~~~bash
7070
$ ecalc run --log DEBUG /somelocation/myfield.yml
7171
~~~~~~~~

docs/docs/about/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: Introduction to eCalc documentation
99

1010
The eCalc™ technology is being developed by Equinor within the Technology, Digital and Innovation (TDI) business area.
1111

12-
## What is eCalc™?
12+
## What is eCalc™? {/* #what-is-ecalc */}
1313
eCalc™ is a software tool for calculation of energy demand and greenhouse gas emissions from oil and gas production and processing. It enables the cross-disciplinary collaboration required to achieve high-quality and transparent energy and GHG emission prognosis and decision support.
1414

1515
eCalc™ performs energy and emission calculations by integrating data, knowledge and future plans from different disciplines. This could be production and injection profiles from the reservoir engineer, characteristics of energy consuming equipment units such as gas turbines, compressors and pumps from the facility engineer, and emission factors for different fuels from the sustainability engineer. The main idea is using physical or data-driven models to relate production rates and pressures to the required processing energy and resulting emissions. Integrated bookkeeping for all emission sources is offered.
@@ -19,10 +19,10 @@ eCalc™ uses a bottom-up approach to give high-quality installation and portfol
1919
![](ecalc_illustration.svg)
2020

2121

22-
### Why should I use eCalc™?
22+
### Why should I use eCalc™? {/* #why-should-i-use-ecalc */}
2323
By using eCalc™ you will be able to forecast your energy consumption and emissions with consistency and transparency. You will also be enabled to study the effect on energy demand and emissions of your investment opportunities as well as studying emission reduction measures.
2424

25-
### How to use eCalc™?
25+
### How to use eCalc™? {/* #how-to-use-ecalc */}
2626
To use eCalc™ you need to create a model setup of your asset.
2727
This is described in the [Modelling](/about/modelling/index.md) section.
2828

docs/docs/about/migration_guides/v10.0_to_v11.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_position: -14
66

77
# v10.0 to v11.0
88

9-
### Migration overview
9+
### Migration overview {/* #migration-overview */}
1010

1111
- Make sure that `NAME` across your model is **UNIQUE**
1212
- Make sure that `PRESSURE` is > 0 if `RATE` > 0

docs/docs/about/migration_guides/v11.0_to_v12.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_position: -15
66

77
# v11.0 to v12.0
88

9-
### Migration overview
9+
### Migration overview {/* #migration-overview */}
1010

1111
- If you have been using `GENERIC_FROM_INPUT` in a `SIMPLIFIED_COMPRESSOR_TRAIN` either directly or indirectly (e.g. through `COMPRESSOR_WITH_TURBINE`), you
1212
will either need to

docs/docs/about/migration_guides/v12.0_to_v13.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ sidebar_position: -16
66

77
# v12.0 to v13.0
88

9-
### Migration overview
9+
### Migration overview {/* #migration-overview */}
1010

11-
#### Migrate ADJUSTMENT section for FACILITY_INPUTS
11+
#### Migrate ADJUSTMENT section for FACILITY_INPUTS {/* #migrate-adjustment-section-for-facility_inputs */}
1212

1313
If you have been using [ADJUSTMENT](../references/ADJUSTMENT) section for `FACILITY_INPUTS`, you will need to adjust your input data accordingly, as this section has been removed in v13.0).
1414

docs/docs/about/migration_guides/v7_to_v8.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ In this migration guide you will find:
1111
1. [YAML changes](#yaml-migration)
1212
2. [CLI changes](#cli-migration)
1313

14-
## Yaml migration
14+
## Yaml migration {/* #yaml-migration */}
1515

16-
### Migration overview
16+
### Migration overview {/* #migration-overview */}
1717

1818
This doc guides you through migrating an existing eCalc™ model from version v7 to v8.
1919

2020
We try to make this as easy as possible, and provide a step-by-step migration guide.
2121

22-
### Main differences
22+
### Main differences {/* #main-differences */}
2323
1. All component names must be unique to avoid ambiguity in reporting
2424
2. UNITS are required when setting up compressor and pump charts
2525
3. Restrict allowed characters in component names and emission names
2626
4. NAME no longer used for LTP reporting, use CATEGORY instead
2727
5. Not possible to use custom category names, pre-defined categories must be uppercase with hyphen as separator (i.e. FUEL-GAS)
2828

29-
#### 1. All component names must be unique
29+
#### 1. All component names must be unique {/* #1-all-component-names-must-be-unique */}
3030

3131
All component names must be unique in order to avoid ambiguity in reporting. Components include asset/ecalc-model, installation,
3232
generator sets, electricity consumers, fuel consumers and direct emitters.
@@ -141,7 +141,7 @@ CATEGORY:
141141
See [Power from shore](../modelling/setup/installations/generator_sets_in_calculations.md#power-from-shore) for more information.
142142
:::
143143

144-
#### 2. UNITS for pump and compressor charts
144+
#### 2. UNITS for pump and compressor charts {/* #2-units-for-pump-and-compressor-charts */}
145145

146146
Compressor and pump charts has previously had implicit units, without requiring the operator to specify what
147147
units are actually being used. This increases the risk of wrong specification, and makes it more difficult to hand
@@ -210,14 +210,14 @@ and [PUMP CHART](../modelling/setup/facility_inputs/pump_modelling/pump_charts)
210210
for more details about the relevant keywords.
211211

212212

213-
#### 3. Restrict allowed characters in component names and emission names
213+
#### 3. Restrict allowed characters in component names and emission names {/* #3-restrict-allowed-characters-in-component-names-and-emission-names */}
214214

215215
Component names can now only consist of letters (a-z, upper and lower case), numbers (0-9), underscore (`_`), hyphen (`-`) and space (` `).
216216

217217
Emission names can now only consist of letters (a-z, upper and lower case), numbers (0-9) and underscore (`_`).
218218

219219

220-
#### 4. NAME no longer used for LTP reporting, use CATEGORY instead
220+
#### 4. NAME no longer used for LTP reporting, use CATEGORY instead {/* #4-name-no-longer-used-for-ltp-reporting-use-category-instead */}
221221

222222
We have categories for FLARE and COLD-VENTING-FUGITIVE, and have introduced categories for LOADING and STORAGE. These should now be used instead of NAME.
223223

@@ -275,12 +275,12 @@ INSTALLATIONS:
275275
```
276276

277277

278-
#### 5. Not possible to use custom category names, pre-defined categories must be uppercase with hyphen as separator (i.e. FUEL-GAS)
278+
#### 5. Not possible to use custom category names, pre-defined categories must be uppercase with hyphen as separator (i.e. FUEL-GAS) {/* #5-not-possible-to-use-custom-category-names-pre-defined-categories-must-be-uppercase-with-hyphen-as-separator-ie-fuel-gas */}
279279

280280
Only a limited pre-defined set of categories is valid input to the CATEGORY-keyword, it is no longer possible to use custom names.
281281
The input is case-sensitive and must match exactly with the pre-defined names. See [CLI Docs](../references/CATEGORY) for full documentation.
282282

283-
## CLI migration
283+
## CLI migration {/* #cli-migration */}
284284

285285
This version includes some changes to how the CLI is invoked and changes to default behavior.
286286

@@ -291,7 +291,7 @@ This version includes some changes to how the CLI is invoked and changes to defa
291291
5. Argument for LTP export has changed from: `--centuries-ltp-export` to `--ltp-export`
292292
6. Simple results are now default for json
293293

294-
#### 1. Invoking eCalc™ directly is no longer supported, use `ecalc run` instead.
294+
#### 1. Invoking eCalc™ directly is no longer supported, use `ecalc run` instead. {/* #1-invoking-ecalc-directly-is-no-longer-supported-use-ecalc-run-instead */}
295295

296296
To make it possible to add `ecalc show` we added the `ecalc run` command. In v8 it is required to specify `run` when calculating a model.
297297

@@ -307,7 +307,7 @@ you should now use
307307
$ ecalc run ./my-model.yaml
308308
~~~~~~~~
309309

310-
#### 2. Log level should be specified as the first argument + log to file
310+
#### 2. Log level should be specified as the first argument + log to file {/* #2-log-level-should-be-specified-as-the-first-argument--log-to-file */}
311311

312312
Previously you could specify the `--log` argument after `run`, this is no longer possible.
313313

@@ -329,27 +329,27 @@ $ ecalc --log DEBUG --log-folder . run ./my-model.yaml
329329

330330
As you see above, the argument **MUST** be added **BEFORE** the `run` argument.
331331

332-
#### 3. Model yaml-file needs to come last
332+
#### 3. Model yaml-file needs to come last {/* #3-model-yaml-file-needs-to-come-last */}
333333

334334
When running eCalc™ you will now need to set the model file argument last.
335335

336336
`ecalc [OPTIONS] COMMAND [ARGS] [MODEL YAML-file]`
337337

338338
See the [CLI Docs](../getting_started/cli/cli_reference) or run `ecalc --help` for the full documentation.
339339

340-
#### 4. Extrapolation correction is no longer optional
340+
#### 4. Extrapolation correction is no longer optional {/* #4-extrapolation-correction-is-no-longer-optional */}
341341

342342
We have removed the extrapolation correction argument. eCalc™ will now always "extrapolate" values.
343343
The main reason for making this change was that the feature was in general always used, in addition to being a confusing term.
344344
Let us know if you have a use-case where this was needed.
345345

346-
#### 5. Argument for LTP export has changed from: `--centuries-ltp-export` to `--ltp-export`
346+
#### 5. Argument for LTP export has changed from: `--centuries-ltp-export` to `--ltp-export` {/* #5-argument-for-ltp-export-has-changed-from---centuries-ltp-export-to---ltp-export */}
347347

348348
To prepare for Open Source and to make the LTP export more agnostic (even though the column names are heavily
349349
affected by Centuries), we simplify the argument to get LTP results. See [CLI Docs](../getting_started/cli/cli_reference) for
350350
full documentation.
351351

352-
#### 6. Simple results are now default for json
352+
#### 6. Simple results are now default for json {/* #6-simple-results-are-now-default-for-json */}
353353
Detailed output (or any json) should mainly be used for QA and advanced users, and is no longer shown by default. To keep old behavior, the user now
354354
needs to use the --detailed-output option when running the CLI. See [CLI reference docs](../getting_started/cli/cli_reference#ecalc-run)
355355
for more details.

docs/docs/about/migration_guides/v8-0_to_v81.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ In this migration guide you will find:
1010

1111
1. [YAML changes](#yaml-migration)
1212

13-
## Yaml migration
13+
## Yaml migration {/* #yaml-migration */}
1414

15-
### Migration overview
15+
### Migration overview {/* #migration-overview */}
1616

1717
This doc guides you through migrating an existing eCalc™ model from version v8 to v8.1.
1818

1919
We try to make this as easy as possible, and provide a step-by-step migration guide.
2020

21-
### 1. Changes to TIME_SERIES
21+
### 1. Changes to TIME_SERIES {/* #1-changes-to-time_series */}
2222
- `RATE_INTERPOLATION_TYPE` is renamed to [`INTERPOLATION_TYPE`](../references/INTERPOLATION_TYPE)
2323
- New time series type: `DEFAULT` with default `RIGHT` interpolation
2424
- `RESERVOIR` type is removed
@@ -83,7 +83,7 @@ somebody that can help you out to make this right. The consequences of doing it
8383
easily offset by 1 year.
8484
:::
8585

86-
### 2. Not possible to have different interpolation types for vectors within one file
86+
### 2. Not possible to have different interpolation types for vectors within one file {/* #2-not-possible-to-have-different-interpolation-types-for-vectors-within-one-file */}
8787

8888
Previously eCalc™ tried to recognize vectors as rates- or non-rates for time series.
8989
Hence, rate-vectors were set to use `LEFT` interpolation type, or if the type was
@@ -98,13 +98,13 @@ rate vectors. If different vectors (e.g. pressures and rates) should be interpol
9898
to be in separate files.
9999
:::
100100

101-
### 3. Empty data in time series columns no longer allowed
101+
### 3. Empty data in time series columns no longer allowed {/* #3-empty-data-in-time-series-columns-no-longer-allowed */}
102102

103103
Each column in a time series resource should have data for all time steps, eCalc™ will now show an error if this is not the case.
104104
The reason behind this is that it can be ambiguous to know whether missing data should be interpolated or considered as 0. Now
105105
users will have to be explicit, and this will lead to fewer ambiguities and errors.
106106

107-
### 4. New LTP Category: STEAM-TURBINE-GENERATOR
107+
### 4. New LTP Category: STEAM-TURBINE-GENERATOR {/* #4--new-ltp-category-steam-turbine-generator */}
108108

109109
A new LTP requirement to report steam turbine generator consumption/generation. This affects the total generator production
110110
negatively (reduced load), as some energy is provided through this steam turbine generator. It is therefore modelled as a consumer

0 commit comments

Comments
 (0)