Skip to content

Commit

Permalink
Merge pull request #340 from GateNLP/dev
Browse files Browse the repository at this point in the history
Release v2.0.0
  • Loading branch information
twinkarma authored Apr 13, 2023
2 parents b87d92e + 54a87d1 commit 427821e
Show file tree
Hide file tree
Showing 143 changed files with 43,343 additions and 28,506 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/backendfrontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
--health-retries 5
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: conda-incubator/setup-miniconda@v2
with:
Expand All @@ -54,7 +54,7 @@ jobs:
run: conda install -y -c conda-forge postgresql=14.*

- name: Use Node.js v14
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '14'

Expand Down
29 changes: 22 additions & 7 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
-
name: Buildx cache
uses: actions/cache@v3
with:
path: buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('buildx-cache/**') }}
restore-keys: |
${{ runner.os }}-buildx-
-
name: Docker meta (backend)
id: metaBackend
Expand All @@ -35,6 +43,9 @@ jobs:
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Set up qemu
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -47,23 +58,27 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push backend
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
target: backend
push: true
tags: ${{ steps.metaBackend.outputs.tags }}
labels: ${{ steps.metaBackend.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=local,src=buildx-cache
cache-to: type=local,dest=buildx-cache-out,mode=max
platforms: linux/amd64,linux/arm64
-
name: Build and push static files
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
target: frontend
push: true
tags: ${{ steps.metaStatic.outputs.tags }}
labels: ${{ steps.metaStatic.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=local,src=buildx-cache-out
platforms: linux/amd64,linux/arm64
-
name: Clean up cache
run: rm -rf buildx-cache && mv buildx-cache-out buildx-cache
47 changes: 47 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: create-release

on:
push:
tags:
- "v*"

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Extract changelog
run: |
cat CHANGELOG.md | perl -e '
BEGIN {
$myversion = $ARGV[0];
$myversion =~ s/^v//;
}
while(<STDIN>) {
if(/^## *\[\Q$myversion\E\]/) {
$flag = 1;
} elsif(/^## *\[[0-9.]*\]/) {
$flag = 0;
} elsif($flag) {
print;
}
}' -- {{ github.ref_name }} > release-changelog.md
# Fail if the changelog is empty, i.e. there is no changelog for this release
[ -s release-changelog.md ]
- name: Create release artifacts
run: |
IMAGE_TAG="{{ github.ref_name }}"
sed "s/DEFAULT_IMAGE_TAG=latest/DEFAULT_IMAGE_TAG=${IMAGE_TAG#v}/" install/get-teamware.sh > ./get-teamware.sh
tar cvzf install.tar.gz README.md docker-compose*.yml generate-docker-env.sh create-django-db.sh nginx custom-policies Caddyfile
- name: Create release
uses: softprops/action-gh-release@v1
with:
body_path: release-changelog.md
files: |
get-teamware.sh
install.tar.gz
8 changes: 4 additions & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ name: Build and deploy documentation
on:
push:
branches:
- master
- dev
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
uses: actions/checkout@v3
- name: Install conda
uses: conda-incubator/setup-miniconda@v2
with:
Expand All @@ -19,15 +18,16 @@ jobs:
- name: Install python dependencies 🐍
run: pip install -r requirements.txt -r requirements-dev.txt
- name: Use Node.js v14
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '14'
- name: Install and Build 🔧
run: |
npm install
npm run install:docs
npm run build:docs
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.0.0
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: docs-gh-pages # The branch the action should deploy to.
folder: docs/site/gate-teamware # The folder the action should deploy.
34 changes: 22 additions & 12 deletions .github/workflows/image-build-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,18 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Buildx cache
uses: actions/cache@v3
with:
path: buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('buildx-cache/**') }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Generate env
shell: bash
Expand All @@ -31,20 +42,19 @@ jobs:
# Display the environment variable file for the logs
cat .env
- name: Set up Docker cache
uses: satackey/[email protected]
continue-on-error: true
with:
key: integration-test-docker-cache-{hash}
restore-keys: |
integration-test-docker-cache-
- uses: docker-practice/actions-setup-docker@master
- run: |
- name: Build images
run: |
BUILDX_ARGS_BACKEND="--cache-from type=local,src=buildx-cache --cache-to type=local,dest=buildx-cache-out,mode=max"
export BUILDX_ARGS_BACKEND
BUILDX_ARGS_FRONTEND="--cache-from type=local,src=buildx-cache-out"
export BUILDX_ARGS_FRONTEND
./build-images.sh
- uses: actions/setup-node@v1
rm -rf buildx-cache && mv buildx-cache-out buildx-cache
- uses: actions/setup-node@v3
with:
node-version: 14

Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/image-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Docker cache
uses: satackey/[email protected]
continue-on-error: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Buildx cache
uses: actions/cache@v3
with:
key: unit-test-docker-cache-{hash}
path: buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('buildx-cache/**') }}
restore-keys: |
unit-test-docker-cache-
${{ runner.os }}-buildx-
- name: Run the backend and frontend tests in containers
run: |
Expand All @@ -38,7 +41,10 @@ jobs:
cat .env
# Build the test image with npm and pytest installed
docker build -t teamware-main:latest --target test .
docker buildx build --cache-from type=local,src=buildx-cache --cache-to type=local,dest=buildx-cache-out,mode=max --load -t teamware-main:latest --target test .
# Clear up the cache
rm -rf buildx-cache && mv buildx-cache-out buildx-cache
# Export the environment variables
source .env
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration-tests-cypress-record.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Generate env
shell: bash
Expand All @@ -38,7 +38,7 @@ jobs:
- run: |
./build-images.sh
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: 14

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-cff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Check whether the citation metadata from CITATION.cff is valid
uses: citation-file-format/[email protected]
Expand Down
37 changes: 34 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,46 @@
# Changelog

## [unreleased]
## [development]
### Added

### Fixed

## [2.0.0] 2023-04-13
### Added
- Isolate documentation build chain ([#326](https://github.com/GateNLP/gate-teamware/pull/326))
- Add doi to citation file and doi badge ([#332](https://github.com/GateNLP/gate-teamware/pull/332))
- Add logging and alter data type for telemetry ([#333](https://github.com/GateNLP/gate-teamware/pull/333))
- Add more logging when telemetry is switched off and send_telemetry is called ([#337](https://github.com/GateNLP/gate-teamware/pull/337))

### Changed
- Update node 12 actions to newer node 16 versions ([#334](https://github.com/GateNLP/gate-teamware/pull/334))

### Fixed
- Fix for documentation build breaking ([#336](https://github.com/GateNLP/gate-teamware/pull/336))

## [0.4.0] 2023-04-03
### Added
- Privacy policy & Terms & Conditions ([#298](https://github.com/GateNLP/gate-teamware/pull/298))
- Helm chart moved to its own repo ([#299](https://github.com/GateNLP/gate-teamware/pull/299))
- Added a cookies policy page ([#301](https://github.com/GateNLP/gate-teamware/pull/301))
- Dynamic options for checkbox/radio/selector ([#303](https://github.com/GateNLP/gate-teamware/pull/303))
- Simpler install process for new users ([#305](https://github.com/GateNLP/gate-teamware/pull/305))
- Multi-arch build support ([#306](https://github.com/GateNLP/gate-teamware/pull/306))
- Added label to the "Other" issue report, converted bold headings to section headers (h2) instead ([#310](https://github.com/GateNLP/gate-teamware/pull/310))
- Add footer link to repository and add a little more info to about page ([#312](https://github.com/GateNLP/gate-teamware/pull/312))
- Allowing users to be deleted from the system ([#318](https://github.com/GateNLP/gate-teamware/pull/318))
- Update the "making a release" documentation to match latest changes ([#319](https://github.com/GateNLP/gate-teamware/pull/319))

### Fixed
- Fixed t.currentAnnotationTask is null error ([#302](https://github.com/GateNLP/gate-teamware/pull/302))
- Don't redeploy docs on push to master ([#316](https://github.com/GateNLP/gate-teamware/pull/316))
- Admin role should imply manager ([#321](https://github.com/GateNLP/gate-teamware/pull/321))

## [0.3.1]
## [0.3.1] - 2023-02-17
### Fixed
- Missed underscore in documentation link ([#292](https://github.com/GateNLP/gate-teamware/pull/292))

## [0.3.0]
## [0.3.0] - 2023-02-16
### Added
- Telemetry data sending ([#270](https://github.com/GateNLP/gate-teamware/pull/270))
- Upgrade Docker actions ([#272](https://github.com/GateNLP/gate-teamware/pull/272))
Expand Down
7 changes: 6 additions & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ authors:
given-names: Kalina
orcid: https://orcid.org/0000-0001-6152-9600
cff-version: 1.2.0
identifiers:
- description: The collection of archived snapshots of all versions of GATE Teamware
2
type: doi
value: 10.5281/zenodo.7821718
keywords:
- NLP
- machine learning
Expand All @@ -32,4 +37,4 @@ repository-code: https://github.com/GateNLP/gate-teamware
title: GATE Teamware
type: software
url: https://gatenlp.github.io/gate-teamware/
version: 0.3.1
version: 2.0.0
12 changes: 12 additions & 0 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# This is a configuration file for https://caddyserver.com to implement
# a very simple HTTPS reverse proxy in the docker-compose stack.
#
{$DJANGO_ALLOWED_HOSTS}

handle /static/* {
reverse_proxy nginx:80
}
handle * {
reverse_proxy backend:8000
}
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM node:14-buster-slim as nodebuilder
# Node build currently only works on amd64
FROM --platform=linux/amd64 node:14-buster-slim as nodebuilder
RUN mkdir /app/
WORKDIR /app/
COPY package.json package-lock.json ./
Expand All @@ -9,11 +10,12 @@ RUN npm run build


FROM python:3.9-slim-buster AS backend
ARG TARGETARCH
ENV PYTHONUNBUFFERED 1
RUN apt-get --allow-releaseinfo-change update && \
apt-get -y install gcc libpq-dev libmagic1 postgresql-client && \
rm -rf /var/lib/apt/lists/*
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini /sbin/tini
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini-$TARGETARCH /sbin/tini
RUN addgroup --gid 1001 "gate" && \
adduser --disabled-password --gecos "GATE User,,," \
--home /app --ingroup gate --uid 1001 gate && \
Expand Down
Loading

0 comments on commit 427821e

Please sign in to comment.