Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/upstream/develop' into 59295112…
Browse files Browse the repository at this point in the history
…-Ruby2_0_Sketchup

Conflicts:
	.gitignore
  • Loading branch information
macumber committed Dec 28, 2013
2 parents 49e08f6 + f42e5f8 commit 02017a2
Show file tree
Hide file tree
Showing 136 changed files with 96,844 additions and 481 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
/build-debug/
/build_release/
/build-release/
/build_64/
/build_64/
/build-64/
/build_profile/
/build-profile/
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ CMAKE_MINIMUM_REQUIRED( VERSION 2.8.7 )
PROJECT(OpenStudio)

SET(CMAKE_VERSION_MAJOR 1)
SET(CMAKE_VERSION_MINOR 1)
SET(CMAKE_VERSION_PATCH 4)
SET(CMAKE_VERSION_MINOR 2)
SET(CMAKE_VERSION_PATCH 0)

SET(CMAKE_VERSION_BUILD "Unknown" CACHE STRING "Build number")
FIND_PACKAGE(Git)
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion openstudiocore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ INSTALL(FILES "${CMAKE_SOURCE_DIR}/resources/resultsviewer/SmallOffice/SmallOffi


# Install additional Documents, such as release notes
install( FILES "${CMAKE_SOURCE_DIR}/../doc/ReleaseNotes/OpenStudio_Release_Notes_1_1_0_20131018.pdf" DESTINATION . )
install( FILES "${CMAKE_SOURCE_DIR}/../doc/ReleaseNotes/OpenStudio_Release_Notes_1_2_0_20131220.pdf" DESTINATION . )

###############################################################################

Expand Down
27 changes: 26 additions & 1 deletion openstudiocore/resources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,16 @@ if (APPLE)
install( DIRECTORY ${CMAKE_SOURCE_DIR}/resources/osversion
DESTINATION sharedresources
)
install( DIRECTORY ${CMAKE_SOURCE_DIR}/resources/web_assets
DESTINATION sharedresources
)
else()
install( DIRECTORY ${CMAKE_SOURCE_DIR}/resources/osversion
DESTINATION share/openstudio
)
install( DIRECTORY ${CMAKE_SOURCE_DIR}/resources/web_assets
DESTINATION share/openstudio
)
endif()


Expand Down Expand Up @@ -598,4 +604,23 @@ ADD_CUSTOM_TARGET( openstudio_isomodel_resources
SOURCES ${isomodel_resources_src}
)

CREATE_SRC_GROUPS( "${isomodel_resources_src}" )
CREATE_SRC_GROUPS( "${isomodel_resources_src}" )
########################################################
# CONTAM resources
# clear runs, calls to RUN_ENERGYPLUS will populate this
SET(ENERGYPLUS_OUTPUTS "")

SET(contam_resources_src
contam/CONTAMTemplate.osm
)

# update the resources
UPDATE_RESOURCES("${contam_resources_src}")

# add target
ADD_CUSTOM_TARGET( openstudio_contam_resources
DEPENDS ${contam_resources_src} ${ENERGYPLUS_OUTPUTS}
SOURCES ${contam_resources_src}
)

CREATE_SRC_GROUPS( "${contam_resources_src}" )
2,658 changes: 2,658 additions & 0 deletions openstudiocore/resources/contam/CONTAMTemplate.osm

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion openstudiocore/resources/model/OpenStudio.idd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!IDD_Version 1.1.4
!IDD_Version 1.2.0
! *****************************************************************************
! This file is the Input Data Dictionary (IDD) for OpenStudio Model.
!
Expand Down
9 changes: 9 additions & 0 deletions openstudiocore/resources/web_assets/bootstrap.min.css

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions openstudiocore/resources/web_assets/d3.min.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions openstudiocore/resources/web_assets/jquery.min.js

Large diffs are not rendered by default.

31 changes: 18 additions & 13 deletions openstudiocore/ruby/cloud/aws.rb.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ require 'net/ssh'
require 'tempfile'
require 'time'

OPENSTUDIO_VERSION='${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}.${CMAKE_VERSION_PATCH}'

def error(code, msg)
puts ({:error => {:code => code, :message => msg},
:arguments => ARGV[2..-1]}.to_json)
Expand Down Expand Up @@ -89,21 +87,28 @@ end

if ARGV.length == 6
@params = JSON.parse(ARGV[5])
OPENSTUDIO_VERSION = @params['openstudio_version'] if @params.include?('openstudio_version')
@server_image_id = @params['server_ami'] if @params.include?('server_ami')
@worker_image_id = @params['worker_ami'] if @params.include?('worker_ami')
end

resp = Net::HTTP.get_response('developer.nrel.gov','/downloads/buildings/openstudio/rsrc/amis.json')
if resp.code == '200'
result = JSON.parse(resp.body)
version = result.has_key?(OPENSTUDIO_VERSION) ? OPENSTUDIO_VERSION : 'default'
OPENSTUDIO_VERSION = '${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}.${CMAKE_VERSION_PATCH}' unless defined?(OPENSTUDIO_VERSION)

if (!defined?(@server_image_id) || !defined?(@worker_image_id))
resp = Net::HTTP.get_response('developer.nrel.gov','/downloads/buildings/openstudio/rsrc/amis.json')
if resp.code == '200'
result = JSON.parse(resp.body)
version = result.has_key?(OPENSTUDIO_VERSION) ? OPENSTUDIO_VERSION : 'default'

@server_image_id = result[version]['server']
if ARGV.length >= 6 && @params['instance_type'] == 'cc2.8xlarge'
@worker_image_id = result[version]['cc2worker']
@server_image_id = result[version]['server']
if ARGV.length >= 6 && @params['instance_type'] == 'cc2.8xlarge'
@worker_image_id = result[version]['cc2worker']
else
@worker_image_id = result[version]['worker']
end
else
@worker_image_id = result[version]['worker']
error(resp.code, 'Unable to download AMI IDs')
end
else
error(resp.code, 'Unable to download AMI IDs')
end

def create_struct(instance, procs)
Expand Down Expand Up @@ -344,7 +349,7 @@ def download_file(host, remote_path, local_path)
end

begin
@logger = Logger.new("aws.log")
@logger = Logger.new(File.expand_path("~/.aws.log"))
@logger.info("initialized")
case ARGV[4]
when 'describe_availability_zones'
Expand Down
26 changes: 24 additions & 2 deletions openstudiocore/ruby/openstudio/utilities/test/Path_Test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@

require 'test/unit'

def changeTestPath(p)
p = OpenStudio::Path.new("./there")
return p
end

class Path_Test < Test::Unit::TestCase

# def setup
Expand All @@ -31,7 +36,6 @@ class Path_Test < Test::Unit::TestCase

def test_path
p = OpenStudio::Path.new("./here")
assert(p)
assert_equal("./here", p.to_s())
end

Expand All @@ -43,7 +47,25 @@ def test_funcOnlyTakesAPath
#s = "./here"
#OpenStudio::funcOnlyTakesAPath(s)
#p = Pathname.new("./here")
#OpenStudio::funcOnlyTakesAPath(s)
#OpenStudio::funcOnlyTakesAPath(p)
end

def test_PathCopy
p = OpenStudio::Path.new("./here")
assert_equal("./here", p.to_s())

q = p
assert_equal("./here", q.to_s())
assert_equal("./here", p.to_s())

q = OpenStudio::Path.new("./there")
assert_equal("./there", q.to_s())
assert_equal("./here", p.to_s())

q = changeTestPath(p)
assert_equal("./there", q.to_s())
assert_equal("./here", p.to_s())

end
end

Expand Down
Loading

0 comments on commit 02017a2

Please sign in to comment.