Giter VIP home page Giter VIP logo

bowler-script-kernel's Introduction

Documentation

Javadoc Generated Documentation

Bowler Kernel Scripting environment

Join the chat at https://gitter.im/CommonWealthRobotics/bowler-script-kernel This is the core kernel mechanism for the Bowler operating system. It consists of a modular scripting environment. This engine passes Lists of JVM objects back and forth across languages, letting you mix Java, Groovy, Clojure and Python within a single memory sharing application. The sources are stored in git repos and hyperlink at the source level to add modules. You can call this application from the command line like bash and pass it scripts to run sequentially or pipe the output from one into the input of another.

All platforms

You need to use the installer from

Usage

This will let you pass code snippets directly to the scripting engine

Object returnVal = ScriptingEngine.inlineScriptRun(String code, ArrayList<Object> args,ShellType activeType)

This will let you load code directly out of a github gist: This code will load this github gist: https://gist.github.com/madhephaestus/d4312a0787456ec27a2a

<script src="https://gist.github.com/madhephaestus/d4312a0787456ec27a2a.js"></script>
Object returnVal = ScriptingEngine.inlineGistScriptRun("d4312a0787456ec27a2a", "helloWorld.groovy" ,null) 

Embed as a library in your projects

Maven

<dependency>
  <groupId>com.neuronrobotics</groupId>
  <artifactId>BowlerScriptingKernel</artifactId>
  <version>VERSION_FROM_BADGE</version>
</dependency>

Gradle

dependencies {
 compile "com.neuronrobotics:BowlerScriptingKernel:VERSION_FROM_BADGE"
}

All platforms

  Usage: 
  
  java -jar BowlerScriptKernel.jar -s .. # This will load one script after the next

  java -jar BowlerScriptKernel.jar -p .. # This will load one script then take the list of objects returned and pass them to the next script as its 'args' variable
  
  java -jar BowlerScriptKernel.jar -r <Groovy,Clojure,Jython> #Starts a repl for interactive robot coding
  
  java -jar BowlerScriptKernel.jar -g <GIT url>  <File> # Runs a file from its git location

bowler-script-kernel's People

Contributors

gitter-badger avatar jansensmith avatar madhephaestus avatar octogonapus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bowler-script-kernel's Issues

How to build & see static analysis violations

Building

I have been putting this work on branches named refactor_build_script. The kernel and its two submodules have a branch named that. Check it out, initialize & update the submodules, and then run gradlew classes to compile things (note that this only compiles the main source set, to compile the test source set run gradlew testClasses).

Running the analysis

gradlew tasks prints out all the tasks runnable from the root project. The tasks you should be concerned about for now are:

  • gradlew findbugsMain runs the FindBugs static analysis tool.
  • gradlew pmdMain runs the PMD static analysis tool.
  • gradlew checkstyleMain runs the Checkstyle format checker.
  • gradlew spotlessCheck and gradle spotlessApply runs the Spotless format checker and formatter. spotlessCheck prints out formatting violations, if there are any, and spotlessApply fixes all the violations it can and will print out those that it can't.

Most of those tasks above have a Main suffix. This means that they will run on the "main" source set. Essentially, this is all your code minus tests. To run those tools on test sources, use a Test suffix instead. For example, gradlew pmdMain runs on the main source set and gradlew pmdTest runs on the test source set.

These tools have various ways of telling you that you are a bad programmer. FindBugs prints violations into your terminal, and I believe Checkstyle does as well (though you shouldn't have much, or any, trouble with Checkstyle if you just run gradlew spotlessApply first). PMD prefers to save reports to a file, which it will link to you in your terminal.

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.