Skip to content

Commit

Permalink
preliminary package structure docs
Browse files Browse the repository at this point in the history
  • Loading branch information
benne238 committed May 7, 2021
1 parent da4fbb1 commit c41325c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/package-structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## API package structure

The api can be broken down into 4 distinct parts:
1. The logger
2. The api
3. The ECNQueue
4. The initialization scripts

### Logger

The logger is its own subpackage and script which is used for outputting log information to both the terminal and a specified file. The logger uses the logging module to create log outputs with specified format.

### API

The api is the link between the ECNQueue and the frontend. The api continuously runs in the background, and takes urls matching a specified format from the front end and translates those as functions to be executed in the ECNQueue. The api uses flask and flask restful to do this

### ECNQueue

The ECNQueue subpackage is a parser in the backend for all of the items in stored in the queue directory. The ECNQueue parses the text documents in the queue and outputs structured json, which is then transfered to the fronted via the api.

### The initialization scripts

The initialization scripts take in user input (either via command line or wrapper script) and initialize the logger, ECNQueue, and API according to the user input. After initializing and implementing all of the necessary configurations, the initialization scripts start the api. These scripts use argparse to get user input and subprocess to launch the api via gunicorn. While not its own subpackage, the scripts are located directly in the `webqueue2_api` directory.


## Structure

```none
```

0 comments on commit c41325c

Please sign in to comment.