The purpose of the intent parser is to aid in creating well described experimental plans.
The code base exists in two forms: one is a javascript-like language, Google Application Script (GAS), which creates a plugin for Google Docs.
This plugin manifests itself as a "SD2 Intent Parser" menu item in the Add-Ons file menu of a document.
From here, the user can access features such as:
The second part of the code base is a server written in Python that receives and process requests from the GAS code.
Create a directory for your project and clone the experimental-intent-parser using
git clone https://github.com/SD2E/experimental-intent-parser.git
Create a python virtual environment by running
python3 -m venv intent-parser-env
In this command, intent-parser-env
represents the name of your virtual environment.
Run source bin/activate
to begin installing dependencies for the project
2_2
before installing this project's dependencies. pip3 install -r requirements.txt
on the requirements.txt.
Then, build python-datacatalog by running python3 setup.py install
.pip3 install git+https://github.com/SD2E/synbiohub_adapter.git@v1.2
. pip3 install -r requirements.txt
deactivate
to stop your virtual environment.The first time you run, python should open a web browser to log into Google.
This will allow the Intent Parser Server to manipulate the Dictionary Spreadsheet, and to analyze documents.
After authentication, a file called "token.pickle" will be created.
The Google account that you log into must have permission to edit the Dictionary spreadsheet, as well as any Google documents the Intent Parser will be run on.
intent_parser_server.py
python3 intent_parser_server.py -h
to get a list of command line options that the Intent Parser server accepts. This project is set up to build docker images for the server and for the Google App Script Addon.
Contact a developer to get access to intent parser's docker hub repository.
Open up a command line and navigate to where the .Dockerfiles are located.
To build and push a docker image for the server:
serverURL
(a variable) in Code.js to reflect the tool's version for release. Run the following dockerhub commands:
docker build -f intent_parser.server.Dockerfile -t username/repo_name:tag_name_and_version .
docker push username/repo_name:tag_name_and_version
To build and push a docker image for GAS,
current_release
(a variable) in ip_addon_script.py to reflect the tool's version for release.Run the following dockerhub commands:
docker build -f intent_parser.addons.Dockerfile -t username/repo_name:tag_name_and_version .
docker push username/repo_name:tag_name_and_version
The docker image is then deployed on a portainer instance.
Duplicate/Edit
button.Image
field to reflect your docker image tag releaseStart
and this concludes the deployment step.