-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into sass-upgrade
- Loading branch information
Showing
205 changed files
with
6,877 additions
and
3,362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "14.x" | ||
node-version-file: ".nvmrc" | ||
- uses: google-github-actions/[email protected] | ||
with: | ||
service_account_key: ${{ secrets.GCP_CREDENTIALS }} | ||
|
34 changes: 34 additions & 0 deletions
34
.github/workflows/find-region-mapping-alias-duplicates.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Find region mapping alias duplicates | ||
|
||
# Run when regionMapping.json file or is updated | ||
on: | ||
push: | ||
paths: | ||
- "wwwroot/data/regionMapping.json" | ||
- "buildprocess/find-region-mapping-alias-duplicates.js" | ||
pull_request: | ||
paths: | ||
- "wwwroot/data/regionMapping.json" | ||
- "buildprocess/find-region-mapping-alias-duplicates.js" | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job | ||
find-alias-duplicates: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Check out only 2 files | ||
# Use without cone mode as no git operations are executed past checkout | ||
- uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: | | ||
wwwroot/data/regionMapping.json | ||
buildprocess/find-region-mapping-alias-duplicates.js | ||
sparse-checkout-cone-mode: false | ||
|
||
- name: Check aliases | ||
run: | | ||
node buildprocess/find-region-mapping-alias-duplicates.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v16.20.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# 11. Configuration of search providers | ||
|
||
Date: 2021-01-19 | ||
|
||
## Status | ||
|
||
Proposed | ||
|
||
## Context | ||
|
||
Ticket. | ||
https://github.com/TerriaJS/terriajs/issues/5141. | ||
|
||
### Intro | ||
|
||
The existing approach to the definition of SearchProviders requires the development team's involvement and rebuild of the application, which can be undesired behavior in highly dynamic environments. | ||
It's much better to enable the administrators to maintain the search providers. | ||
|
||
## Proposal | ||
|
||
- SearchProviders could greatly use the benefits of the new model system used for Catalog. | ||
- Create a simple base Mixin (`SearchProviderMixin`) to attach SearchProviders to the Model system and enable easier creation of new search providers. | ||
- Make SearchProviders configurable from `config.json`. | ||
- Provide sensible defaults for everything. | ||
- Typescript everything. | ||
- Make everything translateable (administrator can specify i18next keys for all names) | ||
|
||
## Benefits | ||
|
||
- Much easier to implement new search providers. | ||
- Much easier to update existing search providers, `urls` and `keys`. | ||
- Offer administrators an option to decide wheter they want to load group members using `CatalogSearchProvider`. | ||
|
||
## Consequences | ||
|
||
This is quite a large change and should be thoroughly tested to avoid the possible bugs in the search providers migration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,8 @@ gh api /repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA} -f state=pending -f co | |
|
||
# Install some tools we need from npm | ||
npm install -g https://github.com/terriajs/sync-dependencies | ||
npm install request@^2.83.0 | ||
npm install -g yarn@^1.19.0 | ||
yarn add -W [email protected] | ||
|
||
# Clone and build TerriaMap, using this version of TerriaJS | ||
TERRIAJS_COMMIT_HASH=$(git rev-parse HEAD) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const fs = require("fs"); | ||
const regions = JSON.parse( | ||
fs.readFileSync("wwwroot/data/regionMapping.json") | ||
).regionWmsMap; | ||
|
||
const aliasToType = new Map(); | ||
for (const [regType, regDef] of Object.entries(regions)) { | ||
for (const alias of regDef.aliases ?? []) { | ||
aliasToType.set(alias, [...(aliasToType.get(alias) ?? []), regType]); | ||
} | ||
} | ||
|
||
let issues = 0; | ||
for (const [alias, regTypes] of aliasToType.entries()) { | ||
if (regTypes.length > 1) { | ||
console.error( | ||
`Alias "${alias}" used in multiple types: ${regTypes.join(", ")}` | ||
); | ||
issues++; | ||
} | ||
} | ||
process.exitCode = issues > 0 ? 1 : 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.