Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prep 0.10.0 #150

Merged
merged 5 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/nightly_ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Reporting-gem CI

on:
# push:
workflow_dispatch:
schedule:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
# 5 am UTC (11pm MDT the day before) every weekday night in MDT
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# URBANopt Reporting Gem

## Version 0.10.0
## What's Changed
* Additional reporting tests by @vtnate in https://github.com/urbanopt/urbanopt-reporting-gem/pull/147
* Update formatting and version in export_modelica_loads by @nllong in https://github.com/urbanopt/urbanopt-reporting-gem/pull/149
* Update feature reports for Reopt v3 by @vtnate in https://github.com/urbanopt/urbanopt-reporting-gem/pull/148


**Full Changelog**: https://github.com/urbanopt/urbanopt-reporting-gem/compare/v0.9.1...0.10.0

## Version 0.9.1
* downgrade json-schema to 2.7 by @vtnate in https://github.com/urbanopt/urbanopt-reporting-gem/pull/145

Expand Down
2 changes: 1 addition & 1 deletion lib/urbanopt/reporting/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

module URBANopt
module Reporting
VERSION = '0.9.1'.freeze
VERSION = '0.10.0'.freeze
end
end
16 changes: 7 additions & 9 deletions spec/urbanopt/reporting/reporting_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@
end

context 'with distributed generation' do

it 'can add values in distributed generation' do
expect(URBANopt::Reporting::DefaultReports::DistributedGeneration.add_values(1, 2)).to eq(3)
end
Expand All @@ -138,18 +137,18 @@
end

it 'can merge distributed generation systems together' do
existing_dgen = URBANopt::Reporting::DefaultReports::DistributedGeneration.new(annual_renewable_electricity_pct: 0, year_one_energy_cost_us_dollars: 100_000)
new_dgen = URBANopt::Reporting::DefaultReports::DistributedGeneration.new(annual_renewable_electricity_pct: 50, year_one_energy_cost_us_dollars: 50_000)
existing_dgen = URBANopt::Reporting::DefaultReports::DistributedGeneration.new(renewable_electricity_fraction: 0, year_one_energy_cost_us_dollars: 100_000)
new_dgen = URBANopt::Reporting::DefaultReports::DistributedGeneration.new(renewable_electricity_fraction: 50, year_one_energy_cost_us_dollars: 50_000)

distributed_generation = URBANopt::Reporting::DefaultReports::DistributedGeneration.merge_distributed_generation(existing_dgen, new_dgen)

expect(distributed_generation.annual_renewable_electricity_pct).to eq(50)
expect(distributed_generation.renewable_electricity_fraction).to eq(50)
end
end

it 'can add generator sizes' do
generator = URBANopt::Reporting::DefaultReports::Generator.new(size_kw:5)
new_generator = URBANopt::Reporting::DefaultReports::Generator.new(size_kw:8)
generator = URBANopt::Reporting::DefaultReports::Generator.new(size_kw: 5)
new_generator = URBANopt::Reporting::DefaultReports::Generator.new(size_kw: 8)
total_generator = URBANopt::Reporting::DefaultReports::Generator.add_generator(generator, new_generator)
expect(total_generator.size_kw).to eq(13)
end
Expand Down Expand Up @@ -241,9 +240,8 @@
end

it 'can report location results' do
location = URBANopt::Reporting::DefaultReports::Location.new({ latitude_deg: 13, longitude_deg: -61.24, })
location = URBANopt::Reporting::DefaultReports::Location.new({ latitude_deg: 13, longitude_deg: -61.24 })
expect(location.latitude_deg).to eq 13
expect(location.longitude_deg).to eq -61.24
expect(location.longitude_deg).to eq(-61.24)
end

end