Skip to content

Commit

Permalink
Merge pull request #195 from dhis2/development
Browse files Browse the repository at this point in the history
chore(release): merge development to master
  • Loading branch information
Birkbjo authored Sep 22, 2022
2 parents ccded23 + d6a0776 commit e0d3ea0
Show file tree
Hide file tree
Showing 463 changed files with 260,234 additions and 3,270 deletions.
3 changes: 3 additions & 0 deletions .cypress-cucumber-preprocessorrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"nonGlobalStepDefinitions": true
}
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { config } = require('@dhis2/cli-style')

module.exports = {
extends: [config.eslintReact],
extends: [config.eslintReact, 'plugin:cypress/recommended'],
}
4 changes: 0 additions & 4 deletions .github/semantic.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/dhis2-preview-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x

- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x

- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
Expand All @@ -51,7 +51,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x

- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
Expand All @@ -70,7 +70,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x

- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:

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

- name: End-to-End tests
uses: cypress-io/github-action@v2
Expand All @@ -114,7 +114,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_dhis2BaseUrl: https://debug.dhis2.org/dev
CYPRESS_dhis2ApiVersion: 37
CYPRESS_dhis2ApiVersion: 40
CYPRESS_networkMode: stub

release:
Expand All @@ -128,7 +128,7 @@ jobs:

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

- uses: actions/download-artifact@v2
with:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/dhis2-verify-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'dhis2: verify (commits)'

on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']

jobs:
lint-pr-title:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
- id: commitlint
run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)")
- uses: JulienKode/[email protected]
with:
configuration-path: ${{ steps.commitlint.outputs.config_path }}

lint-commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
- id: commitlint
run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)")
- uses: wagoid/commitlint-github-action@v4
with:
configFile: ${{ steps.commitlint.outputs.config_path }}
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
node_modules
.d2
src/locales
build
build
cypress.env.json
.vscode
.env.development.local
.env.test.local
.env.production.local
16 changes: 12 additions & 4 deletions .ls-lint.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
ls:
./**/{src,cypress,lib}:
.dir: kebab-case

./**/node_modules:
.dir: regex:.*
.css: kebab-case
.module.css: kebab-case
.feature: kebab-case
.js: kebab-case
.stories.js: kebab-case
.stories.e2e.js: kebab-case
.styles.js: kebab-case
.test.js: kebab-case
.jsx: kebab-case
.ts: kebab-case
.tsx: kebab-case
.d.ts: kebab-case

ignore:
- node_modules
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cypress/fixtures/network
src/locales
11 changes: 11 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[main]
host = https://www.transifex.com
lang_map = fa_AF: prs, uz@Cyrl: uz, uz@Latn: uz_Latn

[o:hisp-uio:p:app-data-entry:r:en-pot]
file_filter = i18n/<lang>.po
source_file = i18n/en.pot
source_lang = en
type = PO
minimum_perc = 0

47 changes: 9 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,16 @@
This project was bootstrapped with [DHIS2 Application Platform](https://github.com/dhis2/app-platform).
# Data entry app

## Available Scripts
[Live demo development branch](https://dhis2-data-entry.netlify.app/#/)

In the project directory, you can run:
## Global state

### `yarn start`
We're using use-query-params to store part of the app's state in the url query
parameters. This allows users to bookmark and share specific states of the app.

Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
## Model overview

The page will reload if you make edits.<br />
You will also see any lint errors in the console.
The category model can be fairly confusing, so we've created a few diagrams to help explain and get an overview of how DHIS2 models are used in the app.

### `yarn test`
[Models used in form](./docs/category-combo-diagram.png)

Launches the test runner and runs all available tests found in `/src`.<br />

See the section about [running tests](https://platform.dhis2.nu/#/scripts/test) for more information.

### `yarn build`

Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.<br />
A deployable `.zip` file can be found in `build/bundle`!

See the section about [building](https://platform.dhis2.nu/#/scripts/build) for more information.

### `yarn deploy`

Deploys the built app in the `build` folder to a running DHIS2 instance.<br />
This command will prompt you to enter a server URL as well as the username and password of a DHIS2 user with the App Management authority.<br/>
You must run `yarn build` before running `yarn deploy`.<br />

See the section about [deploying](https://platform.dhis2.nu/#/scripts/deploy) for more information.

## Learn More

You can learn more about the platform in the [DHIS2 Application Platform Documentation](https://platform.dhis2.nu/).

You can learn more about the runtime in the [DHIS2 Application Runtime Documentation](https://runtime.dhis2.nu/).

To learn React, check out the [React documentation](https://reactjs.org/).
[Attribute category combo diagram](./docs/attribute-category-combo-diagram.png)
13 changes: 13 additions & 0 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"baseUrl": "http://localhost:3000",
"video": false,
"projectId": "s6p5xs",
"env": {
"dhis2DataTestPrefix": "dhis2-dataentry",
"networkMode": "live",
"dhis2ApiVersion": "40"
},
"experimentalInteractiveRunEvents": true,
"testFiles": ["**/*.feature.js", "**/*.feature"],
"defaultCommandTimeout": 30000
}
Loading

0 comments on commit e0d3ea0

Please sign in to comment.