Giter VIP home page Giter VIP logo

led_strips's Introduction

LED Strip Calculations

Introduction

This is a set of Jupyter notebooks for use in LED projects for conical spirals. It helps to estimate the length required given the cone base radius, r, and its height, h. It also provides some electrical calculation templates. Each notebook should be self contained and descriptive enough.

Installation and Usage

  • Clone the repo
  • Create a Makefile.env at the root ($ touch Makefile.env)
    • Or you can copy the Makefile.env.sample or Makefile.env.win.sample depending on your environment

Issue the following terminal command (at the repo root):

$ make launch

That command will construct the virtual environment based on the particular python version you want to use. It will look for all requirements.txt files and install all modules automatically. It will launch the Jupyter environment.

To delete the virtual environment issue make remove and that will remove the .venv along with all python cache folders and other items that are not required. This is a good way to get the latest versions of the packages.

Make

The makefiles are the reason for this repository. They provide functionality in a common way across different python repositories. It makes that using a command like make venv will construct the virtual environment and install all the requirements. It means that make test will run pytest (if installed).

For the makefiles to work properly, we have to define the Makefile.env. This file should not be stored in the repository. Makefile.env stores the path to the Python binaries that you want to use. This means it is possible to use different versions of Python if you want in a way that is transparent and flexible (at least I think so). There are two sample files, one for Linux (bash) and one for windows. Rename the appropriate one and set the path correctly.

  • Makefile.env
  • Makefile.env.sample
  • Makefile.env.win.sample

Once the Makefile.env is properly configured it is time to add the rest of the makefiles. For a basic Python repository, you should use the following 3 makefiles:

  • Makefile

    • This is the root makefile. It defines a lot of the commands and it includes (imports) the other more specialized makefiles.
  • Makefile.python

    • This is Python specific commands around constructing and managing the virtual environments.
    • It is simply included into the main makefile.
  • Makefile.python.build

    • This Python specific commands around testing and linting.
    • It is simply included into the main makefile.
  • Makefile.jupyter

    • This is additional commands to launch the Jupyter environment.

Basic Commands

Help:

$ make

Delete .venv and other python folders (caches and temp folders):

$ make remove

Build virtual environment (.venv):

$ make venv

Launch virtual environment:

$ make launch

License

MIT

led_strips's People

Contributors

troywilliams3687 avatar

Watchers

 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.