From f8027fa71142d4f097bab3b4adf2e4bb64ff6b7c Mon Sep 17 00:00:00 2001 From: Nicholas Long Date: Mon, 16 Dec 2024 16:04:46 -0700 Subject: [PATCH] un-indent code blocks, fix changelog header --- docs/changelog.md | 2 -- docs/developer_resources.md | 16 ++++++++-------- docs/getting_started.md | 16 ++++++++-------- docs/input_file_documentation.md | 2 +- mkdocs.yml | 2 +- 5 files changed, 18 insertions(+), 20 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 33ca380a5..f4d16fd97 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1 @@ -# Changelog - {!CHANGELOG.md!} diff --git a/docs/developer_resources.md b/docs/developer_resources.md index 677e219d5..ec0377b53 100644 --- a/docs/developer_resources.md +++ b/docs/developer_resources.md @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 `_` 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 `_` 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 `_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 `_Instance.mopt` which is the template that instantiates the system in the district model. See the notes below for more information. diff --git a/docs/getting_started.md b/docs/getting_started.md index fdee39ac2..21ea8e894 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -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 @@ -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 @@ -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 ``` diff --git a/docs/input_file_documentation.md b/docs/input_file_documentation.md index e9b174ffd..9b61ba89c 100644 --- a/docs/input_file_documentation.md +++ b/docs/input_file_documentation.md @@ -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 diff --git a/mkdocs.yml b/mkdocs.yml index d8598670d..a2666f6c0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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