Skip to content

Commit

Permalink
Merge pull request #873 from TIP-Global-Health/develop
Browse files Browse the repository at this point in the history
Developments starting September 14, 2023
  • Loading branch information
anvmn authored Nov 16, 2023
2 parents e717be2 + 3c2eded commit 2f80733
Show file tree
Hide file tree
Showing 541 changed files with 70,830 additions and 11,001 deletions.
7 changes: 7 additions & 0 deletions .ddev/commands/web/elm:svg2elm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

## Description: Convert SVG to Elm.
## Usage: elm:svg2elm
## Example: "ddev elm:svg2elm"

cd ../elm && ./svg2elm.sh
7 changes: 7 additions & 0 deletions .ddev/commands/web/elm:watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

## Description: Run Elm compile, watch for changes.
## Usage: elm:watch
## Example: "ddev elm:watch"

cd ../elm && ./elm-watch.sh
8 changes: 6 additions & 2 deletions .ddev/commands/web/gulp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ then
exit 1
fi

if [[ -z "${EHEZA_SITE}" ]]; then
echo "Please specify EHEZA_SITE in your DDEV local config, as for deployment, we must know for which site it's being performed."
exit 1
fi

if [ ! -d ../../eheza-infra ]; then
echo "Cloning eheza-infra repo..."
git clone "${EHEZA_INFRA_REPO_REMOTE}" ../../eheza-infra
Expand All @@ -25,8 +30,7 @@ then
cd -
fi

cp ../../eheza-infra/elm/Config.Deploy.elm ${CLIENT_PATH}/src/elm/

cp ../../eheza-infra/elm/${EHEZA_SITE}/Config.Deploy.elm ${CLIENT_PATH}/src/elm/
fi

cd ../../client && gulp $@
8 changes: 8 additions & 0 deletions .ddev/config.local.yaml.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
web_environment:
- EHEZA_SITE=rwanda
# - [email protected]:organization/project.git
# - GITHUB_USERNAME=
# - GITHUB_ACCESS_TOKEN=
# - PANTHEON_NAME=
hooks:
post-import-db:
# Sanitize email addresses
Expand All @@ -26,6 +30,9 @@ hooks:
- exec-host: ddev nvm alias default 10.16.0
- exec-host: ddev client-install
- exec: "cd .. && chmod +x ./scripts/build && ./scripts/build"
- exec: "cd .. && cp hedley/modules/custom/hedley_migrate/csv/health_center_$EHEZA_SITE.csv hedley/modules/custom/hedley_migrate/csv/health_center.csv"
- exec: "cd .. && cp hedley/modules/custom/hedley_migrate/csv/person_$EHEZA_SITE.csv hedley/modules/custom/hedley_migrate/csv/person.csv"
- exec: "cd .. && cp hedley/modules/custom/hedley_migrate/csv/village_$EHEZA_SITE.csv hedley/modules/custom/hedley_migrate/csv/village.csv"
# If DDEV creates server/www/, it is owned by root for some reasons,
# so we have a placeholder .gitignore there, that ignores everything, but
# the gitignore, during the install process, it gets altered, so we restore
Expand All @@ -36,6 +43,7 @@ hooks:
- exec: drush fra -y
- exec: composer update --lock -d sites/default/files/composer
- exec: composer install -d sites/default/files/composer
- exec: drush vset hedley_general_site_name $EHEZA_SITE
# Run migration
- exec: drush en -y hedley_migrate
- exec: drush en -y migrate migrate_ui migrate_extras
Expand Down
5 changes: 3 additions & 2 deletions .ddev/web-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG BASE_IMAGE
FROM $BASE_IMAGE

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confold" --no-install-recommends --no-install-suggests python2.7 build-essential
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confold" --no-install-recommends --no-install-suggests inotify-tools python2.7 build-essential
RUN update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
# Elm - directly downloading the binary.
RUN wget https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz
Expand All @@ -13,7 +13,8 @@ RUN npm install -g gulp
# For Elm Unit tests
RUN npm -g config set user root
RUN npm install -g [email protected]

# Install svg2elm.
RUN npm install -g svg2elm
RUN if [ "$(uname -m)" = "aarch64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confold" --no-install-recommends --no-install-suggests autoconf autotools-dev automake; \
fi
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ deployment-robot-key
############
vendor

package-lock.json
travis-cache

/eheza-infra

#Elm
server/elm/elm-stuff
server/elm/node_modules
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
TIP’s E-Heza Data Solutions is a digital app designed by and for the frontline health worker that can be used on a smartphone or tablet.
E-Heza captures essential data at the point of care to improve the health of mother and child by providing frontline health workers with immediate insights to help personalize information and advice, and help the mother track the well-being of her child.

E-Heza has been added to the Digital Public Goods Alliance [DPG Registry](http://digitalpublicgoods.net/registry/). The goal of the DPGA and its registry is to promote digital public goods in order to create a more equitable world. Being recognised as a DPG increases the visibility, support for, and prominence of open projects that have the potential to tackle global challenges. To become a digital public good, all projects are required to meet the [DPG Standard](http://digitalpublicgoods.net/standard/) to ensure that projects truly encapsulate open source principles.
E-Heza has been added to the Digital Public Goods Alliance [DPG Registry](http://digitalpublicgoods.net/registry/). The goal of the DPGA and its registry is to promote digital public goods in order to create a more equitable world. Being recognised as a DPG increases the visibility, support for, and prominence of open projects that have the potential to tackle global challenges. To become a digital public good, all projects are required to meet the [DPG Standard](http://digitalpublicgoods.net/standard/) to ensure that projects truly encapsulate open source principles.

## Technical stack
- [Elm](https://elm-lang.org/) for the mobile frontend
Expand Down Expand Up @@ -39,7 +39,7 @@ Primary ports:

1. https://ddev.readthedocs.io/en/latest/#installation . Minimum version: [v1.21.1](https://github.com/drud/ddev/releases/tag/v1.21.1)
1. On Mac, for the sake of Elm compilation, please make sure that the VM/container has at least 16GB of available RAM, otherwise `elm make` might get killed by the OOM killer.
1. cp .ddev/config.local.yaml.example .ddev/config.local.yaml
1. `cp .ddev/config.local.yaml.example .ddev/config.local.yaml`. Note that by default, installation is performed for Rwanda site. If you wish to install for Burundi site, set `EHEZA_SITE=burundi` at `.ddev/local.config.yaml`.
1. ddev restart
1. `cp client/src/elm/LocalConfig.Example.elm client/src/elm/LocalConfig.elm`
1. `ddev gulp`
Expand Down Expand Up @@ -117,8 +117,9 @@ infrastructure-related data for Elm. This file is gitignored, and it is
used during Elm compilation, before the final artifact is pushed to Pantheon.
Put it in a private repository, and link that repository using
`EHEZA_INFRA_REPO_REMOTE`, defined in `.ddev/config.local.yaml.example`.
Also, set `EHEZA_SITE`, to indicate the site installation is done for.
The repository does not have a strict structure, but the file should be
present at the `elm/Config.Deploy.elm` path.
present at the `elm/[EHEZA_SITE]/Config.Deploy.elm` path.

#### Steps

Expand Down Expand Up @@ -163,4 +164,3 @@ Inside Jenkins, these scripts can be "Freestyle project"s with
If that's a no-go, for the advancedqueue, `supervisord` is a better choice,
as that queue needs to be processed all the time. For the reporting, a simple
cron job might be sufficient.

2 changes: 1 addition & 1 deletion ci-scripts/test_coder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ code_review () {
}

# Review custom modules, run each folder separately to avoid memory limits.
IGNORED_PATTERNS="*.features.inc,*.features.*.inc,*.field_group.inc,*.strongarm.inc,*.ds.inc,*.context.inc,*.pages.inc,*.pages_default.inc,*.views_default.inc,*.file_default_displays.inc,*.facetapi_defaults.inc,*.panels_default.inc"
IGNORED_PATTERNS="*.features.inc,*.features.*.inc,*.field_group.inc,*.strongarm.inc,*.ds.inc,*.context.inc,*.pages.inc,*.pages_default.inc,*.views_default.inc,*.file_default_displays.inc,*.facetapi_defaults.inc,*.panels_default.inc,elm-main.js"

echo
echo "${LBLUE}> Sniffing Modules following '${REVIEW_STANDARD}' standard. ${RESTORE}"
Expand Down
2 changes: 1 addition & 1 deletion client/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"copy-button": "sudodoki/copy-button#2.0.0",
"dropzone": "5.7.0",
"dexie": "2.0.4",
"dexie": "3.2.4",
"exif-js": "2.3.0",
"semantic": "semantic-ui#2.2.1"
}
Expand Down
2 changes: 1 addition & 1 deletion client/elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"elm/url": "1.0.0",
"elm-community/json-extra": "4.0.0",
"elm-community/list-extra": "8.1.0",
"elm-community/maybe-extra": "5.0.0",
"elm-community/maybe-extra": "5.3.0",
"elm-community/string-extra": "4.0.1",
"elm-community/typed-svg": "5.1.0",
"elm-explorations/test": "1.2.1",
Expand Down
Loading

0 comments on commit 2f80733

Please sign in to comment.