Skip to content

Commit

Permalink
feat: import Earth Engine data for population (#1457)
Browse files Browse the repository at this point in the history
Comments on individual files that seem unrelated to the Earth Engine importer:

**WithAuthority**

* lint/prettier

**test-utils**

* lint/prettier

**dhis2-verify-app**

* consistent node version
* --no-verify because build fails due to multiple major versions of `@dhis2/ui` (I chose not to upgrade ui because it would affect all importers and would increase the scope of this PR too much)

**jest.config,** **setupTests**

* mock `@dhis2/analytics` and `@dhis2/maps-gl` because unrelated component tests fail due to missing support
  • Loading branch information
jenniferarnesen authored Sep 7, 2022
1 parent 281ff8a commit 3cbd173
Show file tree
Hide file tree
Showing 44 changed files with 9,500 additions and 7,736 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
Expand All @@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- uses: actions/cache@v2
id: yarn-cache
Expand All @@ -50,7 +50,7 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Build
run: yarn build
run: yarn build --no-verify

- uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- uses: actions/cache@v2
id: yarn-cache
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
#
# - uses: actions/setup-node@v1
# with:
# node-version: 14.x
# node-version: 16.x
#
# - uses: actions/cache@v2
# id: yarn-cache
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:

- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- uses: actions/download-artifact@v2
with:
Expand All @@ -185,7 +185,7 @@ jobs:

- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- name: Publish release to GitHub
run: npx @dhis2/cli-utils release
296 changes: 294 additions & 2 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2022-06-15T14:40:23.418Z\n"
"PO-Revision-Date: 2022-06-15T14:40:23.418Z\n"
"POT-Creation-Date: 2022-09-06T13:23:03.852Z\n"
"PO-Revision-Date: 2022-09-06T13:23:03.852Z\n"

msgid "Something went wrong when loading the current user!"
msgstr "Something went wrong when loading the current user!"
Expand Down Expand Up @@ -730,6 +730,9 @@ msgstr "Data import"
msgid "Event import"
msgstr "Event import"

msgid "Earth Engine import"
msgstr "Earth Engine import"

msgid "Org unit geometry import"
msgstr "Org unit geometry import"

Expand Down Expand Up @@ -800,6 +803,295 @@ msgstr "Import data values from ADX XML, DXF 2 XML, JSON, CSV or PDF files."
msgid "Supported file types: JSON, CSV, XML, ADX and PDF."
msgstr "Supported file types: JSON, CSV, XML, ADX and PDF."

msgid "An error occurred while trying to fetch Earth Engine data"
msgstr "An error occurred while trying to fetch Earth Engine data"

msgid ""
"The Earth Engine data set is too large. Try reducing the number of groups "
"or organisation units"
msgstr ""
"The Earth Engine data set is too large. Try reducing the number of groups "
"or organisation units"

msgid "The organisation units selection is invalid"
msgstr "The organisation units selection is invalid"

msgid ""
"Import WorldPop population data from Google Earth Engine to a DHIS2 data "
"element"
msgstr ""
"Import WorldPop population data from Google Earth Engine to a DHIS2 data "
"element"

msgid "Earth Engine source"
msgstr "Earth Engine source"

msgid "Organisation units"
msgstr "Organisation units"

msgid "Import setup"
msgstr "Import setup"

msgid "Some required fields are missing"
msgstr "Some required fields are missing"

msgid "Preview before import"
msgstr "Preview before import"

msgid "Use associated geometry"
msgstr "Use associated geometry"

msgid "Select associated geometry for selected organisation units"
msgstr "Select associated geometry for selected organisation units"

msgid "Data element"
msgstr "Data element"

msgid "The data element where Earth Engine data will be added"
msgstr "The data element where Earth Engine data will be added"

msgid "Earth Engine data set"
msgstr "Earth Engine data set"

msgid "Select earth engine data set"
msgstr "Select earth engine data set"

msgid "Import groups to category option combinations"
msgstr "Import groups to category option combinations"

msgid ""
"Earth Engine data set \"Population age groups\" has disaggregation groups. "
"Choose the category option combinations to import each group into."
msgstr ""
"Earth Engine data set \"Population age groups\" has disaggregation groups. "
"Choose the category option combinations to import each group into."

msgid "Group name"
msgstr "Group name"

msgid "Group description"
msgstr "Group description"

msgid "Category option combination"
msgstr "Category option combination"

msgid "No match found"
msgstr "No match found"

msgid "Choose category option combo"
msgstr "Choose category option combo"

msgid "Selected: {{commaSeparatedListOfOrganisationUnits}}"
msgstr "Selected: {{commaSeparatedListOfOrganisationUnits}}"

msgid "Nothing selected"
msgstr "Nothing selected"

msgid "Select a level"
msgstr "Select a level"

msgid "Deselect all"
msgstr "Deselect all"

msgid "Organisation unit(s) to import data to"
msgstr "Organisation unit(s) to import data to"

msgid "Period"
msgstr "Period"

msgid "Data from Earth Engine will be imported for this period."
msgstr "Data from Earth Engine will be imported for this period."

msgid "Select period"
msgstr "Select period"

msgid "Loading periods"
msgstr "Loading periods"

msgid "No periods found"
msgstr "No periods found"

msgid "Point org. unit - no value"
msgstr "Point org. unit - no value"

msgid "Org Unit"
msgstr "Org Unit"

msgid "Category option combo"
msgstr "Category option combo"

msgid "Current value"
msgstr "Current value"

msgid "New value"
msgstr "New value"

msgid "Select rows per page"
msgstr "Select rows per page"

msgid "Don't round source values"
msgstr "Don't round source values"

msgid "Round to 0 decimal places"
msgstr "Round to 0 decimal places"

msgid "Round to 1 decimal place"
msgstr "Round to 1 decimal place"

msgid "Round to 2 decimal places"
msgstr "Round to 2 decimal places"

msgid "Round to 3 decimal places"
msgstr "Round to 3 decimal places"

msgid "Round to 4 decimal places"
msgstr "Round to 4 decimal places"

msgid "Round to 5 decimal places"
msgstr "Round to 5 decimal places"

msgid "Round to 6 decimal places"
msgstr "Round to 6 decimal places"

msgid "Value rounding"
msgstr "Value rounding"

msgid "The app could not retrieve required data."
msgstr "The app could not retrieve required data."

msgid "Network error"
msgstr "Network error"

msgid "Cannot get authorization token for Google Earth Engine."
msgstr "Cannot get authorization token for Google Earth Engine."

msgid ""
"Requires a Google Earth Engine account. Check the DHIS2 documentation for "
"more information."
msgstr ""
"Requires a Google Earth Engine account. Check the DHIS2 documentation for "
"more information."

msgid "Population"
msgstr "Population"

msgid "Population age groups"
msgstr "Population age groups"

msgid "Men 0 - 1 years"
msgstr "Men 0 - 1 years"

msgid "Men 1 - 4 years"
msgstr "Men 1 - 4 years"

msgid "Men 5 - 9 years"
msgstr "Men 5 - 9 years"

msgid "Men 10 - 14 years"
msgstr "Men 10 - 14 years"

msgid "Men 15 - 19 years"
msgstr "Men 15 - 19 years"

msgid "Men 20 - 24 years"
msgstr "Men 20 - 24 years"

msgid "Men 25 - 29 years"
msgstr "Men 25 - 29 years"

msgid "Men 30 - 34 years"
msgstr "Men 30 - 34 years"

msgid "Men 35 - 39 years"
msgstr "Men 35 - 39 years"

msgid "Men 40 - 44 years"
msgstr "Men 40 - 44 years"

msgid "Men 45 - 49 years"
msgstr "Men 45 - 49 years"

msgid "Men 50 - 54 years"
msgstr "Men 50 - 54 years"

msgid "Men 55 - 59 years"
msgstr "Men 55 - 59 years"

msgid "Men 60 - 64 years"
msgstr "Men 60 - 64 years"

msgid "Men 65 - 69 years"
msgstr "Men 65 - 69 years"

msgid "Men 70 - 74 years"
msgstr "Men 70 - 74 years"

msgid "Men 75 - 79 years"
msgstr "Men 75 - 79 years"

msgid "Men 80 years and above"
msgstr "Men 80 years and above"

msgid "Women 0 - 1 years"
msgstr "Women 0 - 1 years"

msgid "Women 1 - 4 years"
msgstr "Women 1 - 4 years"

msgid "Women 5 - 9 years"
msgstr "Women 5 - 9 years"

msgid "Women 10 - 14 years"
msgstr "Women 10 - 14 years"

msgid "Women 15 - 19 years"
msgstr "Women 15 - 19 years"

msgid "Women 20 - 24 years"
msgstr "Women 20 - 24 years"

msgid "Women 25 - 29 years"
msgstr "Women 25 - 29 years"

msgid "Women 30 - 34 years"
msgstr "Women 30 - 34 years"

msgid "Women 35 - 39 years"
msgstr "Women 35 - 39 years"

msgid "Women 40 - 44 years"
msgstr "Women 40 - 44 years"

msgid "Women 45 - 49 years"
msgstr "Women 45 - 49 years"

msgid "Women 50 - 54 years"
msgstr "Women 50 - 54 years"

msgid "Women 55 - 59 years"
msgstr "Women 55 - 59 years"

msgid "Women 60 - 64 years"
msgstr "Women 60 - 64 years"

msgid "Women 65 - 69 years"
msgstr "Women 65 - 69 years"

msgid "Women 70 - 74 years"
msgstr "Women 70 - 74 years"

msgid "Women 75 - 79 years"
msgstr "Women 75 - 79 years"

msgid "Women 80 years and above"
msgstr "Women 80 years and above"

msgid "No organisation units have been selected"
msgstr "No organisation units have been selected"

msgid "No geofeatures found for selected organisation units"
msgstr "No geofeatures found for selected organisation units"

msgid "Export event data for programs, stages and tracked entities in DXF 2 format."
msgstr "Export event data for programs, stages and tracked entities in DXF 2 format."

Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ module.exports = {
moduleNameMapper: {
'\\.css$': 'identity-obj-proxy',
},
setupFilesAfterEnv: ['./src/setupTests.js'],
}
Loading

0 comments on commit 3cbd173

Please sign in to comment.