-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from EyeSeeTea/development
Development
- Loading branch information
Showing
118 changed files
with
10,378 additions
and
8,957 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
SKIP_PREFLIGHT_CHECK=true | ||
PORT=8081 | ||
BROWSER=false | ||
PORT=8081 | ||
SKIP_PREFLIGHT_CHECK=true | ||
REACT_APP_DHIS2_BASE_URL=https://dev.eyeseetea.com/play | ||
|
||
CYPRESS_DHIS2_AUTH='admin:district' | ||
CYPRESS_EXTERNAL_API="https://dev.eyeseetea.com/play" | ||
CYPRESS_ROOT_URL=http://localhost:8081 |
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,6 @@ | ||
name: 'Validate GEE API' | ||
description: 'Validate Google Earth Engine API response' | ||
author: 'EyeSeeTea' | ||
runs: | ||
using: 'node12' | ||
main: 'index.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import * as core from "@actions/core"; | ||
import { validateApi } from "../../../src/scripts/validate-gee-api"; | ||
|
||
async function run(): Promise<void> { | ||
try { | ||
core.debug("Checking Google Earth Engine API"); | ||
|
||
const errors = await validateApi(); | ||
|
||
if (errors.length > 0) { | ||
errors.forEach(({ id, url, error }) => | ||
core.error([`Data Set: ${id}`, `Url: ${url}`, error, ""].join("\n")) | ||
); | ||
|
||
core.setFailed(`Found ${errors.length} errors`); | ||
} else { | ||
core.setOutput("time", new Date().toTimeString()); | ||
} | ||
} catch (error: any) { | ||
core.setFailed(error.message); | ||
} | ||
} | ||
|
||
run(); |
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 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2015", | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"jsx": "preserve", | ||
"noUnusedParameters": false, | ||
"noUnusedLocals": false, | ||
"experimentalDecorators": true, | ||
"lib": ["dom", "dom.iterable", "esnext"] | ||
}, | ||
"include": ["."] | ||
} |
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,41 @@ | ||
name: Validate GEE API | ||
on: | ||
# Manual action | ||
workflow_dispatch: | ||
# Every day at 8:00 AM | ||
schedule: | ||
- cron: '0 8 * * *' | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "12.x" | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Cache yarn dependencies | ||
uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Installing Dependencies | ||
run: yarn install --frozen-lockfile --silent | ||
|
||
- name: Build action | ||
run: yarn build-validate-gee-api-action | ||
|
||
- name: Validate API | ||
uses: ./.github/actions/validate-gee-api |
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,5 @@ | ||
build | ||
node_modules | ||
*.min.js | ||
*.min.css | ||
public/ee_api_js.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
/** @format */ | ||
|
||
module.exports = { | ||
printWidth: 100, | ||
printWidth: 120, | ||
tabWidth: 4, | ||
useTabs: false, | ||
semi: true, | ||
singleQuote: false, | ||
trailingComma: 'es5', | ||
trailingComma: "es5", | ||
bracketSpacing: true, | ||
jsxBracketSameLine: false, | ||
arrowParens: 'avoid', | ||
arrowParens: "avoid", | ||
rangeStart: 0, | ||
rangeEnd: Infinity, | ||
proseWrap: 'preserve', | ||
proseWrap: "preserve", | ||
requirePragma: false, | ||
insertPragma: false, | ||
} | ||
}; |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = process.env.CYPRESS_ENV ? {} : { | ||
"presets": ["babel-preset-react-app"] | ||
} | ||
module.exports = { | ||
presets: ["@babel/typescript", ["babel-preset-react-app", { runtime: "automatic" }]], | ||
}; |
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,30 @@ | ||
/* Required for CRA 4, see https://github.com/welldone-software/why-did-you-render/issues/154#issuecomment-773905769 */ | ||
|
||
module.exports = { | ||
babel: { | ||
loaderOptions: babelLoaderOptions => { | ||
const origBabelPresetCRAIndex = babelLoaderOptions.presets.findIndex(preset => { | ||
return preset[0].includes("babel-preset-react-app"); | ||
}); | ||
|
||
const origBabelPresetCRA = babelLoaderOptions.presets[origBabelPresetCRAIndex]; | ||
|
||
babelLoaderOptions.presets[origBabelPresetCRAIndex] = function overridenPresetCRA(api, opts, env) { | ||
const babelPresetCRAResult = require(origBabelPresetCRA[0])(api, origBabelPresetCRA[1], env); | ||
|
||
babelPresetCRAResult.presets.forEach(preset => { | ||
// detect @babel/preset-react with {development: true, runtime: 'automatic'} | ||
const isReactPreset = | ||
preset && preset[1] && preset[1].runtime === "automatic" && preset[1].development === true; | ||
if (isReactPreset) { | ||
preset[1].importSource = "@welldone-software/why-did-you-render"; | ||
} | ||
}); | ||
|
||
return babelPresetCRAResult; | ||
}; | ||
|
||
return babelLoaderOptions; | ||
}, | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.