Code Monkey home page Code Monkey logo

docassemble-l4's Introduction

docassemble-l4

This is a package that extends docassemble-scasp and docassemble-datatypes to facilitate the rapid prototyping of expert systems based on code written in the l4 language.

Installation

Install this package using docassemble's package manager from the github source.

Dependencies

  • docassemble-scasp
  • gf-python
  • pyparsing
  • networkx

Configuration

In order for the interview generator to be able to install newly-generated interviews onto your playground, it needs API access. To provide that, go to "Profile", "Other Settings", "API Keys", and generate an API Key. Then add it to your docassemble server configuration as follows:

l4:
  API Key: XXXXXXX

Use

The docassemble.l4.intgen namespace includes generate_interview(LExSIS_source,scasp_source), which accepts the contents of a LExSIS file as a string, and the contents of an s(CASP) source file as a string. The scasp_source file contents are expected to use our LPDAT implementation in s(CASP).

That function will return the content of a docassemble interview that should function on a server with this module and scasp installed, such as the l4-docassemble server.

You can also access that functionality in a friendlier interface by running the docassemble.l4:intgen.yml interview, which accepts a LExSIS file and an s(CASP) file from the current user's playground static folder.

Drafting interview generator files:

It should be noted that drafting an s(CASP) file to be used for the interview generator is slightly different. Particularly, one does not include a model-finding query within the s(CASP) file, but instead adds it to the LExSIS file under the query header-value pair instead. For an example, see the treatment of a "Rock Paper Scissors" scenario from a pure s(CASP) perspective vs the interview generation perspective.

Contributing

What should I read to understand what's happening?

If you've never used docassemble before, we highly suggest that you familiarize yourself with it before proceeding.

Once you've got an idea of what docassemble does & how it works, we recommend you read the following articles:

After reading the above, familiarize yourself with the package.

  • the bulk of the logic is located in intgen.py
  • the user-facing interview generator is in intgen.yml
  • the question defaults for the various datatypes used l4.yml

Developer Workflow

We use pipenv to manage dependencies, and pytest to handle tests.

docassemble-l4's People

Contributors

alfredats avatar kharus avatar gauntlet173 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.