Skip to content

Commit

Permalink
Initial update of documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
asparke2 committed Nov 14, 2017
1 parent 9b31c22 commit 7941d8c
Show file tree
Hide file tree
Showing 10 changed files with 127 additions and 70 deletions.
4 changes: 3 additions & 1 deletion .yardopts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
--main docs/Home.md
--embed-mixins
lib/openstudio-standards/standards/**/*.rb
lib/openstudio-standards/prototypes/**/*.rb
lib/openstudio-standards/utilities/**/*.rb
lib/openstudio-standards/weather/**/*.rb
-
docs/Home.md
docs/UserQuickStartGuide.md
docs/Architecture.md
docs/Features.md
docs/DeveloperInformation.md
docs/CodeStructure.md
docs/AddingAStandard.md
Expand Down
65 changes: 65 additions & 0 deletions License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Copyright (c) 2008-2013, Alliance for Sustainable Energy.
All rights reserved.

NOTICE

This computer software (Software) is code in development prepared by the
Alliance for Sustainable Energy, (hereinafter the "Contractor"), under
Contract DE-AC36-08GO28308 (Contract) with the Department of Energy (DOE).
The United States Government has been granted for itself and others acting
on its behalf a paid-up, non-exclusive, irrevocable, worldwide license in
the Software to reproduce, prepare derivative works, and perform publicly
and display publicly. Beginning five (5) years after the date permission
to assert copyright is obtained from the DOE, and subject to any
subsequent five (5) year renewals, the United States Government is granted
for itself and others acting on its behalf a paid-up, non-exclusive,
irrevocable, worldwide license in the Software to reproduce, prepare
derivative works, distribute copies to the public, perform publicly and
display publicly, and to permit others to do so. If the Contractor ceases
to make this computer software available, it may be obtained from DOE's
Office of Scientific and Technical Information's Energy Science and
Technology Software Center (ESTSC) at P.O. Box 1020, Oak Ridge, TN 37831-
1020.

DISCLAIMER

THIS SOFTWARE IS PROVIDED BY THE CONTRACTOR "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
NO EVENT SHALL THE CONTRACTOR OR THE U.S. GOVERNMENT BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER,
INCLUDING BUT NOT LIMITED TO CLAIMS ASSOCIATED WITH THE LOSS OF DATA OR
PROFITS, WHICH MAY RESULT FROM AN ACTION IN CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS CLAIM THAT ARISES OUT OF OR IN CONNECTION WITH THE ACCESS, USE OR
PERFORMANCE OF THIS SOFTWARE.

YOU AGREE TO INDEMNIFY DOE/NREL/ALLIANCE, AND ITS SUBSIDIARIES,
AFFILIATES, OFFICERS, AGENTS, AND EMPLOYEES AGAINST ANY CLAIM OR DEMAND,
INCLUDING REASONABLE ATTORNEYS' FEES, RELATED TO YOUR USE OF THESE DATA.

DOE/NREL/Alliance is not obligated to provide the user with any support,
consulting, training or assistance of any kind with regard to the use of
these Data or to provide the user with any updates, revisions or new
versions of these Data.

The names DOE/NREL/Alliance may not be used in any advertising or
publicity to endorse or promote any products or commercial entities unless
specific written permission is obtained from DOE/NREL/Alliance.


OPEN SOURCE LICENSE

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details here.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

17 changes: 0 additions & 17 deletions Openstudio-standards-notes.txt

This file was deleted.

15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,20 @@

**Unit Test Status:** [![Circle CI](https://circleci.com/gh/NREL/openstudio-standards/tree/master.svg?style=svg)](https://circleci.com/gh/NREL/openstudio-standards/tree/master)

**Code Coverage:** [![Coverage Status](https://coveralls.io/repos/github/NREL/openstudio-standards/badge.svg?branch=master)](https://coveralls.io/github/NREL/openstudio-standards?branch=master)

This library (a Ruby Gem) is an extension of the {https://www.openstudio.net/ OpenStudio SDK} with three main use-cases:
This library (a Ruby Gem) is an extension of the [OpenStudio SDK](https://www.openstudio.net/) with three main use-cases:

1. Create the DOE Prototype Buildings in OpenStudio format
2. Create a code baseline model from a proposed model
3. Check a model against a code/standard (not yet implemented)

## Complete Documentation
## Online Documentation

{http://www.rubydoc.info/gems/openstudio-standards Complete Online Documentation}
If you are a user, please see the [Online Documentation](http://www.rubydoc.info/gems/openstudio-standards)
for an overview of how the library is structured and how it is used.

## User Quick Start Guide
## Developer Information

If you are a user, see the {file:openstudio-standards/docs/UserQuickStartGuide.md User Quick Start Guide}
If you are a developer, see the [Developer Information](docs/DeveloperInformation.md) page.

## Developer Information

If you are a developer, see the {file:openstudio-standards/docs/DeveloperInformation.md Developer Information page}.

15 changes: 1 addition & 14 deletions docs/AddingAStandard.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,4 @@ This document gives a high-level overview of adding a new Template (energy code,
3. Add your Template to the **Templates** tab.
3. Add your new information to the remaining tabs.

## 3. Enable your new Template in the code

1. Decide which methods you want to enable your Template for

Typical examples might be:

1.


- Making
- dfd
- df
-

## 3. TODO - Need to write up instructions
19 changes: 6 additions & 13 deletions docs/CodeStructure.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@

# Code Structure

# /openstudio-standards

The `openstudio-standards` gem code.

## /data

The raw data used by the library. Files in this directory should not contain code.

### /geometry

These files contain 3D building geometry that is often used as a starting point for prototypical models.
These files contain 3D building geometry that is often used as a starting point for prototypical models. It also contains JSON files that describe the HVAC systems to be used with the geometry.

### /standards

These files contain information from energy codes/standards, as well as typical building characteristics. Examples include HVAC efficiency values, performance curves, construction U-values, and schedules. The code accesses this information when applying a standard or creating a prototypical building.

Rather than editing the JSON files directly, developers should edit [The OpenStudio_Standards Google Spreadsheet](https://docs.google.com/spreadsheets/d/15-mlZrWbA4srtFHtWRP1dgPeuI5plFdjCb1B79fEukI/edit?usp=sharing)
- To get edit access to this spreadsheet, contact <mailto:[email protected]>.

### /weather

These files contain weather information for representative locations. The `.epw` files contain typical annual weather data, the `.ddy` files contain design day information, and the `.stat` files contain a summary of the weather in that location.

## /lib/openstudio-standards

The functional code.
The functional code that makes up this library.

### /btap

Expand All @@ -37,15 +34,15 @@ These files extend OpenStudio classes to allow users to run a sizing run and acc

### /prototypes

These files extend OpenStudio classes to apply typical assumptions that are not governed by a standard, and for which reasonable values exist. For example, the configuration of the HVAC systems, assumptions for fan pressure drops, etc. These assumptions come from sources like the DOE Prototype, the DOE Reference Buildings, and the Canadian Archetype Buildings.
These files apply typical assumptions that are not governed by a standard, and for which reasonable values exist. For example, the configuration of the HVAC systems, assumptions for fan pressure drops, etc. These assumptions come from sources like the DOE Prototype, the DOE Reference Buildings, and the Canadian Archetype Buildings.

### /standards

These files extend OpenStudio classes to enable them to modify their inputs to meet a specific standard. For example, the Chiller:Electric:EIR object has a new method that sets its COP and performance curves based on the selected standard, the capacity, and the compressor type. These methods rely on the information in the `/data/standards` directory for lookups.
These files modify model inputs to meet a specific standard. For example, there is a method that modifies a Chiller:Electric:EIR and sets its COP and performance curves based on the selected standard, the capacity, and the compressor type. These methods rely on the information in the `/data/standards` directory for lookups.

### /weather

These files extend the OpenStudio classes to allow a model to import design days, pull water mains temperature from the .stat file, and assign the correct weather file to the model.
These files import design days to models, pull water mains temperature from the .stat file, and assign the correct weather file to the model.

## /test

Expand All @@ -54,7 +51,3 @@ This directory contains unit tests which run various portions of the code and en
## docs

This is where the documentation (like this very page) lives. Note that the code documentation is not here. Those pages are generated on-the-fly from the source code, and are not committed to the repository.

# /measures

Each folder in this directory contains an [OpenStudio Measure](http://nrel.github.io/OpenStudio-user-documentation/getting_started/about_measures/) that requires the `openstudio-standards` gem to operate correctly. When the tests for this repository are run, in addition to running the tests in the `/openstudio-standards/test` directory, it also runs the Measure-specific tests found in the `/MeasureName/tests` directory. Eventually, the tests for these Measures will be run by a dedicated Measure testing framework, but for now they are included in this repository to ensure that changes to the `openstudio-standards` gem do not break them.
14 changes: 8 additions & 6 deletions docs/DeveloperInformation.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Developer Information
# Really MUST BE UPDATED

## Setup

1. Install the [latest version of OpenStudio](https://www.openstudio.net/downloads)
2. Install Ruby:
1. **On Mac**:
2. Ruby 2.2 is already installed, go to the next step.
2. Install Ruby 2.2 using [rbenv](http://octopress.org/docs/setup/rbenv/) (`ruby -v` from command prompt to check installed version).
3. **On Windows**:
4. Install [Ruby 2.2.6](http://rubyinstaller.org/downloads/) (`ruby -v` from command prompt to check installed version).
5. Install [Ruby DevKit](http://rubyinstaller.org/downloads/) by following [these installation instructions](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit)
Expand All @@ -17,9 +17,9 @@
4. Save it here: `/usr/lib/ruby/site_ruby/openstudio.rb`
5. **On Windows**:
6. Create a file called `openstudio.rb`
7. Contents: `require "C:/openstudio-2.1.0/Ruby/openstudio.so"` Modify `2.1.0` to the version you installed.
7. Contents: `require "C:/openstudio-2.1.0/Ruby/openstudio.rb"` Modify `2.1.0` to the version you installed.
8. Save it here: `C:/Ruby22-x64/lib/ruby/site_ruby/openstudio.rb`
9. Start > right click Computer > Properties > Advanced system settings > Environment variables. In the User variables section (top) add a new Variable with the name `GEM_PATH` and the Value `C:\Ruby22-x64\lib\ruby\gems\2.0.0`.
9. Start > right click Computer > Properties > Advanced system settings > Environment variables. In the User variables section (top) add a new Variable with the name `GEM_PATH` and the Value `C:\Ruby22-x64\lib\ruby\gems\2.2.0`.

5. Install the `bundler` ruby gem. (`gem install bundler` from command prompt)
6. Install the `json` ruby gem. (`gem install json` from command prompt)
Expand All @@ -29,7 +29,7 @@
9. Run all commands below from the `/openstudio-standards/openstudio-standards` directory
10. **On Windows**, use the Git Bash instead of the default command prompt.
11. **On Mac** the default terminal is fine.
11. Navigate to the `openstudio-standards/openstudio-standards` directory.
11. Navigate to the `openstudio-standards` directory.
12. Command prompt: `bundle install`. This will install all ruby gems necessary to develop this code.
13. Sign up for an account at [CircleCI](https://circleci.com/) and follow the `NREL/openstudio-standards` project.
14. That's it, you are ready to make changes!
Expand Down Expand Up @@ -61,6 +61,7 @@ This project uses [Rake](http://rake.rubyforge.org/) to run tasks from the termi
- `rake install:local`: installs the gem locally
- `rake release`: pushes the code to RubyGems.org. Don't use this without asking!
- `rake rubocop`: checks the code syntax
- `rake rubocop`: checks the code syntax and shows the report
- `rake rubocop:auto_correct`: fixes mistakes in code syntax
- `rake test:compliance`: runs tests for NECB compliance (Canadian)
- `rake test:necb-buildings`: runs tests for NECB buildings (Canadian)
Expand All @@ -69,11 +70,12 @@ This project uses [Rake](http://rake.rubyforge.org/) to run tasks from the termi

### Modify the code

As you add to/modify the code, please try to fit changes into the current structure rather than bolting things on willy-nilly. See the {file:openstudio-standards/docs/CodeStructure.md Code Structure page} to see how the code is organized. If you don't understand something or want to discuss your plan before you get started, contact {mailto:[email protected]}.
As you add to/modify the code, please try to fit changes into the current structure rather than bolting things on willy-nilly. See the {file:docs/CodeStructure.md Code Structure page} to see how the code is organized. If you don't understand something or want to discuss your plan before you get started, contact <mailto:[email protected]>.

1. Make a new branch for your changes.
2. Modify the code on your branch.
3. Modify the [OpenStudio_Standards Google Spreadsheet](https://docs.google.com/spreadsheets/d/15-mlZrWbA4srtFHtWRP1dgPeuI5plFdjCb1B79fEukI/edit?usp=sharing)
- To get edit access to this spreadsheet, contact <mailto:[email protected]>.
4. `rake data:update` to download the latest version of the spreadsheet from Google Drive and export the JSON files.

### Test the code
Expand Down
2 changes: 1 addition & 1 deletion docs/Architecture.md → docs/Features.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Architecture
# Features

This library has been developed with three main use-cases in mind:

Expand Down
24 changes: 24 additions & 0 deletions docs/Home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# OpenStudio-Standards

**Unit Test Status:** [![Circle CI](https://circleci.com/gh/NREL/openstudio-standards/tree/master.svg?style=svg)](https://circleci.com/gh/NREL/openstudio-standards/tree/master)

This library (a Ruby Gem) is an extension of the {https://www.openstudio.net/ OpenStudio SDK} with three main use-cases:

1. Create the DOE Prototype Buildings in OpenStudio format
2. Create a code baseline model from a proposed model
3. Check a model against a code/standard (not yet implemented)

## Overview of Main Features
If you are looking for a high-level overview of the features of this library, see the {file:docs/Features.md Features page}.

## User Quick Start Guide

If you are a user, see the {file:docs/UserQuickStartGuide.md User Quick Start Guide}

## Developer Information

If you are a developer looking to get started, see the {file:docs/DeveloperInformation.md Developer Information page}.

If you are a developer that wants to add a Standard/Template, see the {file:docs/AddingAStandard.md Adding a Standard page}.

For an overview of the repository structure, see the {file:docs/CodeStructure.md Code Structure page}.
Loading

0 comments on commit 7941d8c

Please sign in to comment.