Skip to content

Commit 85d044f

Browse files
authored
Merge pull request #32 from unicef/feature/aurora/231563
2 parents 8807778 + 9f1bf6f commit 85d044f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+34866
-1606
lines changed

docs/src/.pages

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ nav:
55
- settings.md
66
- dev_helpers.md
77
- flows
8+
- Interfaces: interfaces.md
9+
- Import Data: import_data

docs/src/import_data/.pages

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
nav:
2+
- XLS: xls.md
3+
- Aurora: aurora.md
4+
- Kobo: kobo.md

docs/src/import_data/aurora.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Import data from Aurora
2+
3+
[Aurora](https://unicef.github.io/hope-aurora/) is the official online registration tool for HOPE. Developed in 2022 for the Ukraine emergency, it quickly became the de-facto standard for online registration in almost all the countries served online by UNICEF.
4+
5+
---
6+
7+
### Prerequisites
8+
9+
1. Before using the system, ensure that the following variables
10+
```
11+
AURORA_API_URL
12+
AURORA_API_TOKEN
13+
```
14+
are defined in the Constance configuration within the [Admin Interface](../interfaces.md#admin-interface):
15+
```
16+
Home › Constance › Config > Remote System Tokens
17+
```
18+
19+
2. Additionally, select the appropriate **checkers** for both **Households** and **Individuals** corresponding to the specific program.
20+
21+
---
22+
23+
### Processing
24+
25+
To begin, in the [Collector Interface](../interfaces.md#collector-interface), navigate to the menu
26+
27+
Program
28+
29+
menu, then press the **[Import Data]** button and select the **[Aurora]** tab. Here, you can configure the import settings:
30+
31+
- **Batch Name** – Specify a custom batch name if needed.
32+
33+
By default, will be used: *<"Batch " + the current datetime>*
34+
35+
- **Registration** – Select the specific Aurora registration to import. If needed, [synchronize](../interfaces.md#synchronize-unified-classifiers) registrations before proceeding.
36+
- **Check Before** – Enable this option to prevent the import if errors are detected.
37+
- **Household Name Column** – Specify which Individual's column contains the Household's name.
38+
39+
By default, this is set to *family_name*.
40+
41+
- **Fail if Alien** – Enable this option to fail the import if any unexpected fields (not defined in the validator) are found.
42+
43+
Once all settings are correctly configured, press **[Import]** to proceed or **[Close]** to cancel. After initiating the import, you will be redirected to the **Jobs** page, where you can track the progress and details of the import job.

docs/src/import_data/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Import data
2+
3+
To begin, in the [Collector Interface](../interfaces.md#collector-interface), navigate to the **Program** page , then press the **[Import Data]** button and select the corresponding tab. Follow the on-screen instructions to proceed.

docs/src/import_data/kobo.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Import data from Kobo

docs/src/import_data/xls.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Import data from XLS

docs/src/index.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
title: Documentation
33
---
44

5-
6-
[<img src="./img/hope_workspace.png" style="margin-left: auto;margin-right: auto;width:300px;display:block"/>](./docs/src/img/hope_workspace.png)
5+
[<img src="./img/hope_workspace.png" style="margin-left: auto;margin-right: auto;width:300px;display:block"/>](./img/hope_workspace.png)
76

87

98
Hope Workspace is part of the [UNICEF HOPE](https://github.com/unicef/hope) ecosystem and manages the data import and cleansing phase of the beneficiary
@@ -13,7 +12,7 @@ management process.
1312

1413
### Implemented Features
1514

16-
- Import data from Kobo / Aurora / XLS (RDI format)
15+
- [Import data](import_data/index.md) from [Kobo](import_data/kobo.md) / [Aurora](import_data/aurora.md) / [XLS](import_data/xls.md) (RDI format)
1716
- Data validation
1817
- Data cleaning and updates
1918
- Push data to HOPE

docs/src/interfaces.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Hope Workspace Interfaces
2+
3+
Hope Workspace provides two interfaces for different roles:
4+
5+
### **Collector Interface**
6+
7+
The primary interface for data collection and processing, offering an enhanced user experience with additional workspace features.
8+
9+
10+
11+
#### Households Page / Individuals Page
12+
13+
Displays a list of households and individuals related to the selected program, with filtering options and the ability to validate the entire program.
14+
15+
When selecting an item, you can view or edit the imported data by columns, make necessary corrections, and validate the data for the chosen entry to detect any potential issues.
16+
17+
---
18+
19+
#### Program page
20+
21+
Provides complete information about the selected program, along with available actions accessible via buttons, including:
22+
23+
??? abstract "[Household Columns]"
24+
##### **[Household Columns]**
25+
Allows the user to configure mandatory columns for the Household Checker, which will be used with Household records.
26+
27+
??? abstract "[Individual Columns]"
28+
##### **[Individual Columns]**
29+
Allows the user to configure mandatory columns for the Individual Checker, which will be used with Individual records.
30+
31+
??? abstract "[Update Records]"
32+
##### **[Update Records]**
33+
Imports column updates from a file for either Household or Individual records.
34+
35+
??? abstract "[Import data]"
36+
##### **[Import data]**
37+
Import Household and Individual data from different sources to ensure seamless integration into the system. This process supports multiple data formats and validation steps to maintain data consistency. For more details, refer to the [Import Data](import_data/index.md).
38+
39+
For convenience, the **Program** page includes a dedicated button, represented by a shield icon, allowing quick access to essential admin functions.
40+
41+
---
42+
43+
#### Batch page
44+
45+
Displays a list of batches. A batch is an entity that contains references to imported data sources for the selected program. The page includes filtering options, allowing users to refine the list. For a selected batch, you can view the imported records.
46+
47+
---
48+
#### Jobs Page
49+
50+
Displays a list of asynchronous jobs with filtering options. For a selected job, you can perform various actions, such as *inspect*, *queue*, *revoke*, or *terminate* it.
51+
52+
---
53+
54+
### **Admin Interface**
55+
A standard Django admin panel used for managing diverse configurations, setting up flex fields, controlling user access, and synchronizing Unified Classifiers with the HOPE main system.
56+
57+
---
58+
59+
## Synchronize Unified Classifiers
60+
61+
**Unified Classifiers** are centralized reference data that categorize key elements essential for process unification, including *offices*, *programs*, and *registrations*.
62+
63+
To synchronize data in the admin interface, press the **[SYNC]** button for the corresponding classifier.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ exclude_docs: |
1818
1919
markdown_extensions:
2020
- admonition
21+
- pymdownx.details
2122
- pymdownx.magiclink
2223
- pymdownx.superfences:
2324
custom_fences:

src/country_workspace/admin/program.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ProgramAdmin(BaseModelAdmin):
2525

2626
@button()
2727
def invalidate_cache(self, request: HttpRequest, pk: str) -> None:
28-
obj: [Program] = Program.objects.select_related("country_office").get(pk=pk)
28+
obj: Program = Program.objects.select_related("country_office").get(pk=pk)
2929
cache_manager.incr_cache_version(program=obj)
3030

3131
@link(change_list=False)
@@ -61,4 +61,4 @@ def sync(self, request: HttpRequest) -> None:
6161
from country_workspace.contrib.hope.sync.office import sync_programs
6262

6363
totals = sync_programs()
64-
self.message_user(request, f"{totals['add']} created - {totals['upd']} updated")
64+
self.message_user(request, f"{totals['add']} created - {totals['upd']} updated - {totals['skip']} skipped")

0 commit comments

Comments
 (0)