Skip to content

Commit

Permalink
Check docker (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
andoludo authored Nov 3, 2024
2 parents 4bfd6db + 7b321a7 commit 65324d6
Show file tree
Hide file tree
Showing 84 changed files with 350 additions and 68 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @andoludo
6 changes: 1 addition & 5 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ jobs:
python-version: '3.10'

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | POETRY_HOME=/opt/poetry python3
cd /usr/local/bin
ln -s /opt/poetry/bin/poetry
poetry config virtualenvs.create false
uses: snok/install-poetry@v1

- name: Install dependencies
run: |
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/tests-runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ jobs:
python-version: "3.10"

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | POETRY_HOME=/opt/poetry python3
cd /usr/local/bin
ln -s /opt/poetry/bin/poetry
poetry config virtualenvs.create false
uses: snok/install-poetry@v1

- name: Install dependencies
run: poetry install
Expand Down
16 changes: 11 additions & 5 deletions docs/getting-started/installation.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
# Installation
## Python package

Trano is a Python package that can be easily installed via pip.

!!! warning
Trano requires python 3.9 or higher and docker to be installed on the system.


Trano is a Python package that can be installed via pip.


```bash
pip install trano
```


Trano can also be utilized with Poetry.


```bash
poetry add trano
```


The Python package enables the generation of Modelica models from YAML configuration input. To simulate the model, ensure that Docker is installed on your system.
The Python package enables the generation of a Modelica model from YAML configuration input. To simulate the model, Docker must be installed on the system.

## Docker

To simulate the Modelica model, you need to install Docker on your system. You can find installation instructions on the [official Docker website](https://docs.docker.com/engine/install/).
To simulate the Modelica model, you must install Docker on your system. You can find installation instructions on the [official Docker website](https://docs.docker.com/engine/install/).

8 changes: 7 additions & 1 deletion docs_src/getting_started/installation.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
from pathlib import Path

from docs_src.utils import CleanedText, DisplayObject, TitleText, Tutorial
from docs_src.utils import CleanedText, DisplayObject, TitleText, Tutorial, Text

INSTALLATIONS = [
Tutorial(
title="Installation",
contents=[
TitleText(content="""Python package"""),
Text(
content="""
!!! warning
Trano requires python 3.9 or higher and docker to be installed on the system.
"""
),
CleanedText(
content="""Trano is a python package that can be installed using pip."""
),
Expand Down
24 changes: 6 additions & 18 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ matplotlib = "^3.8.2"
uuid = "^1.30"
docker = "^7.0.0"
jinja2 = "^3.1.2"
pytest = "^7.4.3"
pyvis = "^0.3.2"
scipy = "^1.13.1"
mat4py = "^0.6.0"
pandas = "^2.2.2"
buildingspy = "^5.1.0"
plotly = "^5.22.0"
Expand All @@ -47,10 +44,12 @@ linkml = "^1.8.1"
cruft = "^2.15.0"
rdflib = "^7.0.0"
pyyaml-include = "^2.1"
typer = "^0.12.5"

[tool.poetry.scripts]
trano = "trano.main:app"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.3"
mypy = "^1.8.0"
nox = "^2023.4.22"
ruff = "^0.3.0"
Expand All @@ -65,7 +64,7 @@ types-pyyaml = "^6.0.12.20240808"
isort = "^5.13.2"
jsf = "^0.11.2"
black = "^24.10.0"

pytest = "^7.4.3"


[tool.poetry.group.docs.dependencies]
Expand Down
Empty file modified trano/__init__.py
100644 → 100755
Empty file.
Empty file modified trano/data/default.yaml
100644 → 100755
Empty file.
Empty file modified trano/data/include.py
100644 → 100755
Empty file.
Empty file modified trano/data_models/__init__.py
100644 → 100755
Empty file.
Empty file modified trano/data_models/conversion.py
100644 → 100755
Empty file.
Empty file modified trano/data_models/converter.py
100644 → 100755
Empty file.
Empty file modified trano/data_models/parameters.yaml
100644 → 100755
Empty file.
Empty file modified trano/data_models/trano.yaml
100644 → 100755
Empty file.
Empty file modified trano/data_models/trano_final.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/__init__.py
100644 → 100755
Empty file.
Empty file modified trano/elements/base.py
100644 → 100755
Empty file.
Empty file modified trano/elements/boundary.py
100644 → 100755
Empty file.
Empty file modified trano/elements/bus.py
100644 → 100755
Empty file.
Empty file modified trano/elements/components.py
100644 → 100755
Empty file.
Empty file modified trano/elements/connection.py
100644 → 100755
Empty file.
Empty file modified trano/elements/construction.py
100644 → 100755
Empty file.
Empty file modified trano/elements/control.py
100644 → 100755
Empty file.
Empty file modified trano/elements/controller_bus.py
100644 → 100755
Empty file.
Empty file modified trano/elements/element.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/envelope.py
100644 → 100755
Empty file.
Empty file modified trano/elements/figure.py
100644 → 100755
Empty file.
Empty file modified trano/elements/inputs.py
100644 → 100755
Empty file.
Empty file modified trano/elements/models/ahu_control.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/air_handling_unit.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/boiler.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/boiler_control.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/boundary.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/collector_control.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/data_bus.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/duct.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/emission_control.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/external_wall.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/floor_on_ground.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/internal_element.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/merged_windows.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/occupancy.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/pump.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/radiator.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/space.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/split_valve.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/temperature_sensor.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/three_way_valve.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/three_way_valve_control.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/valve.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/vav.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/vav_control.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/weather.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/models/window.yaml
100644 → 100755
Empty file.
Empty file modified trano/elements/parameters.py
100644 → 100755
Empty file.
Empty file modified trano/elements/space.py
100644 → 100755
Empty file.
Empty file modified trano/elements/system.py
100644 → 100755
Empty file.
Empty file modified trano/elements/types.py
100644 → 100755
Empty file.
Empty file modified trano/elements/utils.py
100644 → 100755
Empty file.
6 changes: 6 additions & 0 deletions trano/exceptions.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ class ControllerBusPortError(Exception):


class IncompatiblePortsError(Exception): ...


class DockerNotInstalledError(Exception): ...


class DockerClientError(Exception): ...
Empty file modified trano/library/library.py
100644 → 100755
Empty file.
Empty file modified trano/library/library.yaml
100644 → 100755
Empty file.
Loading

0 comments on commit 65324d6

Please sign in to comment.