Skip to content

Commit

Permalink
un-indent code blocks, fix changelog header
Browse files Browse the repository at this point in the history
  • Loading branch information
nllong committed Dec 16, 2024
1 parent ac94cea commit f8027fa
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 20 deletions.
2 changes: 0 additions & 2 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# Changelog

{!CHANGELOG.md!}
16 changes: 8 additions & 8 deletions docs/developer_resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

## Tests

Tests are run with pytest, e.g.
Tests are run with pytest, e.g.,

```bash
poetry run pytest
poetry run pytest
```

## Snapshot Testing
Expand All @@ -15,7 +15,7 @@ Some tests use [syrupy](https://github.com/tophat/syrupy) to compare generated m
Snapshots should only be updated if we have changed how a model is generated, and we *know* the new version of the model is the correct version. To update all snapshots, you can run the following and commit the new snapshot files.

```bash
poetry run pytest --snapshot-update
poetry run pytest --snapshot-update
```

## Design Overview
Expand Down Expand Up @@ -57,7 +57,7 @@ Follow the instructions below in order to configure your local environment:
- To confirm that models will build and simulate, you can run

```bash
poetry run pytest -m 'not dymola' --cov-report term-missing --cov .
poetry run pytest -m 'not dymola' --cov-report term-missing --cov .
```

The tests should all pass assuming the libraries, Docker, and all dependencies are installed correctly on your computer. Also, there will be a set
Expand All @@ -71,13 +71,13 @@ To enable pre-commit for your local development process, run the following from
GMT:

```bash
pre-commit install
pre-commit install
```

To run pre-commit against the files without calling git commit, then run the following. This is useful when cleaning up the repo before committing. CI will fail if pre-commit hasn't been run locally.

```bash
pre-commit run --all-files
pre-commit run --all-files
```

## Adding New Models
Expand All @@ -86,9 +86,9 @@ To add a new model you have to do the following:

1. Define the model's python class: First, create a new python file and class under its respective directory in model_connectors. Follow the patterns of existing classes.

2. Create coupling files: For every model that can be linked to, create a `<ModelA>_<ModelB>` directory in the couplings directory. The two files ComponentDefinitions.mopt and ConnectStatements.mopt must exist in this directory. See more information on the content of the coupling files below in the *Couplings* sections.
1. Create coupling files: For every model that can be linked to, create a `<ModelA>_<ModelB>` directory in the couplings directory. The two files ComponentDefinitions.mopt and ConnectStatements.mopt must exist in this directory. See more information on the content of the coupling files below in the *Couplings* sections.

3. Create the instance file: In the templates directory, you must define `<ModelName>_Instance.mopt` which is the template that instantiates the system in the district model.
1. Create the instance file: In the templates directory, you must define `<ModelName>_Instance.mopt` which is the template that instantiates the system in the district model.

See the notes below for more information.

Expand Down
16 changes: 8 additions & 8 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ Therefore, this Getting Started guide is broken up into three major setup steps.
You must have PIP and Python 3.10 or later installed (run `python --version` to see what version you're using). After installing Python and PIP run the following in a terminal:

```bash
pip install geojson-modelica-translator
pip install geojson-modelica-translator
```

After installation of the GMT, a new command line interface (called the URBANopt District Energy Systems [UO DES] CLI) can be used to run various commands. Without needing to install the [MBL](https://simulationresearch.lbl.gov/modelica/index.html) the user can use the CLI to build the system parameters file from the results of the URBANopt SDK. For more information run the following:

```bash
uo_des -h
uo_des build-sys-param -h
uo_des -h
uo_des build-sys-param -h
```

The command below is only an example; however, it will run if the repository is checked out and run in the following path: `./tests/management/data/sdk_project_scraps`

```bash
uo_des build-sys-param sys_param.json baseline_scenario.csv example_project.json
uo_des build-sys-param sys_param.json baseline_scenario.csv example_project.json
```

## MBL Installation
Expand All @@ -52,13 +52,13 @@ The Modelica Buildings Library contains many models that are needed to assemble
Once the MBL is installed, then the CLI can be used to create the model with the following command:

```bash
uo_des create-model -h
uo_des create-model -h
```

The command below is only an example; however, it will run if the repository is checked out and run in the following path: `./tests/management/data/sdk_project_scraps`

```bash
uo_des create-model sys_param.json example_project.json model_from_sdk
uo_des create-model sys_param.json example_project.json model_from_sdk
```

The resulting Modelica package will be created and can be opened in a Modelica editor. Open the `package.mo` file in the root directory of the generated package. You will also need to
Expand All @@ -83,11 +83,11 @@ After Docker is installed and configured, you can use the CLI to run the model u
command:

```bash
uo_des run-model -h
uo_des run-model -h
```

The command below is only an example; however, it will run if the repository is checked out and run in the following path: `./tests/management/data/sdk_project_scraps`

```bash
uo_des run-model model_from_sdk
uo_des run-model model_from_sdk
```
2 changes: 1 addition & 1 deletion docs/input_file_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
There are two key input files that need to be defined to use the GeoJSON to Modelica Translator: a GeoJSON file and
a System Parameters file.

As an aside, 5GDHC systems also require a `loop_order` JSON file, which is automatically generated by the [ThermalNetwork](https://nrel.github.io/ThermalNetwork/) package and used without any human input.
As an aside, 5GDHC systems also require a `loop_order` JSON file, which is automatically generated by the [ThermalNetwork](https://nrel.github.io/ThermalNetwork/) package and used without any human input.

## GeoJSON Documentation

Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ nav:
- Input File Documentation: input_file_documentation.md
- Developer Resources: developer_resources.md
- Contributors: authors.md
- Changelog: changelog.md
- Change Log: changelog.md
- License: license.md
# Add these dirs/files to live updating during development (in addition to docs & this file)
# https://www.mkdocs.org/user-guide/configuration/#watch
Expand Down

0 comments on commit f8027fa

Please sign in to comment.