Giter VIP home page Giter VIP logo

alfalfa's Introduction

Alfalfa

This is a Haystack implementation backed by a virtual building. Virtual building simulation is performed using OpenStudio and EnergyPlus.

Getting Started

  1. Install Docker for your platform.
  2. From a command prompt docker-compose up web.
  3. Navigate to http://localhost/api/nav to verify that the Haystack implementation is running.
  4. Navigate to http://localhost to view web application.
  5. Navigate to http://localhost:9000 to view the minio file server. The default login is "user" and "password" This is a local implementation of Amazon S3 for bulk file storage during development.
  6. Use Ctrl-C to stop the services.

Running Worker Integration Tests

  1. Run docker-compose up worker-test
  2. Test output should be located in worker/test/output.
  3. See worker/test/test.py for an example.

Running Unit Tests

  1. Run pip install -r requirements.txt
  2. Run py.test

Running Integration Tests

  1. To run integration tests, then you must first launch the docker compose in the root directory of this repository

    docker-compose up
  2. After the service has launched (successfully?) then run

    py.test -m 'integration'

These tests have been added to the tox running framework and run on travis as needed. You can also test locally by simply calling:

```bash
tox -e integration
```

Making changes

  1. Make source code changes as needed.
  2. Verify that the Docker services are stopped with docker-compose down.
  3. Recreate the containers and restart services with docker-compose up.

This is a basic workflow that is sure to work, other docker and docker-compose commands can be used to start / stop services without rebuilding.

Project Organization

Development of this project is setup to happen in a handful of docker containers. This makes it easy to do docker-compose up, and get a fully working development environment. There are currently separate containers for web (The Haystack API server), worker (The thing that runs the simulation, aka master algorithm), database (mongo, the thing that holds a model's point dictionary and current / historical values), and queue (The thing where API requests go when they need to trigger something in the master algorithm). In this project there is one top level directory for each docker container.

Design

https://docs.google.com/presentation/d/1fYtwXvS4jlrhTdHJxPUPpbZZ8PwIM8sGCdLsG_6hwwo/edit#slide=id.p

alfalfa's People

Contributors

aviveiros11 avatar brianlball avatar corymosiman12 avatar dependabot[bot] avatar kbenne avatar nllong avatar willybernal avatar yanfeinrel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.