Skip to content

Commit ca98eb4

Browse files
committed
Merge branch 'main' into column-footprint-editor
* main: (2521 commits) Format code and sort imports Adjusted migrations to fix local FK issues New descriptions Format code and sort imports Improved local authentication Improved sgp data integration Pre populate roles table Add contributions mapping Update to run workflow Test workflow Updates Format code and sort imports Handle comma separated types Supports one type filtering Cluster and unclustered works Add contributions Add image Base table Add extraction table Fix makefile ...
2 parents 2295eb4 + 89f3e24 commit ca98eb4

File tree

873 files changed

+270906
-0
lines changed

Some content is hidden

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

873 files changed

+270906
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build Staging
2+
3+
on:
4+
push:
5+
tags:
6+
- v[0-9]+.[0-9]+.[0-9]+-** # Semver Pre-Release
7+
pull_request:
8+
branches: [ main ]
9+
paths:
10+
- services/api-v3/**
11+
jobs:
12+
docker:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
with:
18+
submodules: 'recursive'
19+
- name: Docker meta
20+
id: meta
21+
uses: docker/metadata-action@v4
22+
with:
23+
images: hub.opensciencegrid.org/macrostrat/api-v3
24+
tags: |
25+
type=semver,pattern={{version}}
26+
type=raw,value=latest-itb
27+
type=ref,event=branch,suffix=-{{date 'YYYYMMDDHHmmss'}}
28+
type=ref,event=tag,suffix=-{{date 'YYYYMMDDHHmmss'}}
29+
type=raw,value=latest-itb-{{date 'YYYYMMDDHHmmss'}}
30+
type=raw,value=sha-{{sha}}
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v2
33+
- name: Login to OSG DockerHub
34+
uses: docker/login-action@v2
35+
with:
36+
registry: hub.opensciencegrid.org
37+
username: ${{ vars.HARBOR_CLI_NAME }}
38+
password: ${{ secrets.HARBOR_CLI_SECRET }}
39+
- name: Build and push
40+
uses: docker/build-push-action@v5
41+
with:
42+
context: services/api-v3
43+
push: true
44+
tags: ${{ steps.meta.outputs.tags }}
45+
labels: ${{ steps.meta.outputs.labels }}
46+
cache-from: type=gha
47+
cache-to: type=gha,mode=max
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build Production
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- v[0-9]+.[0-9]+.[0-9]+ # Semver Release
9+
paths:
10+
- services/api-v3/**
11+
12+
jobs:
13+
docker:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
with:
19+
submodules: 'recursive'
20+
- name: Docker meta
21+
id: meta
22+
uses: docker/metadata-action@v4
23+
with:
24+
images: hub.opensciencegrid.org/macrostrat/api-v3
25+
tags: |
26+
type=ref,event=pr,suffix=-{{date 'YYYYMMDDHHmmss'}}
27+
type=ref,event=branch,suffix=-{{date 'YYYYMMDDHHmmss'}}
28+
type=semver,pattern={{version}}
29+
type=raw,value=latest,enable={{is_default_branch}}
30+
type=raw,value=sha-{{sha}}
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v2
33+
- name: Login to OSG DockerHub
34+
uses: docker/login-action@v2
35+
with:
36+
registry: hub.opensciencegrid.org
37+
username: ${{ vars.HARBOR_CLI_NAME }}
38+
password: ${{ secrets.HARBOR_CLI_SECRET }}
39+
- name: Build and push
40+
uses: docker/build-push-action@v5
41+
with:
42+
context: services/api-v3
43+
push: true
44+
tags: ${{ steps.meta.outputs.tags }}
45+
labels: ${{ steps.meta.outputs.labels }}
46+
cache-from: type=gha
47+
cache-to: type=gha,mode=max
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Build legacy tileserver
2+
on:
3+
push:
4+
# Branches and paths are exclusive
5+
branches: ["main"]
6+
paths:
7+
- services/legacy-tileserver/**
8+
tags:
9+
- legacy-tileserver-v[0-9]+.[0-9]+.[0-9]+ # Semver Release (non-prerelease)
10+
- legacy-tileserver-v[0-9]+.[0-9]+.[0-9]+-** # Semver release (prerelease)
11+
pull_request:
12+
branches: [main]
13+
paths:
14+
- services/legacy-tileserver/**
15+
jobs:
16+
docker:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
submodules: "recursive"
23+
# Set up python and poetry
24+
- name: Set up Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: 3.11
28+
- name: Install Poetry
29+
run: python3 -m pip install poetry==2.1.1
30+
- name: Build and stage local packages
31+
run: scripts/prepare-services
32+
- name: Get the version from the tag, if it exists
33+
run: |
34+
TAG=${{ github.event.release.tag_name }}
35+
VERSION=$(echo "${TAG}" | sed -E 's/legacy-tileserver-v//')
36+
echo "VERSION=${VERSION}" >> $GITHUB_ENV
37+
- name: Docker meta
38+
id: meta
39+
uses: docker/metadata-action@v4
40+
with:
41+
images: hub.opensciencegrid.org/macrostrat/legacy-tileserver
42+
tags: |
43+
type=ref,event=pr,suffix=-{{date 'YYYYMMDDHHmmss'}}
44+
type=ref,event=branch,suffix=-{{date 'YYYYMMDDHHmmss'}}
45+
type=semver,pattern={{version}}
46+
type=raw,value=latest,enable={{is_default_branch}}
47+
type=raw,value=sha-{{sha}}
48+
- name: Set up Docker BuildX
49+
uses: docker/setup-buildx-action@v2
50+
- name: Login to OSG DockerHub
51+
uses: docker/login-action@v2
52+
with:
53+
registry: hub.opensciencegrid.org
54+
username: ${{ vars.HARBOR_CLI_NAME }}
55+
password: ${{ secrets.HARBOR_CLI_SECRET }}
56+
- name: Build and push
57+
uses: docker/build-push-action@v5
58+
with:
59+
context: services/legacy-tileserver
60+
push: true
61+
tags: ${{ steps.meta.outputs.tags }}
62+
labels: ${{ steps.meta.outputs.labels }}
63+
cache-from: type=gha
64+
cache-to: type=gha,mode=max
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Build tileserver
2+
on:
3+
push:
4+
# Branches and paths are exclusive
5+
branches: ["main"]
6+
paths:
7+
- services/tileserver/**
8+
tags:
9+
- tileserver-v[0-9]+.[0-9]+.[0-9]+ # Semver Release (non-prerelease)
10+
- tileserver-v[0-9]+.[0-9]+.[0-9]+-** # Semver release (prerelease)
11+
pull_request:
12+
branches: [main]
13+
paths:
14+
- services/tileserver/**
15+
jobs:
16+
docker:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
submodules: "recursive"
23+
# Set up python and poetry
24+
- name: Set up Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: 3.11
28+
- name: Install Poetry
29+
run: python3 -m pip install poetry==2.1.1
30+
- name: Build and stage local packages
31+
run: scripts/prepare-services
32+
- name: Get the version from the tag, if it exists
33+
run: |
34+
TAG=${{ github.event.release.tag_name }}
35+
VERSION=$(echo "${TAG}" | sed -E 's/tileserver-v//')
36+
echo "VERSION=${VERSION}" >> $GITHUB_ENV
37+
- name: Docker meta
38+
id: meta
39+
uses: docker/metadata-action@v4
40+
with:
41+
images: hub.opensciencegrid.org/macrostrat/tileserver
42+
tags: |
43+
type=ref,event=pr,suffix=-{{date 'YYYYMMDDHHmmss'}}
44+
type=ref,event=branch,suffix=-{{date 'YYYYMMDDHHmmss'}}
45+
type=semver,pattern={{version}}
46+
type=raw,value=latest,enable={{is_default_branch}}
47+
type=raw,value=sha-{{sha}}
48+
- name: Set up Docker BuildX
49+
uses: docker/setup-buildx-action@v2
50+
- name: Login to OSG DockerHub
51+
uses: docker/login-action@v2
52+
with:
53+
registry: hub.opensciencegrid.org
54+
username: ${{ vars.HARBOR_CLI_NAME }}
55+
password: ${{ secrets.HARBOR_CLI_SECRET }}
56+
- name: Build and push
57+
uses: docker/build-push-action@v5
58+
with:
59+
context: services/tileserver
60+
push: true
61+
tags: ${{ steps.meta.outputs.tags }}
62+
labels: ${{ steps.meta.outputs.labels }}
63+
cache-from: type=gha
64+
cache-to: type=gha,mode=max
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Build usage-stats
2+
on:
3+
push:
4+
# Branches and paths are exclusive
5+
branches: ["main"]
6+
paths:
7+
- services/usage-stats/**
8+
tags:
9+
- usage-stats-v[0-9]+.[0-9]+.[0-9]+ # Semver Release (non-prerelease)
10+
- usage-stats-v[0-9]+.[0-9]+.[0-9]+-** # Semver release (prerelease)
11+
pull_request:
12+
branches: [main]
13+
paths:
14+
- services/usage-stats/**
15+
jobs:
16+
docker:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
submodules: "recursive"
23+
# Set up python and poetry
24+
- name: Set up Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: 3.11
28+
- name: Install Poetry
29+
run: python3 -m pip install poetry==2.1.1
30+
- name: Build and stage local packages
31+
run: scripts/prepare-services
32+
- name: Get the version from the tag, if it exists
33+
run: |
34+
TAG=${{ github.event.release.tag_name }}
35+
VERSION=$(echo "${TAG}" | sed -E 's/usage-stats-v//')
36+
echo "VERSION=${VERSION}" >> $GITHUB_ENV
37+
- name: Docker meta
38+
id: meta
39+
uses: docker/metadata-action@v4
40+
with:
41+
images: hub.opensciencegrid.org/macrostrat/usage-stats
42+
tags: |
43+
type=ref,event=pr,suffix=-{{date 'YYYYMMDDHHmmss'}}
44+
type=ref,event=branch,suffix=-{{date 'YYYYMMDDHHmmss'}}
45+
type=semver,pattern={{version}}
46+
type=raw,value=latest,enable={{is_default_branch}}
47+
type=raw,value=sha-{{sha}}
48+
- name: Set up Docker BuildX
49+
uses: docker/setup-buildx-action@v2
50+
- name: Login to OSG DockerHub
51+
uses: docker/login-action@v2
52+
with:
53+
registry: hub.opensciencegrid.org
54+
username: ${{ vars.HARBOR_CLI_NAME }}
55+
password: ${{ secrets.HARBOR_CLI_SECRET }}
56+
- name: Build and push
57+
uses: docker/build-push-action@v5
58+
with:
59+
context: services/usage-stats
60+
push: true
61+
tags: ${{ steps.meta.outputs.tags }}
62+
labels: ${{ steps.meta.outputs.labels }}
63+
cache-from: type=gha
64+
cache-to: type=gha,mode=max

.github/workflows/format-code.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Format code and sort imports
2+
on:
3+
pull_request:
4+
branches: [main]
5+
push:
6+
branches: [main]
7+
jobs:
8+
format:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
ref: ${{ github.head_ref }}
14+
- uses: actions/[email protected]
15+
with:
16+
python-version: '^3.11'
17+
- uses: actions/cache@v4
18+
with:
19+
path: |
20+
~/.cache/pypoetry
21+
~/.virtualenvs
22+
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
23+
restore-keys: |
24+
${{ runner.os }}-poetry-
25+
- name: Install Poetry
26+
run: curl -sSL https://install.python-poetry.org | python3 -
27+
- name: Install dependencies
28+
run: poetry install --only dev
29+
- name: Run formatting commands
30+
run: make format
31+
- name: Commit changes
32+
uses: stefanzweifel/git-auto-commit-action@v5
33+
with:
34+
commit_message: Format code and sort imports
35+
branch: ${{ github.head_ref }}

.github/workflows/run-makefile.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Install and run `macrostrat` test suite
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
install-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
submodules: recursive
18+
19+
- name: Set up Python and Poetry
20+
uses: abatilo/actions-poetry@v2
21+
with:
22+
poetry-version: "1.8.2"
23+
24+
- name: Install system dependencies (GDAL)
25+
run: |
26+
sudo apt update
27+
sudo apt install -y gdal-bin libgdal-dev python3-dev
28+
29+
- name: Install dependencies and build macrostrat
30+
run: make all
31+
32+
- name: Run macrostrat tests
33+
run: make test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.venv
2+
__pycache__
3+
macrostrat.toml

.gitmodules

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
[submodule "postgis-geologic-map"]
22
path = services/column-footprint-editor/postgis-geologic-map
33
url = https://github.com/davenquinn/postgis-geologic-map.git
4+
[submodule "deps/topology-manager"]
5+
path = submodules/topology-manager
6+
url = https://github.com/Mapboard/topology-manager.git
7+
[submodule "submodules/postgis-tile-utils"]
8+
path = submodules/postgis-tile-utils
9+
url = https://github.com/UW-Macrostrat/postgis-tile-utils
10+
[submodule "submodules/storage-admin"]
11+
path = submodules/storage-admin
12+
url = https://github.com/UW-Macrostrat/radosgw_admin_client

.idea/.gitignore

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)