Giter Site home page Giter Site logo

corvia / thermonitor Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 145 KB

A hardware + web application to continuously monitor our farm and cafe thermometers and dispatch notifications.

Home Page: https://thermonitor.sqrts.com/

License: Other

Python 76.39% Shell 1.61% HTML 1.43% CSS 1.59% JavaScript 18.97%

thermonitor's Introduction

thermonitor

A hardware + web application project to continuously monitor thermometers and to dispatch notification if they dip above or below regular operating temperatures.

Documentation

API

The Thermonitor REST API specification can be found at docs/api.yaml. An HTML version of this document can be viewed using the Swagger editor.

Development

Front End

The front end is built using React and transformed ahead of time using browserify. When developing (i.e., when djthermonitor.settings.DEBUG == True), the output is expected at static/js/bundle.js. React, its dependencies, and the commands to build bundle.js are specified in package.json and managed with npm. npm will be installed automatically by provision.sh in VMs createed with Vagrantfile. For other environments, please install node v5.0.0 or newer from https://nodejs.org/en/download/stable/.

Once npm is available, simply run the following command from the project root directory to build bundle.js:

$ npm run start

This command will spawn a watchify process that will continuously monitor the static/js directory and build an updated bundle.js as changes are made.

NB: A known issue may prevent watchify from being notified of changes. See https://github.com/substack/watchify#rebuilds-on-os-x-never-trigger for more information and potential fixes.

Tests

Tests are located in the test directory and can be run with pytest, e.g.,

$ py.test -v

We use the flake8 python package to check for syntax errors and enforcing PEP 8 python coding conventions.

$ flake8

Build Process

Front End

As mentioned above, the front end is built using React and transformed ahead of time. For production (i.e., when djthermonitor.settings.DEBUG == False), however, the output is also minified. The resulting file is expected at static/js/bundle.min.js. Run the following command from the project root directory to build bundle.min.js:

$ npm run build

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.