Giter Site home page Giter Site logo

clara-tools's People

Contributors

devn avatar noprompt avatar rbrush avatar williamparker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

clara-tools's Issues

Conj talk

Hello,

The demo you showed at Clojure/conj was interesting, being able to inspect rules and sessions. Will any of that work make it into clara-tools?

Thanks,
Devin

clara-tools not working with 0.8.9

Hi Ryan,

I know this repo is considered experimental, but I think it'd be a shame to let it succumb to bit rot.

It looks like show-logic-graph works, but show-session does not:

IllegalArgumentException No implementation of method: :components of protocol: #'clara.rules.engine/ISession found for class: clojure.lang.PersistentVector  clojure.core/-cache-protocol-fn (core_deftype.clj:554)

What would it take to get this working again with 0.8.9? I've spent a little bit of time looking through source, trying to figure out what broke, but I must admit I'm having some trouble given the delta in versions.

Connect only to localhost by default

The server that clara-tools starts up appears to be configured to be accessible from outside the machine it runs on.
I validated this by starting it up on a personal machine and hitting the URL with my IP address substituted for localhost on another device.

Based on the API elsewhere here it looks to me like this is intended to be used locally
(for example https://github.com/rbrush/clara-tools/blob/clara-tools-0.1.1/src/main/clojure/clara/tools/ui.clj#L21 ).
It seems to me that the default should be to not accept outside connections and to require that users specifically opt in if they want other behavior.

I have created a pull request that changes the default to not accept external connections and adds a new arity to start-server! that accepts
Jetty options. You can find the docs for the :host option I used at https://ring-clojure.github.io/ring/ring.adapter.jetty.html

I'd be happy to add test(s) for this; I don't know what your thinking here would be on the value of the test vs the bloat.
I can see an argument that testing here would just be re-testing Ring. Some options I see are:

  1. Starting the server and hitting the clara-tools URL by both localhost and the IP address and validating that the latter fails.
    This is dependent on the network configuration of the machine running the build and any sandboxing (for example on a CI server) seems like it could be problematic.
  2. Validate that the host field is set in the underlying Jetty classes. I believe http://download.eclipse.org/jetty/9.3.6.v20151106/apidocs/org/eclipse/jetty/server/AbstractNetworkConnector.html#getHost-- is the field such a test would look at. This is basically re-testing Ring, but I can see some value in making sure that the option was passed correctly although it wouldn't be a particularly strong test.
  3. Mock ring.adapter.jetty/run-jetty and validate the arguments it receives.

Current status of 0.2 branch

It isn't an immediate concern, since I don't plan to work on it immediately, but I was wondering if you could give a brief rundown of the current state of the 0.2 branch, what you want to add before a 0.2 release, etc. I have other priorities right now (such as performance of clara-rules itself and some internal initiatives), but longer term explainability of rules is something that's been weighing on my mind, and it would be nice to know what the status of this project is. No rush.

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.