Skip to content

Commit

Permalink
docs: move keywords to level 1
Browse files Browse the repository at this point in the history
ECALC-579
  • Loading branch information
frodehk committed Aug 26, 2024
1 parent a430ab0 commit c4f9d0a
Show file tree
Hide file tree
Showing 146 changed files with 781 additions and 779 deletions.
File renamed without changes.
130 changes: 130 additions & 0 deletions docs/docs/about/getting_started/cli/cli_reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
---
sidebar_position: 7
description: eCalc FAQ
title: CLI reference
---

# `ecalc`
Args: log_level: Log level of the CLI logger, defaults to INFO log_folder: Path to location of log files version: Option to show libecalc version.

Returns:

**Usage**:

```console
$ ecalc [OPTIONS] COMMAND [ARGS]...
```

**Options**:

* `--log [CRITICAL|FATAL|ERROR|WARNING|INFO|DEBUG|NOTSET]`: Set the loglevel. [default: INFO]
* `--log-folder PATH`: Store log files in a folder
* `--version`: Show current eCalc™ version.
* `--install-completion`: Install completion for the current shell.
* `--show-completion`: Show completion for the current shell, to copy it or customize the installation.
* `--help`: Show this message and exit.

**Commands**:

* `run`
* `selftest`: Test that eCalc has been successfully...
* `show`: Command to show information in the model...

## `ecalc run`

**Usage**:

```console
$ ecalc run [OPTIONS] MODEL_FILE
```

**Arguments**:

* `MODEL_FILE`: The Model YAML-file specifying time series inputs, facility inputs and the relationship between energy consumers. [required]

**Options**:

* `-f, --output-frequency, --outputfrequency [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]
* `-c, --csv`: Toggle output of csv data. [default: True]
* `--json`: Toggle output of json output.
* `-o, --output-folder, --outputfolder PATH`: Outputfolder. Defaults to output/ relative to the yml setup file
* `-n, --name-prefix, --nameprefix TEXT`: Name prefix for output data. Defaults to name of setup file.
* `--ltp-export`: In addition to standard output, a specific Long Term Prognosis (LTP) file will be provided for simple export of LTP relevant data (Tabular Separated Values).
* `--stp-export`: In addition to standard output, a specific Short Term Prognosis (STP) file will be provided for simple export of STP relevant data (Tabular Separated Values).
* `--flow-diagram`: Output the input model formatted to be displayed in a custom flow diagram format in JSON
* `--detailed-output, --detailedoutput`: Output detailed output. When False you will get basic results such as energy usage, power, time vector.
* `--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]
* `--help`: Show this message and exit.

## `ecalc selftest`

Test that eCalc has been successfully installed

**Usage**:

```console
$ ecalc selftest [OPTIONS]
```

**Options**:

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

## `ecalc show`

Command to show information in the model or results.

**Usage**:

```console
$ ecalc show [OPTIONS] COMMAND [ARGS]...
```

**Options**:

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

**Commands**:

* `results`: Show results.
* `yaml`: Show yaml model.

### `ecalc show results`

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

**Usage**:

```console
$ ecalc show results [OPTIONS]
```

**Options**:

* `-n, --name TEXT`: Filter the results to only show the component with this name
* `--output-format [csv|json]`: Show the data in this format. [default: json]
* `--file PATH`: Write the data to a file with the specified name.
* `--output-folder PATH`: Output folder. Defaults to current working directory
* `--detailed-output`: Output detailed output. When False you will get basic energy usage and emissions results
* `--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]
* `-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]
* `--help`: Show this message and exit.

### `ecalc show yaml`

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

**Usage**:

```console
$ ecalc show yaml [OPTIONS] MODEL_FILE
```

**Arguments**:

* `MODEL_FILE`: YAML file specifying time series inputs, facility inputs and the relationship between energy consumers. [required]

**Options**:

* `--file PATH`: Write the data to a file with the specified name.
* `--help`: Show this message and exit.
125 changes: 1 addition & 124 deletions docs/docs/about/getting_started/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,129 +12,7 @@ It is currently **recommended** to use the CLI instead of the Python library dir
The current recommended way to use eCalc is through the CLI (Command Line Interpreter). This is a part of the
eCalc Python library, and should be accessible from the command line as `ecalc`.


# `ecalc`

**Usage**:

```console
$ ecalc [OPTIONS] COMMAND [ARGS]...
```

**Options**:

* `--log [CRITICAL|FATAL|ERROR|WARNING|INFO|DEBUG|NOTSET]`: Set the loglevel. [default: INFO]
* `--log-folder PATH`: Store log files in a folder
* `--version`: Show current eCalc™ version.
* `--install-completion`: Install completion for the current shell.
* `--show-completion`: Show completion for the current shell, to copy it or customize the installation.
* `--help`: Show this message and exit.

**Commands**:

* `run`
* `selftest`: Test that eCalc has been successfully...
* `show`: Command to show information in the model...

## `ecalc run`

**Usage**:

```console
$ ecalc run [OPTIONS] MODEL_FILE
```

**Arguments**:

* `MODEL_FILE`: The Model YAML-file specifying time series inputs, facility inputs and the relationship between energy consumers. [required]

**Options**:

* `-f, --output-frequency, --outputfrequency [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]
* `-c, --csv`: Toggle output of csv data. [default: True]
* `--json`: Toggle output of json output.
* `-o, --output-folder, --outputfolder PATH`: Outputfolder. Defaults to output/ relative to the yml setup file
* `-n, --name-prefix, --nameprefix TEXT`: Name prefix for output data. Defaults to name of setup file.
* `--ltp-export`: In addition to standard output, a specific Long Term Prognosis (LTP) file will be provided for simple export of LTP relevant data (Tabular Separated Values).
* `--stp-export`: In addition to standard output, a specific Short Term Prognosis (STP) file will be provided for simple export of STP relevant data (Tabular Separated Values).
* `--flow-diagram`: Output the input model formatted to be displayed in a custom flow diagram format in JSON
* `--detailed-output, --detailedoutput`: Output detailed output. When False you will get basic results such as energy usage, power, time vector.
* `--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]
* `--help`: Show this message and exit.

## `ecalc selftest`

Test that eCalc has been successfully installed

**Usage**:

```console
$ ecalc selftest [OPTIONS]
```

**Options**:

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

## `ecalc show`

Command to show information in the model or results.

**Usage**:

```console
$ ecalc show [OPTIONS] COMMAND [ARGS]...
```

**Options**:

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

**Commands**:

* `results`: Show results.
* `yaml`: Show yaml model.

### `ecalc show results`

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

**Usage**:

```console
$ ecalc show results [OPTIONS]
```

**Options**:

* `-n, --name TEXT`: Filter the results to only show the component with this name
* `--output-format [csv|json]`: Show the data in this format. [default: json]
* `--file PATH`: Write the data to a file with the specified name.
* `--output-folder PATH`: Output folder. Defaults to current working directory
* `--detailed-output`: Output detailed output. When False you will get basic energy usage and emissions results
* `--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]
* `-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]
* `--help`: Show this message and exit.

### `ecalc show yaml`

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

**Usage**:

```console
$ ecalc show yaml [OPTIONS] MODEL_FILE
```

**Arguments**:

* `MODEL_FILE`: YAML file specifying time series inputs, facility inputs and the relationship between energy consumers. [required]

**Options**:

* `--file PATH`: Write the data to a file with the specified name.
* `--help`: Show this message and exit.

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

## Example Usage

Expand Down Expand Up @@ -189,4 +67,3 @@ $ ecalc run -n myfield_myproject /somelocation/myfield.yml
~~~~~~~~bash
$ ecalc run --log DEBUG /somelocation/myfield.yml
~~~~~~~~

2 changes: 1 addition & 1 deletion docs/docs/about/getting_started/library/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ It is currently **not recommended** to use the Python library due to upcoming br
If you choose to use the Python library programmatically when creating eCalc models, there is a greater flexibility in
dynamically changing the eCalc models.

See all commands and options in the [API reference](/about/references/api/index.md)
See all commands and options in the [API reference](/about/getting_started/api/index.md)
2 changes: 1 addition & 1 deletion docs/docs/about/getting_started/yaml/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ We have chosen the way to model eCalc models is in the YAML format. For a simple
The eCalc YAML model can either be run directly with the [eCalc CLI](/about/getting_started/cli/index.md) or loaded using the [Python library](../library)

For getting started setting up your first eCalc YAML model, please see [Setup an eCalc Model](/about/modelling/setup/index.md),
look at some example YAMLs [here](/about/modelling/examples/index.md) and refer to the vocabulary that we use [here](/about/references/keywords/index.md).
look at some example YAMLs [here](/about/modelling/examples/index.md) and refer to the vocabulary that we use [here](/about/references/index.md).
12 changes: 6 additions & 6 deletions docs/docs/about/migration_guides/v7_to_v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ INSTALLATIONS:
This will make it possible to attribute results to each consumer by name, and removes any an ambiguity
when interpreting eCalc™ results.
See [INSTALLATION](../references/keywords/INSTALLATIONS.md),
[GENERATORSET](../references/keywords/GENERATORSETS.md),
[CONSUMERS](../references/keywords/CONSUMERS.md),
[FUELCONSUMERS](../references/keywords/FUELCONSUMERS.md),
[VENTING_EMITTER](../references/keywords/VENTING_EMITTERS.md)
See [INSTALLATION](../references/INSTALLATIONS.md),
[GENERATORSET](../references/GENERATORSETS.md),
[CONSUMERS](../references/CONSUMERS.md),
[FUELCONSUMERS](../references/FUELCONSUMERS.md),
[VENTING_EMITTER](../references/VENTING_EMITTERS.md)
for more details about the relevant keywords.
:::tip Are you using power from shore?
Expand Down Expand Up @@ -278,7 +278,7 @@ INSTALLATIONS:
#### 5. Not possible to use custom category names, pre-defined categories must be uppercase with hyphen as separator (i.e. FUEL-GAS)

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

## CLI migration

Expand Down
10 changes: 5 additions & 5 deletions docs/docs/about/migration_guides/v8-1_to_v8-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sidebar_position: 2

#### LTP

1. Two new consumer categories are added: [`HEATER`](../references/keywords/CATEGORY) and [`BOILER`](../references/keywords/CATEGORY)
1. Two new consumer categories are added: [`HEATER`](../references/CATEGORY) and [`BOILER`](../references/CATEGORY)

## Result

Expand All @@ -27,7 +27,7 @@ Consumer systems will now refer to the first operational setting as **1** instea
### Resampling of rates changed from forward filling to average rates

All calculations are performed on a global time vector, which is the union of all dates found in the
input resource files (csv files) where [INFLUENCE_TIME_VECTOR](../references/keywords/INFLUENCE_TIME_VECTOR) is set to
input resource files (csv files) where [INFLUENCE_TIME_VECTOR](../references/INFLUENCE_TIME_VECTOR) is set to
True, dates found in the eCalc model yaml-file (temporal models), and dates in the requested output frequency.

If the global time vector and the dates in the requested output frequency does not coincide fully, a resampling of the
Expand All @@ -45,9 +45,9 @@ TLDR; this change will make it possible to use the rate output data (rate from a

### LTP .tsv file
1. Column Total CO2 is removed from LTP output (both for fixed & mobile installations)
2. Add relevant columns in ltp-file for the two new consumer categories [`HEATER`](../references/keywords/CATEGORY) and [`BOILER`](../references/keywords/CATEGORY)
2. Add relevant columns in ltp-file for the two new consumer categories [`HEATER`](../references/CATEGORY) and [`BOILER`](../references/CATEGORY)
3. Re-order some of the columns in the ltp-file, for more logical order
4. Turbine-columns are now filtered on the two consumer categories [`TURBINE-GENERATOR`](../references/keywords/CATEGORY) and [`GAS-DRIVEN-COMPRESSOR`](../references/keywords/CATEGORY), as it is no longer only turbines that are consumers of FUEL-GAS
4. Turbine-columns are now filtered on the two consumer categories [`TURBINE-GENERATOR`](../references/CATEGORY) and [`GAS-DRIVEN-COMPRESSOR`](../references/CATEGORY), as it is no longer only turbines that are consumers of FUEL-GAS

### STP .tsv file
1. Report CO2 emissions for both fixed- and mobile installations
Expand Down Expand Up @@ -85,7 +85,7 @@ This will/may also affect the order of which emissions are presented in the resu

## Conditions

eCalc will now consistently NOT evaluate and run calculations if a [CONDITION](../references/keywords/CONDITION) is not fulfilled. Conditions can be set on most energy consumers, to indicate whether the consumer is active or not at a given timestep. Previously the consumer was evaluated even though a condition was not fulfilled to reflect "what would have happened if it was active". However this has proven to be difficult for users to understand and remember when the overall model result is being evaluated and analyzed. In order to prevent user errors, we have decided to consistently **NOT** evaluate a consumer for timesteps where it is disabled (conditions evaluated to true).
eCalc will now consistently NOT evaluate and run calculations if a [CONDITION](../references/CONDITION) is not fulfilled. Conditions can be set on most energy consumers, to indicate whether the consumer is active or not at a given timestep. Previously the consumer was evaluated even though a condition was not fulfilled to reflect "what would have happened if it was active". However this has proven to be difficult for users to understand and remember when the overall model result is being evaluated and analyzed. In order to prevent user errors, we have decided to consistently **NOT** evaluate a consumer for timesteps where it is disabled (conditions evaluated to true).



4 changes: 2 additions & 2 deletions docs/docs/about/migration_guides/v8_to_v81.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This doc guides you through migrating an existing eCalc™ model from version v8
We try to make this as easy as possible, and provide a step-by-step migration guide.

### 1. Changes to TIME_SERIES
- `RATE_INTERPOLATION_TYPE` is renamed to [`INTERPOLATION_TYPE`](../references/keywords/INTERPOLATION_TYPE)
- `RATE_INTERPOLATION_TYPE` is renamed to [`INTERPOLATION_TYPE`](../references/INTERPOLATION_TYPE)
- New time series type: `DEFAULT` with default `RIGHT` interpolation
- `RESERVOIR` type is removed

Expand Down Expand Up @@ -112,7 +112,7 @@ with a negative load in order to subtract from the total energy provided by the

The load on the steam turbine generator is reported separately in a new column in LTP Export.

Added new [CATEGORY](../references/keywords/CATEGORY) with name *STEAM-TURBINE-GENERATOR* to report power generated by a steam turbine.
Added new [CATEGORY](../references/CATEGORY) with name *STEAM-TURBINE-GENERATOR* to report power generated by a steam turbine.
Should be negative load to deduct from genset. See excerpt example below:

```yaml
Expand Down
Loading

0 comments on commit c4f9d0a

Please sign in to comment.