Skip to content

Commit 29c742f

Browse files
MDavidson17github-actions[bot]kodiakhq[bot]
authored
feat: fields.json (#197)
* feat: fields.json historical imagery fields merged into stac fields.json * fix: linting * ci: workflow to build fields.json * ci: builds on push if you edit custom-fields.json * fix: uses specific stac fields.json url * fix: range to value * fix: ci and range value * ci: Update fields.json * fix: format file * fix: typo * fix: cleaner way of formatting json * fix: don't push to master branch * fix: delete original fields.json * fix: doesn't update fields if script errors Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 5017d6c commit 29c742f

File tree

4 files changed

+1018
-0
lines changed

4 files changed

+1018
-0
lines changed

.github/workflows/fields.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build Fields
2+
on:
3+
push:
4+
branches-ignore:
5+
- master
6+
paths:
7+
- fields/custom-fields.json
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- name: build fields
17+
run: |
18+
FIELDS=$(node ./fields/import-fields-json.js)
19+
if [ -n "${FIELDS}" ]; then
20+
node ./fields/import-fields-json.js > ./fields/fields.json
21+
fi
22+
FILES=$(git ls-files -m)
23+
if [[ $FILES == *"fields/fields.json"* ]]; then
24+
git config --global user.name "github-actions[bot]"
25+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
26+
git add ./fields/fields.json
27+
git commit -m "ci: Update fields.json"
28+
git push
29+
fi

fields/custom-fields.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"extensions": {
3+
"aerial-photo": "Aerial Photo",
4+
"camera": "Camera",
5+
"film": "Film",
6+
"historical-imagery": "Historical Imagery",
7+
"scannning": "Scanning"
8+
},
9+
"metadata": {
10+
"film:id": {
11+
"summary": "v"
12+
},
13+
"film:negative_sequence": {
14+
"summary": "r"
15+
},
16+
"film:physical_condition": {
17+
"summary": "v"
18+
},
19+
"film:physical_size": {
20+
"summary": "v"
21+
},
22+
"aerial-photo:run": {
23+
"summary": "v"
24+
},
25+
"aerial-photo:sequence_number": {
26+
"summary": "r"
27+
},
28+
"aerial-photo:altitude": {
29+
"summary": "r"
30+
},
31+
"aerial-photo:scale": {
32+
"summary": "r"
33+
},
34+
"aerial-photo:anomalies": {
35+
"summary": "v"
36+
},
37+
"camera:sequence_number": {
38+
"summary": "r"
39+
},
40+
"camera:nominal_focal_length": {
41+
"summary": "r"
42+
},
43+
"scan:is_original": {
44+
"summary": "v"
45+
},
46+
"scan:scanned": {
47+
"summary": "r"
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)