Skip to content

Commit d1279be

Browse files
committed
Squashed commit of the following:
Version 2.3.0
1 parent 81e6986 commit d1279be

8 files changed

+803
-66
lines changed

README.rst

+26-62
Original file line numberDiff line numberDiff line change
@@ -6,96 +6,53 @@ Collection of scripts to use the cesar-p-core library.
66
Different usage scenarios are shown here, but it does not include all possibilities.
77

88
The project is NOT intended to be directly used to start your project.
9-
Copy and paste the scripts you need to your project and adapt to your needs.
10-
11-
Please feel free to add more examples to this project that might be useful to others.
9+
Copy and paste the scripts you want to use to your project and adapt to your needs.
1210

1311
Project Info
1412
============
15-
- Main contact: Léonie Fierz ([email protected])
13+
- Main contact: Kristina Orehounig
1614
- Developers: Léonie Fierz (Urban Energy Systems Lab at Swiss Federal Laboratories for Materials Science and Technology Empa)
1715
- Programming Language and Version: Python 3.8
1816
- Dependencies (see also requirements.txt)
1917

2018
- cesar-p version 2.0.0
21-
- geomeppy (for 3D obj generation from idf files)
22-
- Development dependencies:
23-
24-
- flake8
25-
- mypy
26-
- black
27-
28-
- Documentation: all included in this README and in the comments of the different scripts
19+
- geomeppy (for 3D obj generation from idf files, needed for 3dview.py example)
2920

21+
- Documentation: all included in this README and in the comments of the different example scripts
3022

3123
Project Status
3224
===============
33-
"Released", examples are OK to be used to start your project.
34-
No project version tracking is set up.
35-
There are Tags marking the version compatible with earlier cesar-p-core lib versions in case you need to use an older cesar-p-core version.
3625

26+
There is no versioning for this examples project, but they are ready to be used as a start for your own project based on cesar-p-core.
27+
There are Tags marking the version compatible with earlier cesar-p-core lib versions in case you need to use an older cesar-p-core version.
3728

3829
Installation & Usage
3930
=====================
4031

41-
If you alread installed cesar-p according to the installation guide of cesar-p-core project, just do a clone of this
42-
repository and use the virtual environment where you installed cesar-p to run the examples as outlined under Usage.
32+
1. Set up [cesar-p-core library](https://github.com/hues-platform/cesar-p-core) according to the [installation guide](https://cesar-p-core.readthedocs.io/en/latest/readme.html#installation-usage)
33+
34+
2. Activate the virtual environment you installed cesar-p-core libarary, if you followed the installation instrucctions and you are on Windows do:
4335

44-
.. code-block::
45-
46-
git clone https://github.com/hues-platform/cesar-p-usage-examples
36+
.. code-block::
4737
38+
%USERPROFILE%/venv-cesar-p/Scripts/activate
4839
49-
Otherwise here is the full installation guide:
40+
3. Open a shell and navigate to the folder you want to have the examples in.
5041

51-
- Open a shell, e.g. git bash or windows command line. Navigate to the folder where you want to have the examples.
52-
- Clone the project files:
42+
4. Clone this project to your computer:
5343

5444
.. code-block::
5545
5646
git clone https://github.com/hues-platform/cesar-p-usage-examples
5747
58-
- Change to the project directory (cd cesar-p-usage-examples)
59-
- Download and Install Python in the verison outlined under Project Info from https://www.python.org/downloads/.
60-
- If you already have a Python installation, do not tick 'Add Python X.Y to Path' during installation procedure.
61-
- Note: using Anaconda is not recommended, but should work
62-
- Create a new Python virtual environment and activate it, e.g.:
48+
5. Then to run e.g. the simple example:
6349

64-
.. code-block::
50+
.. code-block::
6551
66-
python -m venv venv-cesar-p
67-
venv-cesar-p/Scripts/activate
68-
69-
70-
- Install project dependencies, which includes cesar-p-core.
71-
If you did clone the master branch, you might need to get the latest development state of cesar-p by cloning and installing the cesar-p-core master branch.
72-
Alternatively checkout the Tag of cesar-p-usage-examples matching your cesar-p version.
73-
74-
.. code-block::
75-
76-
pip install -r requirements.txt
77-
78-
79-
- For developers - if you want static code checkers:
80-
81-
.. code-block::
82-
83-
pip install flake8, black
84-
85-
86-
Usage
87-
-----
88-
89-
For the most simple example, run the simple_example.
90-
91-
You can run with the provided example project files from example_project_files folder or you can
92-
adapt the simple_example/simple_main_config.yml to point to your project files for site vertices, building information and weather file.
93-
94-
.. code-block::
95-
96-
cd simple_example
97-
python simple_run.py
52+
cd simple_example
53+
python simple_run.py
9854
55+
You can adapt the simple_example/simple_main_config.yml to point to your project files for site vertices, building information and weather file.
9956

10057
For more options what you can do with the SimulationManager API, e.g. hourly result outputs, check out *advanced_examples/basic_cesar_usage.py*
10158

@@ -110,7 +67,6 @@ Scripts overview
11067
For most of the examples in *pre_or_postprocessing_scripts* you need to first run a simulation of the *simple_example* project, see above.
11168
Navigate to *pre_or_postprocessing_scripts* to run the scripts, as most of them have relative path specifications.
11269

113-
11470
A short overview of the examples included:
11571

11672
=================================================== ========================================= ======================================================================================================
@@ -166,3 +122,11 @@ development_scripts graphdb_access_test_output.p
166122
development_scripts random_dist_test.py Compare one-by-one versus all at onece random number generation
167123
=================================================== ========================================= ======================================================================================================
168124

125+
126+
Contributing
127+
============
128+
129+
You are welcome to open issues reporting bugs or creating pull requests with bugfixes or new examples!
130+
131+
Before submitting your contribution as a pull request please check code formatting with *flake8* and
132+
proper type hints with *mppy*.

0 commit comments

Comments
 (0)