%global _empty_manifest_terminate_build 0 Name: python-dragonfly-energy Version: 1.23.5 Release: 1 Summary: Dragonfly extension for energy simulation. License: AGPL-3.0 URL: https://github.com/ladybug-tools/dragonfly-energy Source0: https://mirrors.nju.edu.cn/pypi/web/packages/21/36/53fa8c3dd27b84b9a03b1013a5ad0bc8d2609fc642ef04221f2c12c19d5f/dragonfly-energy-1.23.5.tar.gz BuildArch: noarch Requires: python3-dragonfly-core Requires: python3-honeybee-energy Requires: python3-honeybee-energy-standards %description ![Dragonfly](https://www.ladybug.tools/assets/img/dragonfly.png) [![Build Status](https://github.com/ladybug-tools/dragonfly-energy/workflows/CI/badge.svg)](https://github.com/ladybug-tools/dragonfly-energy/actions) [![Coverage Status](https://coveralls.io/repos/github/ladybug-tools/dragonfly-energy/badge.svg?branch=master)](https://coveralls.io/github/ladybug-tools/dragonfly-energy) [![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/downloads/release/python-370/) [![Python 2.7](https://img.shields.io/badge/python-2.7-green.svg)](https://www.python.org/downloads/release/python-270/) [![IronPython](https://img.shields.io/badge/ironpython-2.7-red.svg)](https://github.com/IronLanguages/ironpython2/releases/tag/ipy-2.7.8/) # dragonfly-energy Dragonfly extension for energy simulation. ## Installation `pip install dragonfly-energy` ## QuickStart ```python import dragonfly_energy ``` ## [API Documentation](http://ladybug-tools.github.io/dragonfly-energy/docs) ## Usage Since the building geometry in dragonfly is fundamentally 2D, creating a model of a building and assigning energy model properties can be done with a few lines of code. Here is an example: ```python from dragonfly.model import Model from dragonfly.building import Building from dragonfly.story import Story from dragonfly.room2d import Room2D from dragonfly.windowparameter import SimpleWindowRatio from honeybee_energy.lib.programtypes import office_program # create the Building object pts_1 = (Point3D(0, 0, 3), Point3D(0, 10, 3), Point3D(10, 10, 3), Point3D(10, 0, 3)) pts_2 = (Point3D(10, 0, 3), Point3D(10, 10, 3), Point3D(20, 10, 3), Point3D(20, 0, 3)) pts_3 = (Point3D(0, 10, 3), Point3D(0, 20, 3), Point3D(10, 20, 3), Point3D(10, 10, 3)) pts_4 = (Point3D(10, 10, 3), Point3D(10, 20, 3), Point3D(20, 20, 3), Point3D(20, 10, 3)) room2d_1 = Room2D('Office1', Face3D(pts_1), 3) room2d_2 = Room2D('Office2', Face3D(pts_2), 3) room2d_3 = Room2D('Office3', Face3D(pts_3), 3) room2d_4 = Room2D('Office4', Face3D(pts_4), 3) story = Story('OfficeFloor', [room2d_1, room2d_2, room2d_3, room2d_4]) story.solve_room_2d_adjacency(0.01) story.set_outdoor_window_parameters(SimpleWindowRatio(0.4)) story.multiplier = 4 building = Building('OfficeBuilding', [story]) # assign energy properties for room in story.room_2ds: room.properties.energy.program_type = office_program room.properties.energy.add_default_ideal_air() # create the Model object model = Model('NewDevelopment', [building]) ``` Once a Dragonfly Model has been created, it can be converted to a honeybee Model, which can then be converted to IDF format like so: ```python # create the dragonfly Model object model = Model('NewDevelopment', [building]) # serialize the dragonfly Model to Honeybee Models and convert them to IDF hb_models = model.to_honeybee('Building', use_multiplier=False, tolerance=0.01) idfs = [hb_model.to.idf(hb_model) for hb_model in hb_models] ``` The dragonfly model can also be serialized to a geoJSON to be simulated with URBANopt. ```python from ladybug.location import Location # create the dragonfly Model object model = Model('NewDevelopment', [building]) # create a location for the geoJSON and write it to a folder location = Location('Boston', 'MA', 'USA', 42.366151, -71.019357) sim_folder = './tests/urbanopt_model' geojson, hb_model_jsons, hb_models = model.to.urbanopt(model, location, folder=sim_folder) ``` ## Local Development 1. Clone this repo locally ``` git clone git@github.com:ladybug-tools/dragonfly-energy # or git clone https://github.com/ladybug-tools/dragonfly-energy ``` 2. Install dependencies: ``` cd dragonfly-energy pip install -r dev-requirements.txt pip install -r requirements.txt ``` 3. Run Tests: ``` python -m pytest tests/ ``` 4. Generate Documentation: ``` sphinx-apidoc -f -e -d 4 -o ./docs ./dragonfly_energy sphinx-build -b html ./docs ./docs/_build/docs ``` %package -n python3-dragonfly-energy Summary: Dragonfly extension for energy simulation. Provides: python-dragonfly-energy BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-dragonfly-energy ![Dragonfly](https://www.ladybug.tools/assets/img/dragonfly.png) [![Build Status](https://github.com/ladybug-tools/dragonfly-energy/workflows/CI/badge.svg)](https://github.com/ladybug-tools/dragonfly-energy/actions) [![Coverage Status](https://coveralls.io/repos/github/ladybug-tools/dragonfly-energy/badge.svg?branch=master)](https://coveralls.io/github/ladybug-tools/dragonfly-energy) [![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/downloads/release/python-370/) [![Python 2.7](https://img.shields.io/badge/python-2.7-green.svg)](https://www.python.org/downloads/release/python-270/) [![IronPython](https://img.shields.io/badge/ironpython-2.7-red.svg)](https://github.com/IronLanguages/ironpython2/releases/tag/ipy-2.7.8/) # dragonfly-energy Dragonfly extension for energy simulation. ## Installation `pip install dragonfly-energy` ## QuickStart ```python import dragonfly_energy ``` ## [API Documentation](http://ladybug-tools.github.io/dragonfly-energy/docs) ## Usage Since the building geometry in dragonfly is fundamentally 2D, creating a model of a building and assigning energy model properties can be done with a few lines of code. Here is an example: ```python from dragonfly.model import Model from dragonfly.building import Building from dragonfly.story import Story from dragonfly.room2d import Room2D from dragonfly.windowparameter import SimpleWindowRatio from honeybee_energy.lib.programtypes import office_program # create the Building object pts_1 = (Point3D(0, 0, 3), Point3D(0, 10, 3), Point3D(10, 10, 3), Point3D(10, 0, 3)) pts_2 = (Point3D(10, 0, 3), Point3D(10, 10, 3), Point3D(20, 10, 3), Point3D(20, 0, 3)) pts_3 = (Point3D(0, 10, 3), Point3D(0, 20, 3), Point3D(10, 20, 3), Point3D(10, 10, 3)) pts_4 = (Point3D(10, 10, 3), Point3D(10, 20, 3), Point3D(20, 20, 3), Point3D(20, 10, 3)) room2d_1 = Room2D('Office1', Face3D(pts_1), 3) room2d_2 = Room2D('Office2', Face3D(pts_2), 3) room2d_3 = Room2D('Office3', Face3D(pts_3), 3) room2d_4 = Room2D('Office4', Face3D(pts_4), 3) story = Story('OfficeFloor', [room2d_1, room2d_2, room2d_3, room2d_4]) story.solve_room_2d_adjacency(0.01) story.set_outdoor_window_parameters(SimpleWindowRatio(0.4)) story.multiplier = 4 building = Building('OfficeBuilding', [story]) # assign energy properties for room in story.room_2ds: room.properties.energy.program_type = office_program room.properties.energy.add_default_ideal_air() # create the Model object model = Model('NewDevelopment', [building]) ``` Once a Dragonfly Model has been created, it can be converted to a honeybee Model, which can then be converted to IDF format like so: ```python # create the dragonfly Model object model = Model('NewDevelopment', [building]) # serialize the dragonfly Model to Honeybee Models and convert them to IDF hb_models = model.to_honeybee('Building', use_multiplier=False, tolerance=0.01) idfs = [hb_model.to.idf(hb_model) for hb_model in hb_models] ``` The dragonfly model can also be serialized to a geoJSON to be simulated with URBANopt. ```python from ladybug.location import Location # create the dragonfly Model object model = Model('NewDevelopment', [building]) # create a location for the geoJSON and write it to a folder location = Location('Boston', 'MA', 'USA', 42.366151, -71.019357) sim_folder = './tests/urbanopt_model' geojson, hb_model_jsons, hb_models = model.to.urbanopt(model, location, folder=sim_folder) ``` ## Local Development 1. Clone this repo locally ``` git clone git@github.com:ladybug-tools/dragonfly-energy # or git clone https://github.com/ladybug-tools/dragonfly-energy ``` 2. Install dependencies: ``` cd dragonfly-energy pip install -r dev-requirements.txt pip install -r requirements.txt ``` 3. Run Tests: ``` python -m pytest tests/ ``` 4. Generate Documentation: ``` sphinx-apidoc -f -e -d 4 -o ./docs ./dragonfly_energy sphinx-build -b html ./docs ./docs/_build/docs ``` %package help Summary: Development documents and examples for dragonfly-energy Provides: python3-dragonfly-energy-doc %description help ![Dragonfly](https://www.ladybug.tools/assets/img/dragonfly.png) [![Build Status](https://github.com/ladybug-tools/dragonfly-energy/workflows/CI/badge.svg)](https://github.com/ladybug-tools/dragonfly-energy/actions) [![Coverage Status](https://coveralls.io/repos/github/ladybug-tools/dragonfly-energy/badge.svg?branch=master)](https://coveralls.io/github/ladybug-tools/dragonfly-energy) [![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/downloads/release/python-370/) [![Python 2.7](https://img.shields.io/badge/python-2.7-green.svg)](https://www.python.org/downloads/release/python-270/) [![IronPython](https://img.shields.io/badge/ironpython-2.7-red.svg)](https://github.com/IronLanguages/ironpython2/releases/tag/ipy-2.7.8/) # dragonfly-energy Dragonfly extension for energy simulation. ## Installation `pip install dragonfly-energy` ## QuickStart ```python import dragonfly_energy ``` ## [API Documentation](http://ladybug-tools.github.io/dragonfly-energy/docs) ## Usage Since the building geometry in dragonfly is fundamentally 2D, creating a model of a building and assigning energy model properties can be done with a few lines of code. Here is an example: ```python from dragonfly.model import Model from dragonfly.building import Building from dragonfly.story import Story from dragonfly.room2d import Room2D from dragonfly.windowparameter import SimpleWindowRatio from honeybee_energy.lib.programtypes import office_program # create the Building object pts_1 = (Point3D(0, 0, 3), Point3D(0, 10, 3), Point3D(10, 10, 3), Point3D(10, 0, 3)) pts_2 = (Point3D(10, 0, 3), Point3D(10, 10, 3), Point3D(20, 10, 3), Point3D(20, 0, 3)) pts_3 = (Point3D(0, 10, 3), Point3D(0, 20, 3), Point3D(10, 20, 3), Point3D(10, 10, 3)) pts_4 = (Point3D(10, 10, 3), Point3D(10, 20, 3), Point3D(20, 20, 3), Point3D(20, 10, 3)) room2d_1 = Room2D('Office1', Face3D(pts_1), 3) room2d_2 = Room2D('Office2', Face3D(pts_2), 3) room2d_3 = Room2D('Office3', Face3D(pts_3), 3) room2d_4 = Room2D('Office4', Face3D(pts_4), 3) story = Story('OfficeFloor', [room2d_1, room2d_2, room2d_3, room2d_4]) story.solve_room_2d_adjacency(0.01) story.set_outdoor_window_parameters(SimpleWindowRatio(0.4)) story.multiplier = 4 building = Building('OfficeBuilding', [story]) # assign energy properties for room in story.room_2ds: room.properties.energy.program_type = office_program room.properties.energy.add_default_ideal_air() # create the Model object model = Model('NewDevelopment', [building]) ``` Once a Dragonfly Model has been created, it can be converted to a honeybee Model, which can then be converted to IDF format like so: ```python # create the dragonfly Model object model = Model('NewDevelopment', [building]) # serialize the dragonfly Model to Honeybee Models and convert them to IDF hb_models = model.to_honeybee('Building', use_multiplier=False, tolerance=0.01) idfs = [hb_model.to.idf(hb_model) for hb_model in hb_models] ``` The dragonfly model can also be serialized to a geoJSON to be simulated with URBANopt. ```python from ladybug.location import Location # create the dragonfly Model object model = Model('NewDevelopment', [building]) # create a location for the geoJSON and write it to a folder location = Location('Boston', 'MA', 'USA', 42.366151, -71.019357) sim_folder = './tests/urbanopt_model' geojson, hb_model_jsons, hb_models = model.to.urbanopt(model, location, folder=sim_folder) ``` ## Local Development 1. Clone this repo locally ``` git clone git@github.com:ladybug-tools/dragonfly-energy # or git clone https://github.com/ladybug-tools/dragonfly-energy ``` 2. Install dependencies: ``` cd dragonfly-energy pip install -r dev-requirements.txt pip install -r requirements.txt ``` 3. Run Tests: ``` python -m pytest tests/ ``` 4. Generate Documentation: ``` sphinx-apidoc -f -e -d 4 -o ./docs ./dragonfly_energy sphinx-build -b html ./docs ./docs/_build/docs ``` %prep %autosetup -n dragonfly-energy-1.23.5 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-dragonfly-energy -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Sun Apr 23 2023 Python_Bot - 1.23.5-1 - Package Spec generated