From 20cf238b0cffd84e0fa6f1a6ef26a73eb269b3df Mon Sep 17 00:00:00 2001 From: Giles Dring Date: Fri, 12 Apr 2024 16:26:14 +0100 Subject: [PATCH 1/4] Update to latest oi-lume-utils --- _config.js | 2 +- import_map.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_config.js b/_config.js index 6d082fbbc..934a584e3 100644 --- a/_config.js +++ b/_config.js @@ -111,7 +111,7 @@ site.use(date({ })); // Add csv loader -site.loadData(['.csv'], csvLoader); +site.loadData(['.csv'], csvLoader()); site.loadData(['.geojson', '.hexjson'], jsonLoader); site.loadData(['.md']); diff --git a/import_map.json b/import_map.json index 6e4f19f98..2e167c33f 100644 --- a/import_map.json +++ b/import_map.json @@ -6,6 +6,6 @@ "lume/": "https://deno.land/x/lume@v1.17.3/", "local/": "./local-lib/", "std/": "https://deno.land/std@0.82.0/", - "oi-lume-utils/": "https://deno.land/x/oi_lume_utils@v0.3.1/" + "oi-lume-utils/": "https://deno.land/x/oi_lume_utils@v0.4.0/" } } From 1abd80ca115b601a32e8e3f356a45ad12c6148bb Mon Sep 17 00:00:00 2001 From: Giles Dring Date: Fri, 12 Apr 2024 16:27:27 +0100 Subject: [PATCH 2/4] Add debugging config --- .gitignore | 5 +++++ .vscode/launch.json | 21 +++++++++++++++++++++ deno.json | 3 ++- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json diff --git a/.gitignore b/.gitignore index c3115aa24..1e77d1455 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,8 @@ design/data/ __pycache__ /MM23_variable_lookup.csv .env + +# Debugging files +*.cpuprofile +*.heapprofile +*.heapsnapshot \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..683ac9f5a --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,21 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "request": "launch", + "name": "Debug site", + "type": "node", + // "program": "${workspaceFolder}/main.ts", + "cwd": "${workspaceFolder}", + "runtimeExecutable": "/home/giles/.deno/bin/deno", + "runtimeArgs": [ + "task", + "lume_debug", + ], + "attachSimplePort": 9229 + } + ] +} \ No newline at end of file diff --git a/deno.json b/deno.json index d125f977b..bf850ca21 100644 --- a/deno.json +++ b/deno.json @@ -4,7 +4,8 @@ "lume": "echo \"import 'lume/cli.ts'\" | deno run --v8-flags=--max-old-space-size=2048 --unstable -A -", "build": "deno task lume", "serve": "deno task lume -s", - "validate": "deno run --allow-env --allow-read=src/_data/reports --allow-write=lib lib/validate.ts" + "validate": "deno run --allow-env --allow-read=src/_data/reports --allow-write=lib lib/validate.ts", + "lume_debug": "echo \"import 'lume/cli.ts'\" | deno run --inspect-wait --v8-flags=--max-old-space-size=2048 --allow-all -" }, "lock": false, "compilerOptions": { From 203061f07be4f64d1b74eb18720ee82108fd6edb Mon Sep 17 00:00:00 2001 From: Taz-Chiles <97239140+Taz-Chiles@users.noreply.github.com> Date: Tue, 16 Apr 2024 11:54:17 +0100 Subject: [PATCH 3/4] Add merge checks --- .github/workflows/merge-check.yml | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/merge-check.yml diff --git a/.github/workflows/merge-check.yml b/.github/workflows/merge-check.yml new file mode 100644 index 000000000..be2680532 --- /dev/null +++ b/.github/workflows/merge-check.yml @@ -0,0 +1,45 @@ +name: Merge Check + +"on": + workflow_dispatch: + + +# Cancel any in-flight jobs +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + cache: pipenv + + - name: Install Python dependencies + run: | + pip install pipenv + # pipenv install + pipenv sync + + - name: Run DVC pipelines + run: | + pipenv run dvc --version + pipenv run dvc update -R working + pipenv run dvc repro -R scripts + + - name: Setup Deno + uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + + - name: Build site + shell: bash + run: deno task build + From 1deb75e969da515faadac3b59fff68071b3a2b84 Mon Sep 17 00:00:00 2001 From: Taz-Chiles <97239140+Taz-Chiles@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:50:45 +0100 Subject: [PATCH 4/4] Change trigger for merge check --- .github/workflows/merge-check.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/merge-check.yml b/.github/workflows/merge-check.yml index be2680532..e7dc943f8 100644 --- a/.github/workflows/merge-check.yml +++ b/.github/workflows/merge-check.yml @@ -1,8 +1,9 @@ name: Merge Check "on": - workflow_dispatch: - + pull_request: + branches: + - "main" # Cancel any in-flight jobs concurrency: @@ -19,7 +20,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: "3.10" cache: pipenv - name: Install Python dependencies @@ -42,4 +43,3 @@ jobs: - name: Build site shell: bash run: deno task build -