The ECaaS project requires integration with a Product Characteristics Database that is able to resolve references to products that exist in the marketplace of various categories, and to be able to use the referenced product data to help complete inputs for Home Energy Model (HEM) calculations.
This repository contains Rust packages to help fulfill these requirements.
This library package exposes a function resolve_products that takes a parameter that implements std::io::Read (this
must be a conforming JSON document) and returns another value that implements std::io::Read with any
product_reference fields resolved into the data necessary for a HEM input.
There is also a binary entry point for this package that can be used to resolve input JSON from a file (
products.json).
To convert a JSON document from a local file:
cargo run -p resolve-products --features="cli,aws-config" -- [PATH_TO_FILE]To convert JSON copied in a Mac OS clipboard:
pbpaste | cargo run -p resolve-products --features="cli,aws-config" -- -If this package is being used within an AWS environment and using a DynamoDB store for the HEM database, the application that it is being used in requires the following permissions:
dynamodb:GetItemdynamodb:BatchGetItem
If you've done work in a pair or ensemble why not add your co-author(s) to the commit? This way everyone involved is
given credit and people know who they can approach for questions about specific commits. To make this easy there is a
commit template with a list of regular contributors to this code base. You will find it at the root of this
project: commit_template.txt. Each row represents a possible co-author, however everyone is commented out by default (
using #), and any row that is commented out will not show up in the commit.
If your name is not in the commit-template.txt yet, edit the file and add a new row with your details, following the
format #Co-Authored-By: Name <email>, e.g. #Co-Authored-By: Maja <maja@gmail.com>. The email must match the email
you use for your GitHub account. To protect your privacy, you can activate and use your noreply GitHub addresses (find
it in GitHub under Settings > Emails > Keep my email addresses private).
To apply the commit template navigate to the root of the project in a terminal and
use: git config commit.template commit-template.txt. This will edit your local git config for the project and apply
the template to every future commit.
When creating a new commit, edit your commit (e.g. using vim, or a code editor) and delete the # in front of any
co-author(s) you want to credit. This means that it's probably easier and quicker to use git commit (instead
of git commit -m "" followed by a git commit --amend), as it will show you the commit template content for you to
edit.