Skip to content

Commit

Permalink
New graph types and CI changes (#35)
Browse files Browse the repository at this point in the history
Support for a new graph types + fix for playground
  • Loading branch information
myedibleenso authored Jan 20, 2024
1 parent 9cb79f2 commit 7323d30
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 8,120 deletions.
6 changes: 6 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Summary of Changes


### Related issues

Resolves ???
112 changes: 112 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: odin-tutorial-ui docker

on:
push:
branches: [main]
tags:
- "**"
pull_request:
branches: [main]
release:
types: [published]

# builds and publishes docker images for the default branch.
# images are tagged with short commit hash, latest, and any tags.

env:
ORG: "parsertongue"
IMAGE_NAME: "odin-tutorial-ui"

jobs:
# Determine value for app version
app_version:
name: "Determine app version"
runs-on: ubuntu-latest
outputs:
app_version: ${{ steps.app_version.outputs.app_version }}
commit: ${{ steps.app_version.outputs.commit }}
steps:
- name: Set APP_VERSION output
id: app_version
run: |
echo "app_version=${{github.ref_name}}"
if [ -z "${app_version}" ]; then
app_version=${{github.sha}}
echo "app_version=${app_version}"
fi
echo "app_version=$app_version" >> "$GITHUB_OUTPUT"
echo "commit=${{github.sha}}" >> "$GITHUB_OUTPUT"
echo "app_version=$app_version"
echo "commit=${{github.sha}}"
node:
name: "docker image for React-based UI"
needs: [app_version]
runs-on: ubuntu-latest
steps:

# Setup docker
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# for multi-arch builds (ex. ARM 64)
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker
# - name: Prepare buildx builder
# run: |
# docker buildx create --use --name "multiarch-builder" --platform linux/amd64,linux/arm64 --driver "docker-container"
- name: Inspect builder
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
# Checkout code
- name: Checkout code
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

########################################
# docker image
########################################
- name: Tags for image
id: tags
# see https://github.com/docker/metadata-action
uses: docker/metadata-action@v4

with:
images: |
${{ env.ORG }}/${{ env.IMAGE_NAME }}
tags: |
# latest
type=raw,value=latest
# version
type=semver,pattern={{version}}
# other tags
type=ref,event=tag
# short commit hash
type=sha
- name: Build and push image
# see https://github.com/docker/build-push-action
uses: docker/build-push-action@v5
with:
context: .
file: "Dockerfile"
platforms: linux/amd64
#platforms: linux/amd64,linux/arm64
no-cache: true
pull: true
push: true
#push: ${{ github.event_name != 'pull_request' }}
# references `tags` step in steps for current job
tags: ${{ steps.tags.outputs.tags }}
build-args: |
#APP_VERSION=${{needs.app_version.outputs.app_version}}
APP_VERSION=${{needs.app_version.outputs.commit}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ package-lock.json
node_modules
dist
*.log
yarn.lock
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ WORKDIR /app
COPY . .

# Install app dependencies
RUN yarn install --no-optional
RUN yarn install --no-optional --ignore-engines

# Build, minify, etc.
RUN yarn build
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ services:
env_file:
- ./.env
environment:
ODIN_API_BASE_URL: http://backend:9000/api

ODIN_API_BASE_URL: http://localhost:9000/api
backend:
platform: linux/amd64
image: parsertongue/odin-rest-api:latest
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"react-syntax-highlighter": "^11.0.2",
"react-toastify": "^5.4.0",
"react-treebeard": "^3.1.0",
"text-annotation-graphs": "git+https://github.com/lum-ai/TAG.git#odinson",
"text-annotation-graphs": "https://github.com/lum-ai/TAG.git#odinson",
"uninstall": "0.0.0"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions src/client/components/tag/tag-div.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default class TAGdiv extends Component {
"universal-enhanced": {value: "universal-enhanced", label: "Universal Enhanced Dependencies", description: "Use Universal Enhanced dependencies."},
"universal-basic": {value: "universal-basic", label: "Universal Basic Dependencies", description: "Use Universal Basic dependencies."},
"semantic-roles": {value: "semantic-roles", label: "Semantic Roles", description: "Use graph of semantic roles."},
"hybrid": {value: "hybrid", label: "hybrid (union of all graphs)", description: "Use all available graphs."},
};

}
Expand Down
Loading

0 comments on commit 7323d30

Please sign in to comment.