Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4514 from minvws/release/2.62.0
Browse files Browse the repository at this point in the history
Release/2.62.0
  • Loading branch information
hasan-ozaynaci authored Nov 24, 2022
2 parents 7e81627 + 89d5102 commit 15d5aef
Show file tree
Hide file tree
Showing 86 changed files with 2,377 additions and 3,217 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/infra-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- develop

jobs:
trigger-develop-build:
trigger-old-develop-build:
environment: Development
name: Call Azure Pipeline
runs-on: ubuntu-latest
Expand All @@ -16,3 +16,15 @@ jobs:
azure-devops-project-url: https://dev.azure.com/${{ secrets.AZURE_ORGANIZATION_NAME }}/${{ secrets.AZURE_PROJECT_NAME }}
azure-pipeline-name: ${{ secrets.AZURE_PIPELINE_NAME }}
azure-devops-token: ${{ secrets.AZURE_DEVOPS_TOKEN }}
trigger-develop-build:
environment: Development
name: Call Azure Pipeline
runs-on: ubuntu-latest
steps:
- name: Azure Pipelines Action
uses: Azure/pipelines@v1
with:
azure-devops-project-url: https://dev.azure.com/${{ secrets.VWS_AZURE_ORGANIZATION_NAME }}/${{ secrets.VWS_AZURE_PROJECT_NAME }}
azure-pipeline-name: ${{ secrets.VWS_AZURE_PIPELINE_NAME_DEV }}
azure-devops-token: ${{ secrets.VWS_AZURE_DEVOPS_TOKEN }}

12 changes: 11 additions & 1 deletion .github/workflows/infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

jobs:
build:
old-build:
name: Call Azure Pipeline
runs-on: ubuntu-latest
steps:
Expand All @@ -16,3 +16,13 @@ jobs:
azure-devops-project-url: https://dev.azure.com/${{ secrets.AZURE_ORGANIZATION_NAME }}/${{ secrets.AZURE_PROJECT_NAME }}
azure-pipeline-name: ${{ secrets.AZURE_PIPELINE_NAME }}
azure-devops-token: ${{ secrets.AZURE_DEVOPS_TOKEN }}
build:
name: Call Azure Pipeline
runs-on: ubuntu-latest
steps:
- name: Azure Pipelines Action
uses: Azure/pipelines@v1
with:
azure-devops-project-url: https://dev.azure.com/${{ secrets.VWS_AZURE_ORGANIZATION_NAME }}/${{ secrets.VWS_AZURE_PROJECT_NAME }}
azure-pipeline-name: ${{ secrets.VWS_AZURE_PIPELINE_NAME_PROD }}
azure-devops-token: ${{ secrets.VWS_AZURE_DEVOPS_TOKEN }}
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ noting:
When a component and sub-components share some
local types they are often put in a separate `types.ts` file to avoid
circular dependencies.
- We leverage interfaces to define component property structures rather than types. The name of the interface should follow the name of the component followed by a `Props` suffix. An example would be as below.

```jsx
interface RowProps { ... }

const Row = ({ myProp }: RowProps) => { ... };
```

- Booleans are prefixed with is/has/should etc.
- Data schema properties and locale keys for the CMS are all snake_cased. These could be
viewed as external data sources / APIs.
Expand All @@ -83,12 +91,18 @@ noting:
- We avoid using `boolean && doSomething();` inside the component's JavaScript logic, but do use it inside the component's JSX (`{boolean && ( ... )}`) to conditionally render (parts of) the component.
- We avoid unnecessary short-hand variable names like
`arr` for array or `i` for index or `acc` for a `reduce` accumulator.
- We write Styled Components using its OOTB tagged template literal functions instead of using an additional layer of the Styled System's `css()` method. This method improves readability, makes code easier to understand and sticks to the fundamentals of CSS. This method still allows for usage of Styled System's theme definitions, yet removes a dependency on the actual package.
- We included a `Styled`-prefix when creating Styled Components. This makes them easily distinguishable from other components. Examples would be `StyledInput` or `StyledTile`.
- We avoid using magic numbers in code, be it logic, JSX or styles. Magic numbers are often derived from the theme defined by Styled System and resolve to properties such as spacing and font-sizes, but are unclear on its own. Instead, we import the desired property and refer to the index in that properties array. An example would be `padding: 3` (undesired) vs `padding: space[3]` (desired).
- We do not have a hard preference or requirement for using `git rebase` or `git merge`. Developers should follow what works best for them, but it should be noted that both methods are allowed and actively used in this project.
- We do not have a hard preference or requirement for squashing a multitude of git commits, but it can be useful to apply this when creating a pull request. This action should be used on an 'as-needed basis': if a pull request grows large due to a large amount of commits, it might improve reviewability when multiple commits are squashed. It should be noted that pull requests are squashed when merged, aside from pull requests to `master`. This is to keep a clear view of features and fixes that were merged as part of a release.
- Continuing on the above: we should write a comprehensive commit message when squash merging a pull request. This message should be a (filtered) summary of the commits on the branch.
- We use the following branch names:
- `feature/COR-XXX-descriptive-name-of-ticket-branch` for features
- `bugfix/COR-XXX-descriptive-name-of-ticket-branch` for bug fixes
- `hotfix/COR-XXX-descriptive-name-of-ticket-branch` for hotfixes
- `task/COR-XXX-descriptive-name-of-ticket-branch` for bigger features that are best reviewed in smaller chunks
- We use commit messages according to: https://www.conventionalcommits.org/en/v1.0.0/
- We use commit messages according to: <https://www.conventionalcommits.org/en/v1.0.0/>
- `feat(optional-scope): commit description example` for features
- `fix(optional-scope): commit description example` for fixes
- `chore(optional-scope): commit description example` for cleanups
Expand Down
6 changes: 3 additions & 3 deletions packages/app/schema/gm/__index.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"vaccine_coverage_per_age_group",
"vaccine_coverage_per_age_group_archived",
"vaccine_coverage_per_age_group_archived_20220908",
"booster_coverage"
"booster_coverage_archived_20220904"
],
"properties": {
"last_generated": {
Expand Down Expand Up @@ -62,8 +62,8 @@
"vaccine_coverage_per_age_group_archived_20220908": {
"$ref": "vaccine_coverage_per_age_group_archived_20220908.json"
},
"booster_coverage": {
"$ref": "booster_coverage.json"
"booster_coverage_archived_20220904": {
"$ref": "booster_coverage_archived_20220904.json"
}
},
"$defs": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "gm_booster_coverage",
"title": "gm_booster_coverage_archived_20220904",
"type": "object",
"properties": {
"values": {
Expand All @@ -16,7 +16,7 @@
"additionalProperties": false,
"definitions": {
"value": {
"title": "gm_booster_coverage_value",
"title": "gm_booster_coverage_archived_20220904_value",
"type": "object",
"properties": {
"age_group": {
Expand Down
6 changes: 5 additions & 1 deletion packages/app/schema/gm/sewer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"total_number_of_samples",
"sampled_installation_count",
"total_installation_count",
"date_of_insertion_unix"
"date_of_insertion_unix",
"data_is_outdated"
],
"properties": {
"date_start_unix": {
Expand All @@ -34,6 +35,9 @@
},
"date_of_insertion_unix": {
"type": "integer"
},
"data_is_outdated": {
"type": "boolean"
}
}
}
Expand Down
55 changes: 32 additions & 23 deletions packages/app/schema/gm/vaccine_coverage_per_age_group.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,44 +18,53 @@
"additionalProperties": false,
"type": "object",
"required": [
"age_group_range",
"autumn_2022_vaccinated_percentage",
"fully_vaccinated_percentage",
"booster_shot_percentage",
"autumn_2022_vaccinated_percentage_label",
"fully_vaccinated_percentage_label",
"booster_shot_percentage_label",
"birthyear_range",
"vaccination_type",
"birthyear_range_12_plus",
"birthyear_range_18_plus",
"birthyear_range_60_plus",
"vaccinated_percentage_12_plus",
"vaccinated_percentage_12_plus_label",
"vaccinated_percentage_18_plus",
"vaccinated_percentage_18_plus_label",
"vaccinated_percentage_60_plus",
"vaccinated_percentage_60_plus_label",
"date_of_insertion_unix",
"date_unix"
],
"properties": {
"age_group_range": {
"type": "string",
"enum": ["12+", "18+", "60+"]
},
"autumn_2022_vaccinated_percentage": {
"type": ["integer", "null"]
},
"fully_vaccinated_percentage": {
"type": ["integer", "null"]
"vaccination_type": {
"type": "string"
},
"booster_shot_percentage": {
"type": ["integer", "null"]
"birthyear_range_12_plus": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{4}$|^-[0-9]{4}$|^[0-9]{4}-$"
},
"birthyear_range": {
"birthyear_range_18_plus": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{4}$|^-[0-9]{4}$|^[0-9]{4}-$"
},
"autumn_2022_vaccinated_percentage_label": {
"birthyear_range_60_plus": {
"type": ["string", "null"],
"pattern": "^[0-9]{4}-[0-9]{4}$|^-[0-9]{4}$|^[0-9]{4}-$"
},
"vaccinated_percentage_12_plus": {
"type": ["number", "null"]
},
"vaccinated_percentage_12_plus_label": {
"type": ["string", "null"],
"pattern": "^([><][=][0-9]{1,2})$"
},
"fully_vaccinated_percentage_label": {
"vaccinated_percentage_18_plus": {
"type": ["number", "null"]
},
"vaccinated_percentage_18_plus_label": {
"type": ["string", "null"],
"pattern": "^([><][=][0-9]{1,2})$"
},
"booster_shot_percentage_label": {
"vaccinated_percentage_60_plus": {
"type": ["number", "null"]
},
"vaccinated_percentage_60_plus_label": {
"type": ["string", "null"],
"pattern": "^([><][=][0-9]{1,2})$"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/app/schema/gm_collection/__index.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
},
"vaccine_coverage_per_age_group": {
"type": "array",
"minItems": 1032,
"maxItems": 1032,
"minItems": 688,
"maxItems": 688,
"items": {
"$ref": "vaccine_coverage_per_age_group.json"
}
Expand Down
6 changes: 5 additions & 1 deletion packages/app/schema/gm_collection/sewer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"gmcode",
"average",
"total_installation_count",
"date_of_insertion_unix"
"date_of_insertion_unix",
"data_is_outdated"
],
"properties": {
"date_start_unix": {
Expand All @@ -30,6 +31,9 @@
},
"date_of_insertion_unix": {
"type": "integer"
},
"data_is_outdated": {
"type": "boolean"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
"additionalProperties": false,
"required": [
"gmcode",
"age_group_range",
"birthyear_range",
"autumn_2022_vaccinated_percentage",
"autumn_2022_vaccinated_percentage_label",
"fully_vaccinated_percentage",
"fully_vaccinated_percentage_label",
"booster_shot_percentage",
"booster_shot_percentage_label",
"vaccination_type",
"birthyear_range_12_plus",
"birthyear_range_18_plus",
"birthyear_range_60_plus",
"vaccinated_percentage_12_plus",
"vaccinated_percentage_12_plus_label",
"vaccinated_percentage_18_plus",
"vaccinated_percentage_18_plus_label",
"vaccinated_percentage_60_plus",
"vaccinated_percentage_60_plus_label",
"date_of_insertion_unix",
"date_unix"
],
Expand All @@ -21,32 +23,39 @@
"type": "string",
"pattern": "^GM[0-9]+$"
},
"age_group_range": {
"type": "string",
"enum": ["12+", "18+", "60+"]
},
"autumn_2022_vaccinated_percentage": {
"type": ["integer", "null"]
},
"fully_vaccinated_percentage": {
"type": ["integer", "null"]
"vaccination_type": {
"type": "string"
},
"booster_shot_percentage": {
"type": ["integer", "null"]
"birthyear_range_12_plus": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{4}$|^-[0-9]{4}$|^[0-9]{4}-$"
},
"birthyear_range": {
"birthyear_range_18_plus": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{4}$|^-[0-9]{4}$|^[0-9]{4}-$"
},
"autumn_2022_vaccinated_percentage_label": {
"birthyear_range_60_plus": {
"type": ["string", "null"],
"pattern": "^[0-9]{4}-[0-9]{4}$|^-[0-9]{4}$|^[0-9]{4}-$"
},
"vaccinated_percentage_12_plus": {
"type": ["number", "null"]
},
"vaccinated_percentage_12_plus_label": {
"type": ["string", "null"],
"pattern": "^([><][=][0-9]{1,2})$"
},
"fully_vaccinated_percentage_label": {
"vaccinated_percentage_18_plus": {
"type": ["number", "null"]
},
"vaccinated_percentage_18_plus_label": {
"type": ["string", "null"],
"pattern": "^([><][=][0-9]{1,2})$"
},
"booster_shot_percentage_label": {
"vaccinated_percentage_60_plus": {
"type": ["number", "null"]
},
"vaccinated_percentage_60_plus_label": {
"type": ["string", "null"],
"pattern": "^([><][=][0-9]{1,2})$"
},
Expand Down
12 changes: 6 additions & 6 deletions packages/app/schema/nl/__index.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"required": [
"behavior",
"behavior_annotations",
"booster_shot_administered",
"booster_shot_administered_archived_20220904",
"repeating_shot_administered",
"booster_coverage",
"booster_coverage_archived_20220904",
"code",
"corona_melder_app_download",
"corona_melder_app_warning",
Expand Down Expand Up @@ -80,14 +80,14 @@
"named_difference": {
"$ref": "__named_difference.json"
},
"booster_shot_administered": {
"$ref": "booster_shot_administered.json"
"booster_shot_administered_archived_20220904": {
"$ref": "booster_shot_administered_archived_20220904.json"
},
"repeating_shot_administered": {
"$ref": "repeating_shot_administered.json"
},
"booster_coverage": {
"$ref": "booster_coverage.json"
"booster_coverage_archived_20220904": {
"$ref": "booster_coverage_archived_20220904.json"
},
"doctor": {
"$ref": "doctor.json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "nl_booster_coverage",
"title": "nl_booster_coverage_archived_20220904",
"type": "object",
"properties": {
"values": {
Expand All @@ -16,7 +16,7 @@
"additionalProperties": false,
"definitions": {
"value": {
"title": "nl_booster_coverage_value",
"title": "nl_booster_coverage_archived_20220904_value",
"type": "object",
"properties": {
"age_group": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "nl_booster_shot_administered",
"title": "nl_booster_shot_administered_archived_20220904",
"type": "object",
"properties": {
"values": {
Expand All @@ -19,7 +19,7 @@
"additionalProperties": false,
"definitions": {
"value": {
"title": "nl_booster_shot_administered_value",
"title": "nl_booster_shot_administered_archived_20220904_value",
"type": "object",
"properties": {
"administered_total": {
Expand Down
Loading

0 comments on commit 15d5aef

Please sign in to comment.