GithubHelp home page GithubHelp logo

machineagency / planager Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 1.0 34.64 MB

live data flow environment for digital fabrication

License: MIT License

JavaScript 50.11% CSS 1.05% Python 45.29% Shell 3.56%

planager's Introduction

Dynamic Toolchains

Installation

  1. Clone and download this repository. Create a new python virtual environment in the top-level directory: python -m venv .venv. This makes development and managing dependencies MUCH easier; I always recommend working within virtual environments for Python development. To activate your environment, run the activation script: source .venv/bin/activate.
  2. Inside your environment, run pip install -r requirements.txt to install the python requirements.
  3. Run npm install to install frontend requirements from package.json. This will create package-lock.json and the node_modules directory, which are both included in the .gitignore.
  4. That's it!

Running locally

  1. To start the flask server, run python server.py.
  2. To start the frontend development server, run npm run dev.
  3. Navigate to localhost:8000 in your browser. It should open automatically.

Development

During development, I switch between platforms frequently (mainly Ubuntu and Windows). This allows me to make sure that everything is working as it should across different operating systems, so you can be reasonably optimistic that Planager will run on whatever you're running. VSCode helps immensely with this, as it automatically saves your workspace configuration and extensions. You are of course free to choose any development environment you wish.

Here is a quick overview of the main technologies used to build Planager:

  • Backend:
    • Planager - Python library for creating toolchains
    • Flask for webapp
    • Python-SocketIO for websocket server
  • Frontend:
    • Javascript
    • socketio-client for websocket client
    • Lit for creating web components
    • npm for managing dependencies
  • Local Development:
    • VSCode
    • webpack dev server
  • Deployment:
    • webpack for building and bundling
    • Heroku for hosting Figuring out an alternative because Heroku is dying.
    • Cloudflare for DNS management

Virtual Environments

I highly recommend creating a virtual environment if you haven't already! I like to name mine .venv, which is included in the .gitignore because any developer can recreate it on their machine. IDEs such as VScode can automatically source the python interpreter from your virtual environment.

Managing dependencies

To record any additional Python libraries that you may have installed, run pip freeze > requirements.txt to update the requirements file. Ensure you are working within your virtual environment, otherwise this command with include all of the packages installed globally on your system!

Node modules are stored in the /node_modules directory, which is created when you run npm install. To install a new node module, run npm install modulename --save. The --save flag will save the module as a production dependency, and --save-dev will save it as a development dependency.

Debugging

Everyone has their preferences when it comes to IDEs and debuggers, but I find VSCode to work well for me. I included a launch.json configuration in .vscode/.

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.