omotes-simulator-core 0.0.5.dev0__tar.gz → 0.0.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- omotes-simulator-core-0.0.8/.github/workflows/ci.yml +110 -0
- omotes-simulator-core-0.0.8/.github/workflows/codeql-analysis.yml +70 -0
- omotes-simulator-core-0.0.8/.github/workflows/release.yml +37 -0
- omotes-simulator-core-0.0.8/.gitignore +230 -0
- omotes-simulator-core-0.0.8/.taplo.toml +5 -0
- omotes-simulator-core-0.0.8/.vscode/launch.json +14 -0
- omotes-simulator-core-0.0.8/.vscode/settings.json +20 -0
- omotes-simulator-core-0.0.8/CHANGELOG.md +32 -0
- omotes-simulator-core-0.0.8/CONTRIBUTING.md +51 -0
- {omotes-simulator-core-0.0.5.dev0/src/omotes_simulator_core.egg-info → omotes-simulator-core-0.0.8}/PKG-INFO +1 -1
- omotes-simulator-core-0.0.8/VERSION +1 -0
- omotes-simulator-core-0.0.8/ci/linux/build_python_package.sh +5 -0
- omotes-simulator-core-0.0.8/ci/linux/create_venv.sh +7 -0
- omotes-simulator-core-0.0.8/ci/linux/install_dependencies.sh +4 -0
- omotes-simulator-core-0.0.8/ci/linux/install_dev.sh +4 -0
- omotes-simulator-core-0.0.8/ci/linux/lint.sh +4 -0
- omotes-simulator-core-0.0.8/ci/linux/test_unit.sh +4 -0
- omotes-simulator-core-0.0.8/ci/linux/typecheck.sh +4 -0
- omotes-simulator-core-0.0.8/ci/linux/update_dependencies.sh +5 -0
- omotes-simulator-core-0.0.8/ci/win32/create_venv.cmd +12 -0
- omotes-simulator-core-0.0.8/ci/win32/install_dependencies.cmd +6 -0
- omotes-simulator-core-0.0.8/ci/win32/install_dev.cmd +6 -0
- omotes-simulator-core-0.0.8/ci/win32/lint.cmd +8 -0
- omotes-simulator-core-0.0.8/ci/win32/test_unit.cmd +9 -0
- omotes-simulator-core-0.0.8/ci/win32/typecheck.cmd +8 -0
- omotes-simulator-core-0.0.8/ci/win32/update_dependencies.cmd +6 -0
- omotes-simulator-core-0.0.8/dev-requirements.txt +321 -0
- omotes-simulator-core-0.0.8/doc/Makefile +20 -0
- omotes-simulator-core-0.0.8/doc/conf.py +52 -0
- omotes-simulator-core-0.0.8/doc/index.rst +18 -0
- omotes-simulator-core-0.0.8/doc/make.bat +35 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/pyproject.toml +1 -0
- omotes-simulator-core-0.0.8/requirements.txt +104 -0
- omotes-simulator-core-0.0.8/run.sh +5 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8/src/omotes_simulator_core.egg-info}/PKG-INFO +1 -1
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/omotes_simulator_core.egg-info/SOURCES.txt +68 -1
- omotes-simulator-core-0.0.8/src/simulator_core/.pre-commit-config.yaml +11 -0
- omotes-simulator-core-0.0.8/src/simulator_core/solver/utils/temp_props.csv +80 -0
- omotes-simulator-core-0.0.8/testdata/test1.esdl +48 -0
- omotes-simulator-core-0.0.8/testdata/test_pipe_material.esdl +90 -0
- omotes-simulator-core-0.0.8/unit_test/entities/__init__.py +15 -0
- omotes-simulator-core-0.0.8/unit_test/entities/test_controller_class.py +80 -0
- omotes-simulator-core-0.0.8/unit_test/entities/test_entities.py +42 -0
- omotes-simulator-core-0.0.8/unit_test/entities/test_esdl_object.py +205 -0
- omotes-simulator-core-0.0.8/unit_test/entities/test_influxdb.py +62 -0
- omotes-simulator-core-0.0.8/unit_test/entities/test_junction.py +38 -0
- omotes-simulator-core-0.0.8/unit_test/entities/test_pipe.py +113 -0
- omotes-simulator-core-0.0.8/unit_test/entities/test_production_cluster.py +213 -0
- omotes-simulator-core-0.0.8/unit_test/entities/test_utils.py +141 -0
- omotes-simulator-core-0.0.8/unit_test/simulation/__init__.py +15 -0
- omotes-simulator-core-0.0.8/unit_test/simulation/test_networksimulation.py +69 -0
- omotes-simulator-core-0.0.8/unit_test/solver/__init__.py +15 -0
- omotes-simulator-core-0.0.8/unit_test/solver/matrix/__init__.py +15 -0
- omotes-simulator-core-0.0.8/unit_test/solver/matrix/test_equation_object.py +84 -0
- omotes-simulator-core-0.0.8/unit_test/solver/matrix/test_matrix.py +223 -0
- omotes-simulator-core-0.0.8/unit_test/solver/matrix/test_utility.py +82 -0
- omotes-simulator-core-0.0.8/unit_test/solver/network/__init__.py +15 -0
- omotes-simulator-core-0.0.8/unit_test/solver/network/assets/__init__.py +15 -0
- omotes-simulator-core-0.0.8/unit_test/solver/network/assets/test_base_asset.py +302 -0
- omotes-simulator-core-0.0.8/unit_test/solver/network/assets/test_base_item.py +72 -0
- omotes-simulator-core-0.0.8/unit_test/solver/network/assets/test_base_node_item.py +67 -0
- omotes-simulator-core-0.0.8/unit_test/solver/network/assets/test_boundary.py +77 -0
- omotes-simulator-core-0.0.8/unit_test/solver/network/assets/test_fall_type.py +290 -0
- omotes-simulator-core-0.0.8/unit_test/solver/network/assets/test_node.py +436 -0
- omotes-simulator-core-0.0.8/unit_test/solver/network/assets/test_production_asset.py +139 -0
- omotes-simulator-core-0.0.8/unit_test/solver/network/assets/test_solver_pipe.py +589 -0
- omotes-simulator-core-0.0.8/unit_test/solver/network/test_network.py +610 -0
- omotes-simulator-core-0.0.8/unit_test/solver/network/utils/__init__.py +15 -0
- omotes-simulator-core-0.0.8/unit_test/solver/network/utils/test_fluid_properties.py +210 -0
- omotes-simulator-core-0.0.8/unit_test/transforms/__init__.py +15 -0
- omotes-simulator-core-0.0.8/unit_test/transforms/test_mapper.py +96 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/LICENSE +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/README.md +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/setup.cfg +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/omotes_simulator_core.egg-info/dependency_links.txt +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/omotes_simulator_core.egg-info/requires.txt +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/omotes_simulator_core.egg-info/top_level.txt +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/__init__.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/__main__.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/adapter/__init__.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/adapter/presentation/__init__.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/adapter/transforms/__init__.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/adapter/transforms/esdl_asset_mapper.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/adapter/transforms/mappers.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/adapter/transforms/string_to_esdl.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/adapter/transforms/transform_utils.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/__init__.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/assets/__init__.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/assets/asset_abstract.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/assets/asset_defaults.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/assets/controller_classes.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/assets/demand_cluster.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/assets/esdl_asset_object.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/assets/junction.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/assets/pipe.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/assets/production_cluster.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/assets/utils.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/esdl_object.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/heat_network.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/network_controller.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/simulation_configuration.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/utility/__init__.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/entities/utility/influxdb_reader.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/infrastructure/__init__.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/infrastructure/app.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/infrastructure/simulation_manager.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/infrastructure/utils.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/py.typed +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/simulation/__init__.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/simulation/mappers/__init__.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/simulation/mappers/mappers.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/simulation/networksimulation.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/__init__.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/matrix/__init__.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/matrix/core_enum.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/matrix/equation_object.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/matrix/matrix.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/matrix/utility.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/network/__init__.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/network/assets/__init__.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/network/assets/base_asset.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/network/assets/base_item.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/network/assets/base_node_item.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/network/assets/boundary.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/network/assets/fall_type.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/network/assets/node.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/network/assets/production_asset.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/network/assets/solver_pipe.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/network/network.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/solver.py +0 -0
- {omotes-simulator-core-0.0.5.dev0 → omotes-simulator-core-0.0.8}/src/simulator_core/solver/utils/fluid_properties.py +0 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
name: Build-Test-Lint-etc (linux)
|
|
2
|
+
|
|
3
|
+
on: [push]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
|
|
7
|
+
flake8-lint:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
name: Lint
|
|
10
|
+
steps:
|
|
11
|
+
- name: Check out source repository
|
|
12
|
+
uses: actions/checkout@v3
|
|
13
|
+
- name: Set up Python environment
|
|
14
|
+
uses: actions/setup-python@v4
|
|
15
|
+
with:
|
|
16
|
+
python-version: 3.11
|
|
17
|
+
- name: flake8 Lint
|
|
18
|
+
uses: TrueBrain/actions-flake8@v2
|
|
19
|
+
with:
|
|
20
|
+
plugins: Flake8-pyproject==1.2.3 flake8-docstrings==1.7.0 flake8-quotes==3.3.2
|
|
21
|
+
# only_warn: 1 #causes action to always be succesful, but still provide annotations
|
|
22
|
+
|
|
23
|
+
test:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
strategy:
|
|
26
|
+
matrix:
|
|
27
|
+
python-version: ["3.11"]
|
|
28
|
+
# python-version: [3.8, 3.9, 3.10, 3.11]
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v3
|
|
31
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
32
|
+
uses: actions/setup-python@v4
|
|
33
|
+
with:
|
|
34
|
+
python-version: ${{ matrix.python-version }}
|
|
35
|
+
cache: 'pip'
|
|
36
|
+
- run: |
|
|
37
|
+
./ci/linux/create_venv.sh
|
|
38
|
+
./ci/linux/install_dev.sh
|
|
39
|
+
|
|
40
|
+
- name: run unit tests
|
|
41
|
+
run: |
|
|
42
|
+
./ci/linux/test_unit.sh
|
|
43
|
+
|
|
44
|
+
- name: Surface failing tests
|
|
45
|
+
if: always()
|
|
46
|
+
uses: pmeier/pytest-results-action@main
|
|
47
|
+
with:
|
|
48
|
+
# A list of JUnit XML files, directories containing the former, and wildcard
|
|
49
|
+
# patterns to process.
|
|
50
|
+
# See @actions/glob for supported patterns.
|
|
51
|
+
path: test-results.xml
|
|
52
|
+
|
|
53
|
+
# Add a summary of the results at the top of the report
|
|
54
|
+
# Default: true
|
|
55
|
+
summary: true
|
|
56
|
+
|
|
57
|
+
# Select which results should be included in the report.
|
|
58
|
+
# Follows the same syntax as
|
|
59
|
+
# `pytest -r`
|
|
60
|
+
# Default: fEX
|
|
61
|
+
display-options: fEX
|
|
62
|
+
|
|
63
|
+
# Fail the workflow if no JUnit XML was found.
|
|
64
|
+
# Default: true
|
|
65
|
+
fail-on-empty: true
|
|
66
|
+
|
|
67
|
+
typecheck:
|
|
68
|
+
runs-on: ubuntu-latest
|
|
69
|
+
strategy:
|
|
70
|
+
matrix:
|
|
71
|
+
python-version: ["3.11"]
|
|
72
|
+
# python-version: [3.8, 3.9, 3.10, 3.11]
|
|
73
|
+
steps:
|
|
74
|
+
- uses: actions/checkout@v3
|
|
75
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
76
|
+
uses: actions/setup-python@v4
|
|
77
|
+
with:
|
|
78
|
+
python-version: ${{ matrix.python-version }}
|
|
79
|
+
cache: 'pip'
|
|
80
|
+
- run: |
|
|
81
|
+
./ci/linux/create_venv.sh
|
|
82
|
+
./ci/linux/install_dev.sh
|
|
83
|
+
|
|
84
|
+
- name: Add mypy annotator
|
|
85
|
+
uses: pr-annotators/mypy-pr-annotator@v1.0.0
|
|
86
|
+
|
|
87
|
+
- name: run typechecker
|
|
88
|
+
run: |
|
|
89
|
+
./ci/linux/typecheck.sh
|
|
90
|
+
|
|
91
|
+
build:
|
|
92
|
+
name: Build the python package
|
|
93
|
+
runs-on: ubuntu-latest
|
|
94
|
+
strategy:
|
|
95
|
+
matrix:
|
|
96
|
+
python-version: [ "3.11" ]
|
|
97
|
+
steps:
|
|
98
|
+
- uses: actions/checkout@v3
|
|
99
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
100
|
+
uses: actions/setup-python@v4
|
|
101
|
+
with:
|
|
102
|
+
python-version: ${{ matrix.python-version }}
|
|
103
|
+
cache: 'pip'
|
|
104
|
+
- run: |
|
|
105
|
+
./ci/linux/create_venv.sh
|
|
106
|
+
./ci/linux/install_dev.sh
|
|
107
|
+
|
|
108
|
+
- name: build
|
|
109
|
+
run: |
|
|
110
|
+
./ci/linux/build_python_package.sh
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
|
2
|
+
# to commit it to your repository.
|
|
3
|
+
#
|
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
|
5
|
+
# or to provide custom queries or build logic.
|
|
6
|
+
#
|
|
7
|
+
# ******** NOTE ********
|
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
|
10
|
+
# supported CodeQL languages.
|
|
11
|
+
#
|
|
12
|
+
name: "CodeQL"
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
branches: [ main ]
|
|
17
|
+
pull_request:
|
|
18
|
+
# The branches below must be a subset of the branches above
|
|
19
|
+
branches: [ main ]
|
|
20
|
+
schedule:
|
|
21
|
+
- cron: '22 6 * * 2'
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
analyze:
|
|
25
|
+
name: Analyze
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
permissions:
|
|
28
|
+
actions: read
|
|
29
|
+
contents: read
|
|
30
|
+
security-events: write
|
|
31
|
+
|
|
32
|
+
strategy:
|
|
33
|
+
fail-fast: false
|
|
34
|
+
matrix:
|
|
35
|
+
language: [ 'python' ]
|
|
36
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
|
37
|
+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
|
38
|
+
|
|
39
|
+
steps:
|
|
40
|
+
- name: Checkout repository
|
|
41
|
+
uses: actions/checkout@v2
|
|
42
|
+
|
|
43
|
+
# Initializes the CodeQL tools for scanning.
|
|
44
|
+
- name: Initialize CodeQL
|
|
45
|
+
uses: github/codeql-action/init@v2
|
|
46
|
+
with:
|
|
47
|
+
languages: ${{ matrix.language }}
|
|
48
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
49
|
+
# By default, queries listed here will override any specified in a config file.
|
|
50
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
51
|
+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
|
52
|
+
|
|
53
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
54
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
|
55
|
+
- name: Autobuild
|
|
56
|
+
uses: github/codeql-action/autobuild@v2
|
|
57
|
+
|
|
58
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
|
59
|
+
# 📚 https://git.io/JvXDl
|
|
60
|
+
|
|
61
|
+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
|
62
|
+
# and modify them (or add more) to build your code if your project
|
|
63
|
+
# uses a compiled language
|
|
64
|
+
|
|
65
|
+
#- run: |
|
|
66
|
+
# make bootstrap
|
|
67
|
+
# make release
|
|
68
|
+
|
|
69
|
+
- name: Perform CodeQL Analysis
|
|
70
|
+
uses: github/codeql-action/analyze@v2
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: PyPi release
|
|
2
|
+
run-name: Releasing next version 🚀
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
pypi-publish:
|
|
10
|
+
name: upload release to PyPI
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: [ "3.11" ]
|
|
15
|
+
# Specifying a GitHub environment is optional, but strongly encouraged
|
|
16
|
+
environment: release
|
|
17
|
+
permissions:
|
|
18
|
+
# IMPORTANT: this permission is mandatory for trusted publishing
|
|
19
|
+
id-token: write
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v3
|
|
22
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
23
|
+
uses: actions/setup-python@v4
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
cache: 'pip'
|
|
27
|
+
- run: |
|
|
28
|
+
./ci/linux/create_venv.sh
|
|
29
|
+
./ci/linux/update_dependencies.sh
|
|
30
|
+
./ci/linux/install_dependencies.sh
|
|
31
|
+
|
|
32
|
+
- name: build
|
|
33
|
+
run: |
|
|
34
|
+
./ci/linux/build_python_package.sh
|
|
35
|
+
|
|
36
|
+
- name: Publish package distributions to PyPI
|
|
37
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
doc/*/_build/
|
|
73
|
+
doc/*/_static/
|
|
74
|
+
doc/*/_templates/
|
|
75
|
+
|
|
76
|
+
# PyBuilder
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
.python-version
|
|
88
|
+
|
|
89
|
+
# pipenv
|
|
90
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
91
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
92
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
93
|
+
# install all needed dependencies.
|
|
94
|
+
#Pipfile.lock
|
|
95
|
+
|
|
96
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
97
|
+
__pypackages__/
|
|
98
|
+
|
|
99
|
+
# Celery stuff
|
|
100
|
+
celerybeat-schedule
|
|
101
|
+
celerybeat.pid
|
|
102
|
+
|
|
103
|
+
# SageMath parsed files
|
|
104
|
+
*.sage.py
|
|
105
|
+
|
|
106
|
+
# Environments
|
|
107
|
+
.env
|
|
108
|
+
.venv
|
|
109
|
+
env/
|
|
110
|
+
venv/
|
|
111
|
+
ENV/
|
|
112
|
+
env.bak/
|
|
113
|
+
venv.bak/
|
|
114
|
+
|
|
115
|
+
# Spyder project settings
|
|
116
|
+
.spyderproject
|
|
117
|
+
.spyproject
|
|
118
|
+
|
|
119
|
+
# Rope project settings
|
|
120
|
+
.ropeproject
|
|
121
|
+
|
|
122
|
+
# mkdocs documentation
|
|
123
|
+
/site
|
|
124
|
+
|
|
125
|
+
# mypy
|
|
126
|
+
.mypy_cache/
|
|
127
|
+
.dmypy.json
|
|
128
|
+
dmypy.json
|
|
129
|
+
|
|
130
|
+
# Pyre type checker
|
|
131
|
+
.pyre/
|
|
132
|
+
|
|
133
|
+
### PyCharm+all ###
|
|
134
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
|
135
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
|
136
|
+
|
|
137
|
+
# User-specific stuff
|
|
138
|
+
.idea/**/workspace.xml
|
|
139
|
+
.idea/**/tasks.xml
|
|
140
|
+
.idea/**/usage.statistics.xml
|
|
141
|
+
.idea/**/dictionaries
|
|
142
|
+
.idea/**/shelf
|
|
143
|
+
|
|
144
|
+
# AWS User-specific
|
|
145
|
+
.idea/**/aws.xml
|
|
146
|
+
|
|
147
|
+
# Generated files
|
|
148
|
+
.idea/**/contentModel.xml
|
|
149
|
+
|
|
150
|
+
# Sensitive or high-churn files
|
|
151
|
+
.idea/**/dataSources/
|
|
152
|
+
.idea/**/dataSources.ids
|
|
153
|
+
.idea/**/dataSources.local.xml
|
|
154
|
+
.idea/**/sqlDataSources.xml
|
|
155
|
+
.idea/**/dynamic.xml
|
|
156
|
+
.idea/**/uiDesigner.xml
|
|
157
|
+
.idea/**/dbnavigator.xml
|
|
158
|
+
|
|
159
|
+
# Gradle
|
|
160
|
+
.idea/**/gradle.xml
|
|
161
|
+
.idea/**/libraries
|
|
162
|
+
|
|
163
|
+
# Gradle and Maven with auto-import
|
|
164
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
|
165
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
|
166
|
+
# auto-import.
|
|
167
|
+
# .idea/artifacts
|
|
168
|
+
# .idea/compiler.xml
|
|
169
|
+
# .idea/jarRepositories.xml
|
|
170
|
+
# .idea/modules.xml
|
|
171
|
+
# .idea/*.iml
|
|
172
|
+
# .idea/modules
|
|
173
|
+
# *.iml
|
|
174
|
+
# *.ipr
|
|
175
|
+
|
|
176
|
+
# CMake
|
|
177
|
+
cmake-build-*/
|
|
178
|
+
|
|
179
|
+
# Mongo Explorer plugin
|
|
180
|
+
.idea/**/mongoSettings.xml
|
|
181
|
+
|
|
182
|
+
# File-based project format
|
|
183
|
+
*.iws
|
|
184
|
+
|
|
185
|
+
# IntelliJ
|
|
186
|
+
out/
|
|
187
|
+
|
|
188
|
+
# mpeltonen/sbt-idea plugin
|
|
189
|
+
.idea_modules/
|
|
190
|
+
|
|
191
|
+
# JIRA plugin
|
|
192
|
+
atlassian-ide-plugin.xml
|
|
193
|
+
|
|
194
|
+
# Cursive Clojure plugin
|
|
195
|
+
.idea/replstate.xml
|
|
196
|
+
|
|
197
|
+
# SonarLint plugin
|
|
198
|
+
.idea/sonarlint/
|
|
199
|
+
|
|
200
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
201
|
+
com_crashlytics_export_strings.xml
|
|
202
|
+
crashlytics.properties
|
|
203
|
+
crashlytics-build.properties
|
|
204
|
+
fabric.properties
|
|
205
|
+
|
|
206
|
+
# Editor-based Rest Client
|
|
207
|
+
.idea/httpRequests
|
|
208
|
+
|
|
209
|
+
# Android studio 3.1+ serialized cache file
|
|
210
|
+
.idea/caches/build_file_checksums.ser
|
|
211
|
+
|
|
212
|
+
### PyCharm+all Patch ###
|
|
213
|
+
# Ignore everything but code style settings and run configurations
|
|
214
|
+
# that are supposed to be shared within teams.
|
|
215
|
+
|
|
216
|
+
.idea/*
|
|
217
|
+
|
|
218
|
+
!.idea/codeStyles
|
|
219
|
+
!.idea/runConfigurations
|
|
220
|
+
|
|
221
|
+
unit_test_coverage/
|
|
222
|
+
test-results.xml
|
|
223
|
+
.env.*
|
|
224
|
+
|
|
225
|
+
# requirements.txt files are ignored
|
|
226
|
+
# otherwise, the release-workflow may fail due to
|
|
227
|
+
# changes in these files
|
|
228
|
+
# requirements.txt files are updated as part of the build
|
|
229
|
+
requirements.txt
|
|
230
|
+
dev-requirements.txt
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Python Debugger: Module",
|
|
9
|
+
"type": "debugpy",
|
|
10
|
+
"request": "launch",
|
|
11
|
+
"module": "simulator_core"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"python.analysis.typeCheckingMode": "basic",
|
|
3
|
+
"[python]": {
|
|
4
|
+
"editor.defaultFormatter": "ms-python.black-formatter"
|
|
5
|
+
},
|
|
6
|
+
"mypy.runUsingActiveInterpreter": true,
|
|
7
|
+
"python.testing.unittestArgs": [
|
|
8
|
+
"-v",
|
|
9
|
+
"-s",
|
|
10
|
+
"./unit_test",
|
|
11
|
+
"-p",
|
|
12
|
+
"test*.py",
|
|
13
|
+
"--cov=simulator_core",
|
|
14
|
+
"--cov-report html",
|
|
15
|
+
"--cov-report term-missing",
|
|
16
|
+
"--cov-fail-under 80"
|
|
17
|
+
],
|
|
18
|
+
"python.testing.pytestEnabled": true,
|
|
19
|
+
"python.testing.unittestEnabled": true,
|
|
20
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
All notable changes to this project will be documented in this file.
|
|
3
|
+
|
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased] - 2024-3-31
|
|
8
|
+
### Added
|
|
9
|
+
- New functionality added to the project, with reference to issue-ticket (#123)
|
|
10
|
+
- Another new item (#1234)
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- bugfixes, with references to your issue-tickets (#123)
|
|
14
|
+
- another bugfix (#1234)
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- Changes, for example code structure
|
|
18
|
+
- but also changed/updated dependencies
|
|
19
|
+
- Add references to tickets where applicable (#123)
|
|
20
|
+
|
|
21
|
+
### Removed
|
|
22
|
+
- Files that have been removed
|
|
23
|
+
- Functionality that has been removed
|
|
24
|
+
- Add references to tickets where applicable (#123)
|
|
25
|
+
|
|
26
|
+
## [0.0.1] - 2023-09-21
|
|
27
|
+
### Added
|
|
28
|
+
- Kickoff of Nieuwe Warmte Nu!.
|
|
29
|
+
- initialized repo from template.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
- everything.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# This file
|
|
2
|
+
This file should describe the development process for this project and include instruction on
|
|
3
|
+
how to run/build your project. Any environment settings/requirements?
|
|
4
|
+
|
|
5
|
+
# Development guidelines
|
|
6
|
+
The general proces is as follows:
|
|
7
|
+
* Create a branch on your local working copy
|
|
8
|
+
* make code modifications, including tests, documentation, etc
|
|
9
|
+
* commit/push changes to remote/origin
|
|
10
|
+
* submit a pull request for merging into master
|
|
11
|
+
* Discuss with code reviewer if/what changes are needed
|
|
12
|
+
* when all discussions are resolved, the PR will be merged by the reviewer
|
|
13
|
+
* Update Changelog!
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# Code Quality guide lines
|
|
17
|
+
Quality guide lines serve to improve quality. They should not be busy work nor work against developers.
|
|
18
|
+
They should be of value.
|
|
19
|
+
|
|
20
|
+
## Code review
|
|
21
|
+
- Every commit should be created on its own branch and submitted per pull request to be merged with the main branch.
|
|
22
|
+
- Every pull request must be reviewed by at least one other developer and all comments must be resolved.
|
|
23
|
+
- No linting issues may remain before merging.
|
|
24
|
+
- No type checking issues may remain before merging.
|
|
25
|
+
- Code reviews are not about distrust. They are about sharing knowledge about the code base, sharing knowledge about
|
|
26
|
+
writing code and increasing quality by collaboration.
|
|
27
|
+
|
|
28
|
+
## Documentation
|
|
29
|
+
- Every function must have documentation explaining what the function does in a summary and explaining
|
|
30
|
+
each argument and return type.
|
|
31
|
+
|
|
32
|
+
## Linting
|
|
33
|
+
- Linting maintains a shared quality of the code base across repositories.
|
|
34
|
+
- Rules of the linter may only be ignored when approved by the software leads. Prefer to silence individual lines by <TODO show how to silence individual errors>'
|
|
35
|
+
|
|
36
|
+
## Type checking
|
|
37
|
+
- Every function must have a return type and an argument list annotated with functions.
|
|
38
|
+
- Rules of the type checker may only be ignored when approved by the software leads.
|
|
39
|
+
-
|
|
40
|
+
|
|
41
|
+
## Testing
|
|
42
|
+
### Unit testing
|
|
43
|
+
- Every function should be covered by a unit test. Some functions allow more easily for unit tests and some are not
|
|
44
|
+
worth unit testing. This is up to the teams discretion.
|
|
45
|
+
- A unit test should test some significant amount of code. If the test function is similar or equal to the logic being tested,
|
|
46
|
+
the amount of code being tested is too small. If the test function tests whole modules or multiple layers of code, the amount
|
|
47
|
+
of code being tested is too big. The amount of code being tested is referred to as the 'unit-under-test'.
|
|
48
|
+
- Use mocks to isolate 'unit-under-test' where applicable.
|
|
49
|
+
- Coverage percentage should be >80%. This is a guideline, not a hard rule. Breaking this guideline is allowed if the
|
|
50
|
+
arguments has swayed the developersteam and not just the developer and reviewer.
|
|
51
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.0.1
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
rem Short script to initialize virtual environment using venv and pip
|
|
2
|
+
rem @echo off
|
|
3
|
+
|
|
4
|
+
pushd .
|
|
5
|
+
cd /D "%~dp0"
|
|
6
|
+
py -3.11 -m venv ..\..\venv
|
|
7
|
+
call ..\..\venv\Scripts\activate.bat
|
|
8
|
+
python -m pip install pip-tools setuptools wheel
|
|
9
|
+
REM call .\update_dependencies.cmd
|
|
10
|
+
call .\install_dependencies.cmd
|
|
11
|
+
call .\install_dev.cmd
|
|
12
|
+
popd
|