Skip to content

Commit

Permalink
WIP documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
niquerio committed Nov 25, 2024
1 parent 5d81e57 commit 49fb028
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/digifeeds/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Digifeeds
=================
.. toctree::
overview
new_process
current_digifeeds_process
old_digifeeds_process
7 changes: 6 additions & 1 deletion docs/digifeeds/new_process.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Proposed Digifeeds Process

## Overview

```mermaid
flowchart TD
A[Folder with Scans]
Expand Down Expand Up @@ -32,7 +34,9 @@ flowchart TD
R -- No --> S[Do nothing]
R --Yes --> T[Remove from digifeeds set]
```

## Database tables

```mermaid
erDiagram
ITEM ||--o{ ITEM_STATUS : has_many
Expand All @@ -55,7 +59,8 @@ erDiagram
```

## CLI scripts
```

```bash
aim digifeeds check_zephir
aim digifeeds zip_and_move_to_pickup
aim digifeeds add_to_db BARCODE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Current Digifeeds Process
# Old Digifeeds Process

This is what the digifeeds process was before we switched to the one handled in
by this application.

## Overall Process

```mermaid
flowchart LR
A[Scanner] -->|creates scans and puts them in| B[Holding Folder]
Expand All @@ -15,7 +20,9 @@ flowchart LR
H --> |checks| J[HathiTrust Bib API]
```

## Verifier Script

```mermaid
flowchart TD
A[Check Barcode List with HathiTrust Bib API ] --> B{Is each item in zephir?}
Expand Down
67 changes: 67 additions & 0 deletions docs/digifeeds/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Digifeeds Overview

This is a place to store the mermaid.js code for the [Digifeeds documentation in Confluence](https://mlit.atlassian.net/wiki/spaces/LSO/pages/10388733957/Digifeeds+Process).

## Highest Level Flowchart

```mermaid
flowchart TD
A@{ shape: lin-cyl, label: "Folder on Mayhem"}
B[Google Drive Folder]
C(Digifeeds Process)
C --> A
C --> B
style A fill:#f7daf7,stroke:#333,stroke-width:4px
style B fill:#f7daf7,stroke:#333,stroke-width:4px
```

## Medium Level Flowchart

```mermaid
flowchart LR
A@{ shape: lin-cyl, label: "Folder on Mayhem"}
B[S3 Bucket]
C@{ shape: cyl, label: "Digifeeds Database" }
D[Google Drive Folder]
E(Cronjob on Tang)
F(Workflow in K8s)
G(Alma Set)
H(Zephir Bib API)
E --> A
E --> B
F --> B
F -- Adds or Checks <br> status for barcode --> C
F -- Adds Barcode to --> G
F -- Checks if Barcode exists in --> H
F --> D
style A fill:#f7daf7,stroke:#333,stroke-width:4px
style B fill:#f7daf7,stroke:#333,stroke-width:4px
style C fill:#c6ffff,stroke:#333,stroke-width:4px
style D fill:#f7daf7,stroke:#333,stroke-width:4px
```

## Cronjob on Tang Sequence Diagram

```mermaid
sequenceDiagram
Script->>+Input Folder: Gets the list of Volume Folders
loop For every Volume Folder
Script->>Input Folder: Copies Volume Folder to working folder
Script->>Working Folder: verifies file order
alt Missing image
Script->>Script: Log error and move on to next Volume Folder
else All images are there
Script->>Working Folder: Zips the appropriate files in the Volume Folder
end
Script->>+S3 Bucket: Copies zipped file in Working Folder to the S3 Bucket
Script->>+Processed Folder: Copies the zipped and unzipped Volume Folder from the Working Folder to the Processed Folder
Script->>Working Folder: Deletes the zipped and unzipped Volume Folder
Script->>Input Folder: Deletes the Volume Folder
end
Script->>Script: Logs summary of script run
Script->>+Prometheus Pushgateway: Sends metrics
```

0 comments on commit 49fb028

Please sign in to comment.