Skip to content

Commit

Permalink
Merge branch 'release/5.15.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
JeltevanBoheemen committed Dec 10, 2024
2 parents 013a573 + 8d0aaba commit ffc81e5
Show file tree
Hide file tree
Showing 135 changed files with 5,942 additions and 1,308 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/backend-build-and-push.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/backend-build-and-test.yml

This file was deleted.

9 changes: 1 addition & 8 deletions .github/workflows/backend-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@ name: Backend unit tests

on:
workflow_dispatch:
push:
branches:
- 'develop'
- 'master'
- 'feature/**'
- 'bugfix/**'
- 'hotfix/**'
- 'release/**'
pull_request:
paths:
- 'backend/**'
- '.github/workflows/backend-test.yml'
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/frontend-build-and-push.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/frontend-build-and-test.yml

This file was deleted.

10 changes: 1 addition & 9 deletions .github/workflows/frontend-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@ name: Frontend unit tests

on:
workflow_dispatch:
push:
branches:
- 'develop'
- 'master'
- 'feature/**'
- 'bugfix/**'
- 'hotfix/**'
- 'release/**'
- 'dependabot/**'
pull_request:
paths:
- 'frontend/**'
- '.github/workflows/frontend-test.yml'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/scheduled-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: frontend/.
file: frontend/Dockerfile.base
push: true
tags: ghcr.io/centrefordigitalhumanities/ianalyzer-frontend:latest
cache-from: type=registry,ref=ghcr.io/centrefordigitalhumanities/ianalyzer-frontend:latest
Expand All @@ -33,6 +34,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: backend/.
file: backend/Dockerfile.base
push: true
tags: ghcr.io/centrefordigitalhumanities/ianalyzer-backend:latest
cache-from: type=registry,ref=ghcr.io/centrefordigitalhumanities/ianalyzer-backend:latest
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ keywords:
- elasticsearch
- natural language processing
license: MIT
version: 5.14.1
date-released: '2024-11-19'
version: 5.15.0
date-released: '2024-12-09'
8 changes: 1 addition & 7 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# Base image
FROM docker.io/library/python:3.9
# Setting this means stdout and stderr streams are sent to terminal in real time
ENV PYTHONUNBUFFERED 1
# Get required libraries for xmlsec
RUN apt-get -y update && apt-get -y upgrade
RUN apt-get install -y pkg-config libxml2-dev libxmlsec1-dev libxmlsec1-openssl default-libmysqlclient-dev
FROM ghcr.io/centrefordigitalhumanities/ianalyzer-backend:latest

RUN pip install --upgrade pip
# make a directory in the container
Expand Down
7 changes: 7 additions & 0 deletions backend/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Base image
FROM docker.io/library/python:3.9 AS base
# Setting this means stdout and stderr streams are sent to terminal in real time
ENV PYTHONUNBUFFERED 1
# Get required libraries for xmlsec
RUN apt-get -y update && apt-get -y upgrade
RUN apt-get install -y pkg-config libxml2-dev libxmlsec1-dev libxmlsec1-openssl default-libmysqlclient-dev
9 changes: 7 additions & 2 deletions backend/addcorpus/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ def show_warning_message(request):


class CorpusAdmin(admin.ModelAdmin):
readonly_fields = ['configuration', 'ready_to_index', 'ready_to_publish']
fields = ['name', 'groups', 'configuration', 'has_python_definition', 'ready_to_index', 'ready_to_publish', 'active']
readonly_fields = [
'configuration', 'ready_to_index', 'ready_to_publish', 'date_created',
]
fields = [
'name', 'groups', 'configuration', 'date_created', 'has_python_definition',
'ready_to_index', 'ready_to_publish', 'active',
]
list_display = ['name', 'active']
list_filter = ['groups', 'active']

Expand Down
1 change: 1 addition & 0 deletions backend/addcorpus/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class MappingType(Enum):
FLOAT = 'float'
BOOLEAN = 'boolean'
GEO_POINT = 'geo_point'
ANNOTATED_TEXT = 'annotated_text'


class VisualizationType(Enum):
Expand Down
4 changes: 4 additions & 0 deletions backend/addcorpus/es_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,7 @@ def bool_mapping():

def geo_mapping():
return {'type': 'geo_point'}


def annotated_text_mapping():
return {'type': 'annotated_text'}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,29 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='corpusdocumentationpage',
name='type',
field=models.CharField(choices=[('general', 'General information'), ('citation', 'Citation'), ('license', 'License'), ('terms_of_service', 'Terms of service'), ('wordmodels', 'Word models')], default='general', help_text='the type of documentation', max_length=16),
field=models.CharField(
choices=[
('general', 'General information'),
('citation', 'Citation'),
('license', 'License'),
('terms_of_service', 'Terms of service'),
('wordmodels', 'Word models'),
],
default='general',
help_text='the type of documentation',
max_length=16,
),
),
migrations.AlterField(
model_name='field',
name='name',
field=models.SlugField(help_text='internal name for the field', max_length=126, validators=[addcorpus.validation.creation.validate_name_is_not_a_route_parameter, addcorpus.validation.creation.validate_name_has_no_ner_suffix]),
field=models.SlugField(
help_text='internal name for the field',
max_length=126,
validators=[
addcorpus.validation.creation.validate_name_is_not_a_route_parameter,
addcorpus.validation.creation.validate_ner_slug,
],
),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 4.2.15 on 2024-11-06 08:33

import addcorpus.validation.creation
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('addcorpus', '0023_alter_corpusdocumentationpage_type_alter_field_name'),
]

operations = [
migrations.AlterField(
model_name='field',
name='name',
field=models.SlugField(help_text='internal name for the field', max_length=126, validators=[addcorpus.validation.creation.validate_name_is_not_a_route_parameter]),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 4.2.16 on 2024-11-26 09:40

import addcorpus.validation.creation
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('addcorpus', '0024_remove_field_name_ner_validator'),
]

operations = [
migrations.AlterModelOptions(
name='field',
options={'ordering': ['position']},
),
migrations.AddField(
model_name='field',
name='position',
field=models.IntegerField(blank=True, help_text="Field's position within the configuration (order)", null=True),
),
migrations.AlterField(
model_name='field',
name='name',
field=models.CharField(help_text='internal name for the field', max_length=126, validators=[addcorpus.validation.creation.validate_name_is_not_a_route_parameter, addcorpus.validation.creation.validate_field_name_permissible_characters]),
),
]
20 changes: 20 additions & 0 deletions backend/addcorpus/migrations/0026_corpus_date_created.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 4.2.16 on 2024-12-02 13:50

from django.db import migrations, models
import django.utils.timezone


class Migration(migrations.Migration):

dependencies = [
('addcorpus', '0025_alter_field_options_field_position_alter_field_name'),
]

operations = [
migrations.AddField(
model_name='corpus',
name='date_created',
field=models.DateField(auto_now_add=True, default=django.utils.timezone.now, help_text='date on which the corpus was added to the database'),
preserve_default=False,
),
]
Loading

0 comments on commit ffc81e5

Please sign in to comment.