Skip to content

Commit 86c997c

Browse files
Move everything over from legal-tech-class
Co-authored-by: Quinten Steenhuis <qsteenhuis@suffolk.edu>
1 parent a30dd15 commit 86c997c

31 files changed

+5027
-1242
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
slug: combining-interviews
3+
title: Combining multiple interviews
4+
sidebar_label: Combining interviews
5+
---
6+
7+
import useBaseUrl from '@docusaurus/useBaseUrl';
8+
9+
## Overview
10+
11+
1. linking
12+
1. using an umbrella structure
13+
1. designing a generic interview
14+
15+
## Linking
16+
17+
1. using `interview_url()`
18+
19+
Example:
20+
21+
* [Dashboard Menu](https://github.com/SuffolkLITLab/docassemble-ALDashboard/blob/main/docassemble/ALDashboard/data/questions/menu.yml)
22+
23+
## Using an umbrella interview
24+
25+
<img src={useBaseUrl('/img/umbrella_diagram.svg')} />
26+
27+
### Preparing the included interview
28+
29+
1. remove all mandatory blocks in the child interview
30+
1. add a "named block" to the interview order block in the child interview
31+
1. give each attachment a `variable name` if it does not already have one
32+
33+
### Reference the included interview in the umbrella interview
34+
35+
1. add a reference to the `named block` in the umbrella interview
36+
1. add the new `variable name` to the download screen using `attachment code` or
37+
`ALDocumentBundle`
38+
39+
## Read more
40+
41+
1. https://docassemble.org/docs/logic.html#multiple%20interviews
42+
1. [Naming your modular interview files](https://suffolklitlab.org/docassemble-AssemblyLine-documentation/docs/coding_style_guide/yaml#use-clear-filenames-for-modular-interview-files)
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
slug: installing-production-app
3+
title: Installing a docassemble app on your production server
4+
sidebar_label: Installing a docassemble app on your production server
5+
---
6+
7+
Installing your app involves three basic steps:
8+
9+
1. [Putting the app into a
10+
package.](https://docassemble.org/docs/packages.html#playground). It's best
11+
to store the package on Github.
12+
2. Installing the app system-wide.
13+
3. Creating a shortcut `alias` to the app so that you can view it on the
14+
"Available interviews" /list menu and run it via /start/`alias`.
15+
16+
## Quick start
17+
18+
Before installing the package, you will need:
19+
20+
1. The URL to the package on GitHub.
21+
1. The name of the interview YAML file.
22+
1. The desired "alias" or shortcut name for the package.
23+
24+
**The interview author should be able to provide all three pieces of information
25+
to the server administrator before asking for the app to be installed.**
26+
27+
## Installing the app system-wide
28+
29+
To install a package, visit the "Package Management" page on your docassemble
30+
server (you can reach it via Menu | Package Management, or the /updatepackage
31+
page on your server.
32+
)
33+
34+
Copy the Github link to your package into the "Github URL" input. It should look
35+
something like this: `https://github.com/gbls/docassemble-MAEvictionDefense`
36+
(without any trailing `/`).
37+
38+
Now, scroll down and click on the large "Update" button. Although this is marked
39+
"Update," it also serves to install a package for the first time.
40+
41+
## Running the installed package
42+
43+
Now that you've installed the package, how do you run it? You will need to
44+
identify two things:
45+
46+
1. The internal/Python name of the package that corresponds to your package from
47+
GitHub.
48+
1. The name of the YAML file(s) that contains the runnable logic of the package.
49+
50+
The internal name of the package is very similar to the name of the GitHub
51+
repository, except that you replace the `-` with a `.`. For example, the package
52+
https://github.com/gbls/docassemble-MAEvictionDefense becomes
53+
`docassemble.MAEvictionDefense`. Package names are case sensitive. If you used
54+
the docassemble playground to create your package, it will always start with
55+
"docassemble" as the beginning of the package name.
56+
57+
The YAML file name is simply the name that the file has in your playground.
58+
If this is someone else's package, you will need to do a small amount of dective
59+
work.
60+
61+
Visit the GitHub page for the package. Each docassemble package has the same
62+
folder structure. Navigate by clicking through the folders as follows, replacing
63+
"PackageName" with the name of your package.
64+
65+
```
66+
docassemble
67+
+---[PackageName]
68+
+----data
69+
+---questions
70+
```
71+
72+
For example, for the MAEvictionDefense package, the folder contents
73+
look like this:
74+
https://github.com/GBLS/docassemble-MAEvictionDefense/tree/master/docassemble/MAEvictionDefense/data/questions
75+
76+
For some packages, there is only one YAML file. If there is more than one, you
77+
can either ask the package author which one should be run, or click through a
78+
few and pick the likeliest candidate. For the MAEvictionDefense package, the
79+
main interview file is named "eviction.yml".
80+
81+
For a package named `docassemble.MAEvictionDefense` and a YAML file named
82+
`eviction.yml`, the link to run the interview is
83+
`https://[docassemble.example.com]/run/MAEvictionDefense/eviction`.
84+
85+
## Creating a permanent shortcut link to the package
86+
87+
If you want, you can add a [customizable, short
88+
alias](https://docassemble.org/docs/config.html#dispatch) for the interview.
89+
90+
This adds the interview to the /list URL on the server, the "Available
91+
interviews" menu option, and allows you to advertise a nicer URL, like
92+
`https://docassemble.example.com/start/alias`.
93+
94+
This gives you a lot of flexibility to repackage your app later, which
95+
makes it a good idea if you ever want to share the link on a different
96+
website.
97+
98+
You will use the same information needed above: the **package name**
99+
and the **YAML filename**.
100+
101+
Visit the docassemble configuration page (/config) on your server.
102+
103+
Scroll down and look for an existing `dispatch` section in your
104+
configuration file. If you don't see one, create a new one that looks
105+
like this:
106+
107+
```
108+
dispatch:
109+
alias: docassemble.MyPackageName:data/questions/interview_name.yml
110+
```
111+
112+
Replace "MyPackageName" and "interview_name.yml" with the package name
113+
and the YAML filename for your package, respectively. Now, when someone
114+
visits "https://docassemble.example.com/start/alias" they will be redirected to the
115+
"interview_name.yml" interview.
116+
117+
For example, for the MAEvictionDefense package, the configuration looks like
118+
this:
119+
120+
```
121+
dispatch:
122+
eviction: docassemble.MAEvictionDefense:data/questions/eviction.yml
123+
```
124+
125+
And the interview can be run via `https://interviews.gbls.org/start/eviction`.
126+
127+
## Updating an app that is already installed
128+
129+
If the app has already been installed on the server, you do not need to get the
130+
GitHub URL again. Just scroll down the /updatepackage page until you see the
131+
name of the package (remember, it will be docassemble.PackageName). Then click the
132+
"update" button next to the package.
133+
134+
If you do not see the "update" button but the package is listed, then use the
135+
GitHub URL as described above.

0 commit comments

Comments
 (0)