Skip to content

Commit 5a43a91

Browse files
authored
Merge pull request #879 from cambridge-cares/dev-rename-dtvf
dev-rename-dtvf
2 parents 01a7d10 + ccc4408 commit 5a43a91

File tree

194 files changed

+320
-370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+320
-370
lines changed

.github/scripts/dtvf/make-release-body.sh

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
#!/bin/bash
22

3-
# This script checks that the version of the Digital Twin Visualisation Framework
4-
# (DTVF) is as expected, the example visualisations have been updated to use that
3+
# This script checks that the version of the TWA Visualisation Framework (TWA-VF
4+
# is as expected, the example visualisations have been updated to use that
55
# version, and that the CHANGELOG has been updated acorrdingly.
66
#
7-
# Author: Michael Hillman (mdhillman<@>cmclinnovations.com)
7+
# Author: Michael Hillman (mdhillman<@>cmcl.io)
88

99

1010
# Read (what should be) the correct version
11-
VERSION=`cat -s "./web/digital-twin-vis-framework/library/VERSION" 2>/dev/null`
11+
VERSION=`cat -s "./web/twa-vis-framework/library/VERSION" 2>/dev/null`
1212
if [ "$VERSION" == "" ]; then
13-
echo "The VERSION file of the DTVF has no content!"
13+
echo "The VERSION file of the TWA-VF has no content!"
1414
exit -1
1515
fi
16-
echo "DTVF defined in file as: $VERSION"
16+
echo "TWA-VF defined in file as: $VERSION"
1717

1818
# Get the VERSION file from the main branch of the repo, check that this new version does not match
19-
MAIN_VERSION=$(curl -s "https://raw.githubusercontent.com/cambridge-cares/TheWorldAvatar/main/web/digital-twin-vis-framework/library/VERSION")
19+
MAIN_VERSION=$(curl -s "https://raw.githubusercontent.com/cambridge-cares/TheWorldAvatar/main/web/twa-vis-framework/library/VERSION")
2020
if [ "$VERSION" == "$MAIN_VERSION" ]; then
2121
echo "Contents of VERSION file on this branch match that on the main branch!"
2222
exit -1
@@ -32,7 +32,7 @@ fi
3232
echo "Version does not contain -SNAPSHOT qualifier."
3333

3434
# Check that the change log contains an entry for that version
35-
CHANGELOG="./web/digital-twin-vis-framework/CHANGELOG.md"
35+
CHANGELOG="./web/twa-vis-framework/CHANGELOG.md"
3636
TOKEN="# $VERSION"
3737
if ! grep -q "$TOKEN" "$CHANGELOG"; then
3838
echo "Could not find corresponding node in CHANGELOG.md file!"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
# This script generates the body text for releases of the
4+
# TWA Visualisation Framework (TWA-VF).
5+
#
6+
# Author: Michael Hillman (mdhillman<@>cmcl.io)
7+
8+
CHANGELOG="./web/twa-vis-framework/CHANGELOG.md"
9+
regexp="^#\s.*"
10+
SECTION=0
11+
12+
BODY="This release package marks a release of the TWA Visualisation Framework (TWA-VF), a framework for customisable visualisations using The World Avatar project. Release notes for this version of the TWA-VF can be found below, for more details, see the \`CHANGELOG.md\` and \`README.md\` files within the \`/web/twa-vis-framework/\` directory.\n\n"
13+
14+
# Read changelog line by line
15+
# Only store notes within the first header
16+
while IFS= read -r line
17+
do
18+
if [[ $line =~ $regexp ]]; then
19+
SECTION=$((SECTION + 1))
20+
fi
21+
22+
if [[ $SECTION == 1 ]]; then
23+
BODY="$BODY\n$line"
24+
fi
25+
26+
done < "$CHANGELOG"
27+
28+
# Output final notes
29+
echo -e "$BODY"

.github/scripts/dtvf/make-release-email.py renamed to .github/scripts/twa-vf/make-release-email.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
#!/bin/bash
22

33
# This script generates the HTML text for the email notification
4-
# generated with a new version of the Digital Twin Visualisation Framework
5-
# (DTVF) is released.
4+
# generated with a new version of the TWA Visualisation Framework
5+
# (TWA-VF) is released.
66
#
77
# Note that this script also expects Python to have been installed and setup
88
# to run the markdown2html.py script within thie directory.
99
#
10-
# Author: Michael Hillman (mdhillman<@>cmclinnovations.com)
10+
# Author: Michael Hillman (mdhillman<@>cmcl.io)
1111

1212
import os
1313
import markdown
1414

1515
# Read version from file
16-
with open('./web/digital-twin-vis-framework/library/VERSION', 'r') as f:
16+
with open('./web/twa-vis-framework/library/VERSION', 'r') as f:
1717
version = f.read()
1818
print("Have read version file.")
1919

2020
# Read the top most section of the patch notes
2121
notes = ""
22-
with open('./web/digital-twin-vis-framework/CHANGELOG.md', 'r') as f:
22+
with open('./web/twa-vis-framework/CHANGELOG.md', 'r') as f:
2323
lines = f.readlines()
2424
section = 0
2525

@@ -39,7 +39,7 @@
3939
print("Have converted change log to HTML.")
4040

4141
# Read template email file
42-
with open('./web/digital-twin-vis-framework/library/release.html', 'r') as f:
42+
with open('./web/twa-vis-framework/library/release.html', 'r') as f:
4343
template = f.read()
4444
print("Have read template email file.")
4545

.github/workflows/dtvf_check-version.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
#
2-
# Checks that the version of the DTVF has been updated.
2+
# Checks that the version of the TWA-VF has been updated.
33
#
4-
# Author: Michael Hillman (mdhillman<@>cmclinnovations.com)
4+
# Author: Michael Hillman (mdhillman<@>cmcl.io)
55
#
6-
name: Check DTVF Version
6+
name: Check TWA-VF Version
77

88

99
# Trigger this workflow during pull requests to the 'main' branch,
10-
# but ONLY when files within the DTVF source code are changed.
10+
# but ONLY when files within the TWA-VF source code are changed.
1111
on:
1212
pull_request:
1313
branches:
1414
- main
1515
paths:
16-
- web/digital-twin-vis-framework/library/**
16+
- web/twa-vis-framework/library/**
1717

1818

1919
# Job definitions
@@ -34,6 +34,6 @@ jobs:
3434
- name: Run version check script
3535
working-directory: ./
3636
run: |
37-
chmod +x ./.github/scripts/dtvf/check-version.sh
38-
./.github/scripts/dtvf/check-version.sh
37+
chmod +x ./.github/scripts/twa-vf/check-version.sh
38+
./.github/scripts/twa-vf/check-version.sh
3939

.github/workflows/dtvf_release.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
#
22
# Runs actions related to a new release (i.e. merged PR to main) of the
3-
# Digital Twin Visualisation Framework (DTVF).
3+
# TWA Visualisation Framework (TWA-VF).
44
#
5-
# Author: Michael Hillman (mdhillman<@>cmclinnovations.com)
5+
# Author: Michael Hillman (mdhillman<@>cmcl.io)
66
#
7-
name: Release the DTVF
7+
name: Release the TWA-VF
88

99

1010
# Trigger this workflow during pushes to the 'main' branch, and
11-
# ONLY when files within the DTVF source code are changed.
11+
# ONLY when files within the TWA-VF source code are changed.
1212
on:
1313
push:
1414
branches:
1515
- main
1616
paths:
17-
- 'web/digital-twin-vis-framework/library/**'
17+
- 'web/twa-vis-framework/library/**'
1818

1919

2020
# Job definitions
@@ -33,20 +33,20 @@ jobs:
3333
- name: Checkout repository
3434
uses: actions/checkout@v3
3535

36-
# Get the version of the DTVF
37-
- name: Get DTVF version
36+
# Get the version of the TWA-VF
37+
- name: Get TWA-VF version
3838
id: versioner
3939
run: |
40-
echo version=$(cat web/digital-twin-vis-framework/library/VERSION) >> $GITHUB_ENV
40+
echo version=$(cat web/twa-vis-framework/library/VERSION) >> $GITHUB_ENV
4141
42-
# Compile the DTVF and ZIP results
43-
- name: Compile the DTVF
42+
# Compile the TWA-VF and ZIP results
43+
- name: Compile the TWA-VF
4444
id: compiler
45-
working-directory: ./web/digital-twin-vis-framework/library
45+
working-directory: ./web/twa-vis-framework/library
4646
run: |
4747
docker-compose -f docker-compose.dev.yml up compile
48-
zip -r $HOME/dtvf.zip output/
49-
echo zip=$HOME/dtvf.zip >> $GITHUB_ENV
48+
zip -r $HOME/twa-vf.zip output/
49+
echo zip=$HOME/twa-vf.zip >> $GITHUB_ENV
5050
5151
# Login to Docker image registry
5252
- name: Login to Docker registry
@@ -61,26 +61,26 @@ jobs:
6161
uses: docker/build-push-action@v3
6262
with:
6363
push: true
64-
context: ./web/digital-twin-vis-framework/library
64+
context: ./web/twa-vis-framework/library
6565
tags: |
66-
ghcr.io/cambridge-cares/dtvf-base-image:${{ env.version }}
67-
ghcr.io/cambridge-cares/dtvf-base-image:latest
66+
ghcr.io/cambridge-cares/twa-vf:${{ env.version }}
67+
ghcr.io/cambridge-cares/twa-vf:latest
6868
6969
# Generate the release body text
7070
- name: Generate release text
7171
id: generate-text
7272
working-directory: ./
7373
run: |
74-
chmod +x ./.github/scripts/dtvf/make-release-body.sh
75-
./.github/scripts/dtvf/make-release-body.sh > $HOME/body.md
74+
chmod +x ./.github/scripts/twa-vf/make-release-body.sh
75+
./.github/scripts/twa-vf/make-release-body.sh > $HOME/body.md
7676
echo body=$HOME/body.md >> $GITHUB_ENV
7777
7878
# Make a release on the main branch
7979
- name: Make release
8080
uses: ncipollo/release-action@v1
8181
with:
82-
name: "dtvf-${{ env.version }}"
83-
tag: "dtvf-${{ env.version }}"
82+
name: "twa-vf-${{ env.version }}"
83+
tag: "twa-vf-${{ env.version }}"
8484
commit: "main"
8585
bodyFile: "${{ env.body }}"
8686
artifacts: "${{ env.zip }}"
@@ -97,7 +97,7 @@ jobs:
9797
working-directory: ./
9898
run: |
9999
pip install markdown
100-
python ./.github/scripts/dtvf/make-release-email.py
100+
python ./.github/scripts/twa-vf/make-release-email.py
101101
echo email=$HOME/email.html >> $GITHUB_ENV
102102
103103
# Send a notification email
@@ -109,7 +109,7 @@ jobs:
109109
secure: true
110110
username: ${{secrets.CMCL_MAIL_USERNAME}}
111111
password: ${{secrets.CMCL_MAIL_PASSWORD}}
112-
subject: "New TWA release: DTVF ${{ env.version }}"
112+
subject: "New TWA release: TWA-VF ${{ env.version }}"
113113
to: cares-twa@lists.cam.ac.uk,all@cmcl.io
114114
from: Automated TWA action
115115
html_body: "file://${{ env.email }}"

Agents/CReDoPhase1BuildingsAgent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ Afterwards the visualisation can be viewed via Docker Desktop. For more informat
4545

4646
[properties file]: resources/properties.properties
4747
[CitiesKG Agents]: https://github.com/cambridge-cares/CitiesKG/tree/develop/agents
48-
[DTVF]: https://github.com/cambridge-cares/TheWorldAvatar/wiki/Digital-Twin-Visualisations
48+
[DTVF]: https://github.com/cambridge-cares/TheWorldAvatar/wiki/TWA-Visualisations
4949
[Minimum Working Example]: https://github.com/cambridge-cares/TheWorldAvatar/tree/develop/Agents/TimeSeriesExample

Agents/CReDoPhase1BuildingsAgent/dtvf_visualisation_bha_data/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Purpose
44
This example visualisation has been put together to demonstrate the intended use of the centralised Digital Twin Visualisation Framework (DTVF). This framework has been designed to make it easier for users not experienced with Javascript (or the mapping libraries) to quickly & easily put together a new Digital Twin visualisation. It is intended for developers to use this example visualisation to gain an understanding of the DTVF before attempting to create their own visualisation; to do that, this example can be copied and used as a starting point.
55

6-
This centralised framework expects users to have structured their data in a particular format, and provide a number of associated metadata files. Before starting, ensure your data meets this format by reading the ["Visualisation Framework"](https://github.com/cambridge-cares/TheWorldAvatar/wiki/Digital-Twin-Visualisations) page on the GitHub wiki. This page also details how the framework functions, and how to configure your visualisation to use it.
6+
This centralised framework expects users to have structured their data in a particular format, and provide a number of associated metadata files. Before starting, ensure your data meets this format by reading the ["Visualisation Framework"](https://github.com/cambridge-cares/TheWorldAvatar/wiki/TWA-Visualisations) page on the GitHub wiki. This page also details how the framework functions, and how to configure your visualisation to use it.
77

88
## Building the Image
99
The `docker` folder contains the required files to build a Docker Image for the example visualisation; the `Dockerfile` file contains the instructions to build an Image; before making any changes to it, please consult the application's developer or the system administrators at CMCL (Michael Hillman <mdhillman@cmclinnovations.com>).

Agents/CReDoPhase1BuildingsAgent/dtvf_visualisation_open_data/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Purpose
44
This example visualisation has been put together to demonstrate the intended use of the centralised Digital Twin Visualisation Framework (DTVF). This framework has been designed to make it easier for users not experienced with Javascript (or the mapping libraries) to quickly & easily put together a new Digital Twin visualisation. It is intended for developers to use this example visualisation to gain an understanding of the DTVF before attempting to create their own visualisation; to do that, this example can be copied and used as a starting point.
55

6-
This centralised framework expects users to have structured their data in a particular format, and provide a number of associated metadata files. Before starting, ensure your data meets this format by reading the ["Visualisation Framework"](https://github.com/cambridge-cares/TheWorldAvatar/wiki/Digital-Twin-Visualisations) page on the GitHub wiki. This page also details how the framework functions, and how to configure your visualisation to use it.
6+
This centralised framework expects users to have structured their data in a particular format, and provide a number of associated metadata files. Before starting, ensure your data meets this format by reading the ["Visualisation Framework"](https://github.com/cambridge-cares/TheWorldAvatar/wiki/TWA-Visualisations) page on the GitHub wiki. This page also details how the framework functions, and how to configure your visualisation to use it.
77

88
## Building the Image
99
The `docker` folder contains the required files to build a Docker Image for the example visualisation; the `Dockerfile` file contains the instructions to build an Image; before making any changes to it, please consult the application's developer or the system administrators at CMCL (Michael Hillman <mdhillman@cmclinnovations.com>).

Agents/FeatureInfoAgent/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Feature Info Agent
22

3-
This Feature Info Agent (FIA) acts as a single access point for [DTVF Visualisations](https://github.com/cambridge-cares/TheWorldAvatar/wiki/Digital-Twin-Visualisations) to query for both meta and time series data of an individual feature (i.e. a single geographical location) before display within the side panel of the visualisation.
3+
This Feature Info Agent (FIA) acts as a single access point for [TWA Visualisations](https://github.com/cambridge-cares/TheWorldAvatar/wiki/TWA-Visualisations) to query for both meta and time series data of an individual feature (i.e. a single geographical location) before display within the side panel of the visualisation.
44

55
The current version of the FIA is v2.0.1.
66

@@ -25,7 +25,7 @@ The FIA is a relatively simple HTTP agent built using the JPS Base Lib's agent f
2525
3. Look up corresponding meta query for that class.
2626
1. If none found, send a NO_CONTENT response.
2727
4. Run query to get metadata.
28-
5. Parse resulting metadata into approved DTVF format.
28+
5. Parse resulting metadata into approved TWA-VF format.
2929
6. Look up corresponding timeseries query for that class.
3030
1. If none found, log warning but continue.
3131
2. If found, run query.
@@ -93,7 +93,7 @@ select distinct ?class {
9393

9494
To properly parse the metadata and timeseries queries, the agent requires the results from queries to fulfil a set format. For each type of query a number of placeholder tokens can be added that will be populated by the agent just before execution. These are:
9595

96-
- `[IRI]`: The IRI of the **feature** of interest, i.e. the feature selected within the DTVF (the IRI will be injected here into the request)
96+
- `[IRI]`: The IRI of the **feature** of interest, i.e. the feature selected within the TWA-VF (the IRI will be injected here into the request)
9797
- `[ONTOP]`: The URL of the Ontop service within the stack will be injected
9898

9999
<ins>Queries for metadata</ins> should not concern themselves with data relating to timeseries (that can be handled within the timeseries query). Queries here need to return a table with two (or optionally three) columns. The first column should be named `Property` and contains the name of the parameter we're reporting, the second should be `Value` and contain the value. The optional third column is `Unit`. **These are case sensitive and any other columns will be ignored**.

0 commit comments

Comments
 (0)