Giter Site home page Giter Site logo

power-meter's Introduction

power-meter

Python scripts used for managing reading data from the power meters connected to SysNet servers

Setting up virtual environment

In order to better manage packaging in python, this project uses pipenv for version and dependency management.

To install pipenv on your machine, run:

$ pip install --user pipenv

Note: This does a user installation to prevent breaking any system-wide packages. If pipenv isn’t available in your shell after installation, you’ll need to add the user base’s binary directory to your PATH.

On Linux and macOS you can find the user base binary directory by running python -m site --user-base and adding bin to the end. For example, this will typically print ~/.local (with ~ expanded to the absolute path to your home directory) so you’ll need to add ~/.local/bin to your PATH. You can set your PATH permanently by modifying ~/.profile.

On Windows you can find the user base binary directory by running python -m site --user-site and replacing site-packages with Scripts. For example, this could return C:\Users\Username\AppData\Roaming\Python36\site-packages so you would need to set your PATH to include C:\Users\Username\AppData\Roaming\Python36\Scripts. You can set your user PATH permanently in the Control Panel. You may need to log out for the PATH changes to take effect.

After installing pipenv, cd into the source directory and run:

$ pipenv shell

to create the virtual environment.

$ pipenv install

installs all dependencies in the Pipfile.

$ pipenv run python read_power.py

runs read_power script, or you can activate shell and run directly (without pipenv run) there.

Troubleshooting

In order to access the power meters, you must be connected to UCSD-PROTECTED. If you are having trouble with dependencies, (runtime errors with import statements) run pipenv --rm to nuke virtual environment, and re-create it with pipenv shell. You should not be using pip as your package manager when working in this environment. If you want to add a new package during development, use pipenv install <package>. This will ensure it is added as a dependency so that it is reproducible across environments.

power-meter's People

Contributors

leungcyw avatar malcolmmcswain avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

power-meter's Issues

Fix x-axis on graphs

X-axis is zero-indexed. Make sure that Xmax is equivalent to the number of observations inputted by the user.

Label axes

Label the x and y-axis of our produced figures

Add more comments to code

Vignesh told us to add more comments to our code, including headers before functions and stuff like that. He said we should have "more comments than code".

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.