Skip to content

Commit

Permalink
Merge pull request #153 from CentreForDigitalHumanities/feature/updat…
Browse files Browse the repository at this point in the history
…e-labels-and-mention-levels

Feature/update labels and mention levels
  • Loading branch information
lukavdplas authored Oct 24, 2024
2 parents 650850a + 56476b1 commit ccdc41a
Show file tree
Hide file tree
Showing 10 changed files with 172 additions and 7 deletions.
1 change: 1 addition & 0 deletions backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ class Meta:
class SourceMention(models.TextChoices):
DIRECT = "direct", "directly mentioned"
IMPLIED = "implied", "implied"
UP_FOR_DEBATE = "up_for_debate", "up for debate"


class EntityDescription(Named, models.Model):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Generated by Django 4.2.7 on 2024-10-23 12:38

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('event', '0027_alter_episode_agents_alter_episode_gifts_and_more'),
]

operations = [
migrations.AlterField(
model_name='episode',
name='source_mention',
field=models.CharField(blank=True, choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], help_text='How is this entity presented in the text?', max_length=32),
),
migrations.AlterField(
model_name='episodeagent',
name='source_mention',
field=models.CharField(choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], default='direct', help_text='How is this information presented in the text?', max_length=32),
),
migrations.AlterField(
model_name='episodegift',
name='source_mention',
field=models.CharField(choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], default='direct', help_text='How is this information presented in the text?', max_length=32),
),
migrations.AlterField(
model_name='episodeletter',
name='source_mention',
field=models.CharField(choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], default='direct', help_text='How is this information presented in the text?', max_length=32),
),
migrations.AlterField(
model_name='episodespace',
name='source_mention',
field=models.CharField(choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], default='direct', help_text='How is this information presented in the text?', max_length=32),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by Django 4.2.7 on 2024-10-23 12:38

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('letter', '0020_remove_giftdescription_designators_and_more'),
]

operations = [
migrations.AlterField(
model_name='giftdescription',
name='source_mention',
field=models.CharField(blank=True, choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], help_text='How is this entity presented in the text?', max_length=32),
),
migrations.AlterField(
model_name='giftdescriptioncategory',
name='source_mention',
field=models.CharField(choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], default='direct', help_text='How is this information presented in the text?', max_length=32),
),
migrations.AlterField(
model_name='letterdescription',
name='source_mention',
field=models.CharField(blank=True, choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], help_text='How is this entity presented in the text?', max_length=32),
),
migrations.AlterField(
model_name='letterdescriptioncategory',
name='source_mention',
field=models.CharField(choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], default='direct', help_text='How is this information presented in the text?', max_length=32),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 4.2.7 on 2024-10-23 12:38

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('person', '0023_remove_agentdescription_designators'),
]

operations = [
migrations.AlterField(
model_name='agentdescription',
name='source_mention',
field=models.CharField(blank=True, choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], help_text='How is this entity presented in the text?', max_length=32),
),
migrations.AlterField(
model_name='agentdescriptiongender',
name='source_mention',
field=models.CharField(choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], default='direct', help_text='How is this information presented in the text?', max_length=32),
),
migrations.AlterField(
model_name='agentdescriptionlocation',
name='source_mention',
field=models.CharField(choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], default='direct', help_text='How is this information presented in the text?', max_length=32),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by Django 4.2.7 on 2024-10-23 12:38

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('space', '0020_remove_spacedescription_designators'),
]

operations = [
migrations.AlterField(
model_name='regionfield',
name='source_mention',
field=models.CharField(choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], default='direct', help_text='How is this information presented in the text?', max_length=32),
),
migrations.AlterField(
model_name='settlementfield',
name='source_mention',
field=models.CharField(choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], default='direct', help_text='How is this information presented in the text?', max_length=32),
),
migrations.AlterField(
model_name='spacedescription',
name='source_mention',
field=models.CharField(blank=True, choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], help_text='How is this entity presented in the text?', max_length=32),
),
migrations.AlterField(
model_name='structurefield',
name='source_mention',
field=models.CharField(choices=[('direct', 'directly mentioned'), ('implied', 'implied'), ('up_for_debate', 'up for debate')], default='direct', help_text='How is this information presented in the text?', max_length=32),
),
]
23 changes: 17 additions & 6 deletions frontend/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,9 @@ export enum EventEpisodeSourceMentionChoices {
/** directly mentioned */
Direct = 'DIRECT',
/** implied */
Implied = 'IMPLIED'
Implied = 'IMPLIED',
/** up for debate */
UpForDebate = 'UP_FOR_DEBATE'
}

/** An enumeration. */
Expand Down Expand Up @@ -419,15 +421,19 @@ export enum LetterGiftDescriptionSourceMentionChoices {
/** directly mentioned */
Direct = 'DIRECT',
/** implied */
Implied = 'IMPLIED'
Implied = 'IMPLIED',
/** up for debate */
UpForDebate = 'UP_FOR_DEBATE'
}

/** An enumeration. */
export enum LetterLetterDescriptionSourceMentionChoices {
/** directly mentioned */
Direct = 'DIRECT',
/** implied */
Implied = 'IMPLIED'
Implied = 'IMPLIED',
/** up for debate */
UpForDebate = 'UP_FOR_DEBATE'
}

/** A simple wrapper around Graphene-Django's ErrorType with a constructor. */
Expand Down Expand Up @@ -580,7 +586,9 @@ export enum PersonAgentDescriptionSourceMentionChoices {
/** directly mentioned */
Direct = 'DIRECT',
/** implied */
Implied = 'IMPLIED'
Implied = 'IMPLIED',
/** up for debate */
UpForDebate = 'UP_FOR_DEBATE'
}

export type PersonDateOfBirthType = {
Expand Down Expand Up @@ -784,7 +792,8 @@ export type SourceContentsDateType = {
/** An enumeration. */
export enum SourceMention {
Direct = 'DIRECT',
Implied = 'IMPLIED'
Implied = 'IMPLIED',
UpForDebate = 'UP_FOR_DEBATE'
}

export type SourceType = {
Expand Down Expand Up @@ -865,7 +874,9 @@ export enum SpaceSpaceDescriptionSourceMentionChoices {
/** directly mentioned */
Direct = 'DIRECT',
/** implied */
Implied = 'IMPLIED'
Implied = 'IMPLIED',
/** up for debate */
UpForDebate = 'UP_FOR_DEBATE'
}

/** An enumeration. */
Expand Down
16 changes: 16 additions & 0 deletions frontend/generated/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ enum EventEpisodeSourceMentionChoices {

"""implied"""
IMPLIED

"""up for debate"""
UP_FOR_DEBATE
}

"""An enumeration."""
Expand Down Expand Up @@ -406,6 +409,9 @@ enum LetterGiftDescriptionSourceMentionChoices {

"""implied"""
IMPLIED

"""up for debate"""
UP_FOR_DEBATE
}

"""An enumeration."""
Expand All @@ -415,6 +421,9 @@ enum LetterLetterDescriptionSourceMentionChoices {

"""implied"""
IMPLIED

"""up for debate"""
UP_FOR_DEBATE
}

"""
Expand Down Expand Up @@ -457,6 +466,9 @@ enum PersonAgentDescriptionSourceMentionChoices {

"""implied"""
IMPLIED

"""up for debate"""
UP_FOR_DEBATE
}

type PersonDateOfBirthType {
Expand Down Expand Up @@ -613,6 +625,7 @@ type SourceContentsDateType {
enum SourceMention {
DIRECT
IMPLIED
UP_FOR_DEBATE
}

type SourceType {
Expand Down Expand Up @@ -709,6 +722,9 @@ enum SpaceSpaceDescriptionSourceMentionChoices {

"""implied"""
IMPLIED

"""up for debate"""
UP_FOR_DEBATE
}

"""An enumeration."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<legend>Designators</legend>
<p class="form-text">
What (latin) terminology is used to describe the actions in the passage?
List key nouns and verbs in nominative or infinitive form (e.g. epistula,
missus, dirigere).
</p>
<lc-designators-control [formControl]="form.controls.designators" />
</fieldset>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
<p class="form-label">Designators</p>
<p class="form-text">
What terminology is used in the episode to refer to this {{entityName}}?
Only include terms that are unusual, or significantly add to the
understanding of the episode.
</p>
<lc-designators-control [formControl]="form.controls.designators" />
</div>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/app/data-entry/shared/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { BehaviorSubject } from "rxjs";

export const sourceMentionSelectOptions = (): SelectOptions<SourceMention> => [
{ value: SourceMention.Direct, label: 'Directly mentioned' },
{ value: SourceMention.Implied, label: 'Implied' }
{ value: SourceMention.Implied, label: 'Implied' },
{ value: SourceMention.UpForDebate, label: 'Up for debate' },
];

export const formStatusSubject = () => new BehaviorSubject<FormStatus>('idle');
Expand Down

0 comments on commit ccdc41a

Please sign in to comment.