Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: simplify exclude list, latest muffet, update redirects #1733

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/scripts/2.10.6.muffet
Binary file not shown.
73 changes: 44 additions & 29 deletions .github/scripts/muffet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,56 @@
# - install go - https://golang.org/doc/install
# - install muffet - https://github.com/raviqqe/muffet
# - make sure muffet is in your PATH
# - run from root of this repo: ./.github/scripts/muffet.sh
# - cd ti: ./.github/scripts/
# - run script: ./muffet.sh
#
# If we have errors from this script being too aggressive (see how large downloads on
# download.docker.com are excluded below) you can add additional sites as needed. Please
# use extremely granular URLs so as not to exclude more than we need to.

muffet http://localhost:1313 \
# when upgrading muffet, upload new binary here and rename so version is explicit in filename
./2.10.6.muffet http://localhost:1313 \
--dns-resolver 9.9.9.9:9953 \
--buffer-size 50000 \
--timeout 35 \
--concurrency 2 \
--timeout 255 \
--rate-limit 8 \
--max-connections-per-host 8 \
--ignore-fragments \
--exclude ".*demo\.app\.medicmobile\.org.*" \
--exclude ".*www\.npmjs\.com/org/medic/team/developers" \
--exclude "https://github\.com/medic/cht-docs/issues/new.*" \
--exclude "https://github\.com/medic/cht-core/issues/new.*" \
--exclude "https://github\.com/medic/cht-docs/commit.*" \
--exclude "https://github\.com/medic/cht-core/commit.*" \
--exclude "https://github\.com/medic/cht-docs/edit/main/.*" \
--exclude "https://github.com/medic/medic-infrastructure*" \
--exclude "http[s]*://localhost[8443|5984]*" \
--exclude "http[s]*://.*my.local-ip.co*" \
--exclude "http[s]*://cht\.domain\.com.*" \
--exclude "http[s]*://127\.0\.0*" \
--exclude "https://docs.google.com/spreadsheets/d/12345ABCDEF/.*" \
--exclude "https://docs.google.com/document/d/14AuJ7SerLuOPESBjQlJqpBtzwSAoVf5ykTT7fjyJBT0/*" \
--exclude "https://tools.google.com.*" \
--exclude "http[s]*://.*docs.couchdb.org.*" \
--exclude "http[s]*://.*oppiamobile.readthedocs.io.*" \
--exclude "http[s]*://.*africastalking.com*" \
--exclude "http://www.hl7.org*" \
--exclude "https://garticphone.com/" \
--exclude "http[s]*://.*borgbackup.readthedocs.io.*" \
--exclude "https://www.tableau.com" \
--exclude "https://doi.org/10.1080/02681102.2019.1667289" \
--exclude "https://journals.sagepub.com/doi/full/10.1177/20552076231194924" \
--header="User-Agent: Muffet (github.com/raviqqe/muffet) on behalf of CHT Docs (docs.communityhealthtoolkit.org)" \
--exclude "http[s]*://.*africastalking.com.*" \
--exclude "http[s]*://github.com/medic/.*/issues/new.*" \
--exclude "http[s]*://github.com/medic/.*/commit.*" \
--exclude "http[s]*://github.com/medic/cht-docs/edit/main.*" \
--exclude "http[s]*://github.com/medic/medic-infrastructure.*" \
--exclude "http[s]*://github.com/moh-kenya/config-echis-2.0.*" \
--exclude "http[s]*://.*google.com/.*12345ABCDEF.*" \
--exclude "http[s]*://.*google.com/.*14AuJ7SerLuOPESBjQlJqpBtzwSAoVf5ykTT7fjyJBT0.*" \
--exclude "http[s]*://.*google.com/.*1pPk6FAuLUPKUYnCRgruPk6Lh5IeWzu6IPD1KTFOi6YQ.*" \
--exclude "http[s]*://.*google.com/.*1uXSqntenhxlGOeFtP7ScLcFmoid3kagPYn-EDoodP3s.*" \
--exclude "http[s]*://.*google.com/.*0Ao9l2yegOFn7dEJRTEw1Z3RmZm0wTEo4Nk92NjVocnc.*" \
--exclude "http[s]*://.*google.com/.*1yUenFP-5deQ0I9c-OYDTpbKYrkl3juv9djXoLLPoQ7Y.*" \
--exclude "http[s]*://.*google.com/.*1YPXoba9gVmD7SP-X88PpJIsIVGvY86_G.*" \
--exclude "http[s]*://tools.google.com.*" \
--exclude "http[s]*://www.tableau.com.*" \
--exclude "http[s]*://doi.org/10.1080/02681102.2019.1667289" \
--exclude "http[s]*://journals.sagepub.com/doi/full/10.1177/20552076231194924" \
--exclude "http[s]*://garticphone.com.*" \
--exclude "http[s]*://www.hl7.org.*" \
--exclude "http[s]*://build.fhir.org.*" \
--exclude "http[s]*://www.apkmirror.com/apk/google-inc.*" \
--exclude "http[s]*://www.pluralsight.com/courses/kubernetes-packaging-applications-helm.*" \
--exclude "http[s]*://www.pluralsight.com/paths/using-kubernetes-as-a-developer.*" \
--exclude "http[s]*://www.intellisoftkenya.com.*" \
--exclude "http[s]*://demo.app.medicmobile.org.*" \
--exclude "http[s]*://www.npmjs.com/org/medic/team/developers" \
--exclude "http[s]*://docs.couchdb.org.*" \
--exclude "http[s]*://oppiamobile.readthedocs.io*." \
--exclude "http[s]*://borgbackup.readthedocs.io.*" \
--exclude "http[s]*://.*udemy.com.*" \
--exclude "http[s]*://.*udacity.com.*" \
--exclude "https://drive.google.com/file/d/1YPXoba9gVmD7SP-X88PpJIsIVGvY86_G.*"
--exclude "http[s]*://.*my.local-ip.co.*" \
--exclude "http[s]*://.*local-ip.medicmobile.org.*" \
--exclude "http[s]*://cht.domain.com.*" \
--exclude "http[s]*://localhost:[3000|8443|5984]+" \
--exclude "http[s]*://localhost$" \
--exclude "http[s]*://127.*"
36 changes: 0 additions & 36 deletions .github/scripts/set_dns.sh

This file was deleted.

14 changes: 4 additions & 10 deletions .github/workflows/cron-check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,18 @@ jobs:
- name: Install npm modules for Hugo
run: npm install

- name: Install Muffet
run: |
GO111MODULE=on go install github.com/raviqqe/[email protected]
asdf reshim golang

# run in background so CI doesn't hang waiting for "ctrl + c". Sleep ensures server is ready in next step
- name: Serve Hugo site
run: |
hugo server&
sleep 30

- name: Set DNS to 9.9.9.9
shell: bash
run: ./.github/scripts/set_dns.sh

- name: Run Muffet link checker
shell: bash
run: ./.github/scripts/muffet.sh
run: |
cd .github/scripts/
chmod +x *muffet*
muffet.sh

- name: Report errors to Slack, if any
if: ${{ github.ref == 'refs/heads/main' && failure() }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ As of v3.6.0, SMS messages can be sent and received using the [Africa's Talking]

First generate a long unique key to use as the `cht-api-key`.

Log on to the [Africa's Talking Dashboard](https://account.africastalking.com) and configure your callback URLs as follows.
Log on to the [Africa's Talking Dashboard](https://account.africastalking.com/auth/login) and configure your callback URLs as follows.

- Delivery Reports: `https://<hostname>/api/v1/sms/africastalking/delivery-reports?key=<cht-api-key>`
- Incoming Messages: `https://<hostname>/api/v1/sms/africastalking/incoming-messages?key=<cht-api-key>`
Expand Down
2 changes: 1 addition & 1 deletion content/en/building/tutorials/application-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const harness = new TestRunner({ verbose: true });
```

Other useful options are:
1. `{ headless: false }` - Passed to [puppeteer](https://developers.google.com/web/tools/puppeteer/get-started#default_runtime_settings), launches browser with GUI. Helpful to see how the form is getting filled.
1. `{ headless: false }` - Passed to [puppeteer](https://pptr.dev/guides/getting-started), launches browser with GUI. Helpful to see how the form is getting filled.
2. `{ harnessDataPath: 'harness.clinic.json'}`: Specify different harness configuration

You can find more harness options and examples [here](https://docs.communityhealthtoolkit.org/cht-conf-test-harness/Harness.html).
Expand Down
2 changes: 1 addition & 1 deletion content/en/contribute/code/style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ a core value of our community. Consider the points of [the opposition][], but
be a traditionalist when it comes to abusing error correction mechanisms for
cheap syntactic pleasures.

[the opposition]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding
[the opposition]: [the opposition]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding
[hnsemicolons]: http://news.ycombinator.com/item?id=1547647

### Use single quotes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: >
How to keep track of product research
---

The Medic Product team uses [baserow.io](http://baserow.io) as a place to keep product research. Baserow is very similar to [airtable.com](http://airtable.com), [getgrist.com](http://getgrist.com), and Google Sheets.
The Medic Product team uses [baserow.io](http://baserow.io) as a place to keep product research. Baserow is very similar to [airtable.com](https://www.airtable.com/), [getgrist.com](http://getgrist.com), and Google Sheets.

The _UX Research Repository_ is based off of concepts from WeWork’s [Polaris](https://tsharon.medium.com/democratizing-ux-670b95fbc07f) project. You can see an example of the Polaris (which uses Airtable) [here](https://www.airtable.com/universe/expShuhNMi0Oc0xpb/polaris-ux-nuggets).

Expand Down
2 changes: 1 addition & 1 deletion content/en/contribute/technical-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ There is a Slack channel in the Medic Workspace called *#cht-dev-workshop* for C
| **CHT Local Environment and Docs** | [Set up your local development environment]({{% ref "dev-environment" %}}) <br> [Go through CHT Documentation]({{% ref "/" %}}) <br> [Get familiar with the Development Workflow]({{% ref "/contribute/code/workflow" %}}) <br>[Architecture of CHT Instances]({{% ref "architecture" %}}) <br> [CHT Academy - Introduction to Building CHT Application](https://academy.communityhealthtoolkit.org/courses/course-v1:cht-academy+201+2022/about) <br> [Where to ask questions about the CHT?](https://forum.communityhealthtoolkit.org/) |
| **JavaScript** | [Eloquent JavaScript](https://eloquentjavascript.net/) <br> [Asynchronous JavaScript Requests](https://www.udacity.com/course/asynchronous-javascript-requests--ud109) <br> [You Don't Know JS](https://github.com/getify/You-Dont-Know-JS) |
| **TypeScript** | [TypeScript Documentation](https://www.typescriptlang.org/docs/) |
| **Docker** | [Containers and Docker Mega Thread](https://twitter.com/iximiuz/status/1423984739514454033?s=21) <br> [Docker mastery course](https://www.udemy.com/course/docker-mastery/) <br> [Learn Docker in a month of lunches](https://diamol.net/) <br> [The Ultimate Docker course](https://codewithmosh.com/p/the-ultimate-docker-course) |
| **Docker** | [Containers and Docker Mega Thread](https://unrollnow.com/status/1423984739514454033) <br> [Docker mastery course](https://www.udemy.com/course/docker-mastery/) <br> [Learn Docker in a month of lunches](https://diamol.net/) <br> [The Ultimate Docker course](https://codewithmosh.com/p/the-ultimate-docker-course) |
| **Kubernetes** | [Kubernetes documentation](https://kubernetes.io/docs/home/) <br> [Using Kubernetes as a Developer](https://www.pluralsight.com/paths/using-kubernetes-as-a-developer) <br> [Packaging Applications with Helm for Kubernetes](https://www.pluralsight.com/courses/kubernetes-packaging-applications-helm) |
| **CouchDB and PouchDB** | [CouchDB introduction user guide docs](https://docs.couchdb.org/en/stable/intro/index.html) <br> [Understanding CouchDB 3](https://www.udemy.com/course/understanding-couchdb/) <br> [Introduction to PouchDB](https://pouchdb.com/guides/) |
| **NodeJS and NPM** | [The Complete Node.JS developer course](https://www.udemy.com/course/the-complete-nodejs-developer-course-2/) <br> [Understanding NPM - Node.js Package Manager](https://www.udemy.com/course/understanding-npm/)|
Expand Down
4 changes: 2 additions & 2 deletions content/en/core/releases/0.4.15-and-earlier.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ _July 21, 2016_

- Fixed bug in reporting rates for weekly time unit. #2429
- Log warnings in sentinel when ID collisions happen. #1898
- Support integration with [medic-gateway](https://github.com/medic/medic-gateway) for sending and receiving SMS medic-api#69
- Support integration with [medic-gateway](https://github.com/medic/cht-gateway) for sending and receiving SMS medic-api#69

## 0.4.11

Expand Down Expand Up @@ -114,7 +114,7 @@ _May 28, 2015_
schedules. #973

- Initial support for messages, records and forms API. See
https://github.com/medic/medic-api/blob/master/API_v1.md
https://github.com/medic/medic-api/blob/963e262f7f29623b3c264c9d85ec537bbcb91cdb/API_v1.md

## 0.4.4

Expand Down
4 changes: 2 additions & 2 deletions content/en/core/releases/2.11.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ toc_hide: true

## Migration notes

- [#3230](https://github.com/medic/medic-webapp/issues/3230) changes patient ID generation so it automatically increases the length as needed, up to 13 digits. If you are validating incoming patient_ids in Sentinel, be sure to remove or correct any length restrictions, e.g. `^[0-9]{5}$` would become `^[0-9]{5,13}$`.
- [#3166](https://github.com/medic/medic-webapp/issues/3166) adds a new transition that adds patient_ids to every created person: `generate_patient_id_on_people`. Enable this transition if you want to send SMS about patients that may be created through the webapp.
- [#3230](https://github.com/medic/cht-core/issues/3230) changes patient ID generation so it automatically increases the length as needed, up to 13 digits. If you are validating incoming patient_ids in Sentinel, be sure to remove or correct any length restrictions, e.g. `^[0-9]{5}$` would become `^[0-9]{5,13}$`.
- [#3166](https://github.com/medic/cht-core/issues/3166) adds a new transition that adds patient_ids to every created person: `generate_patient_id_on_people`. Enable this transition if you want to send SMS about patients that may be created through the webapp.

## Features

Expand Down
Loading