Skip to content

Commit

Permalink
Rename arches-references to arches-controlled-lists
Browse files Browse the repository at this point in the history
  • Loading branch information
johnatawnclementawn committed Feb 13, 2025
1 parent db55989 commit 89f9cfe
Show file tree
Hide file tree
Showing 99 changed files with 12,587 additions and 12,333 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[run]
source =
arches_references/
arches_controlled_lists/

omit =
*/python?.?/*
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
image: postgis/postgis:13-3.0
env:
POSTGRES_PASSWORD: postgis
POSTGRES_DB: arches_references
POSTGRES_DB: arches_controlled_lists
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
uses: ./.github/actions/build-and-test-branch
with:
secrets: ${{ toJSON(secrets) }}
project-name: 'arches_references'
project-name: 'arches_controlled_lists'
branch-type: 'target'

build_feature_branch:
Expand All @@ -55,7 +55,7 @@ jobs:
image: postgis/postgis:13-3.0
env:
POSTGRES_PASSWORD: postgis
POSTGRES_DB: arches_references
POSTGRES_DB: arches_controlled_lists
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
uses: ./.github/actions/build-and-test-branch
with:
secrets: ${{ toJSON(secrets) }}
project-name: 'arches_references'
project-name: 'arches_controlled_lists'
branch-type: 'feature'

check_frontend_coverage:
Expand Down
18 changes: 9 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
*.log
node_modules
coverage/
arches_references/logs
arches_references/export_deliverables
arches_references/cantaloupe/*
arches_references/staticfiles
arches_references/media/packages
arches_references/media/build/
arches_references/uploadedfiles/*
arches_references/list_item_images
arches_references/settings_local.py
arches_controlled_lists/logs
arches_controlled_lists/export_deliverables
arches_controlled_lists/cantaloupe/*
arches_controlled_lists/staticfiles
arches_controlled_lists/media/packages
arches_controlled_lists/media/build/
arches_controlled_lists/uploadedfiles/*
arches_controlled_lists/list_item_images
arches_controlled_lists/settings_local.py
webpack-stats.json
.vscode/
*.egg-info
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ repos:
name: prettier
entry: npm run prettier:fix
language: system
files: arches_references/src
files: arches_controlled_lists/src
- id: eslint
name: eslint
entry: npm run eslint:fix
language: system
files: arches_references/src
files: arches_controlled_lists/src
- id: typescript
name: typescript
entry: bash -c 'npm run ts:check'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# arches-references
# arches-controlled-lists
Arches application for managing reference data and controlled lists
File renamed without changes.
6 changes: 3 additions & 3 deletions arches_references/apps.py → arches_controlled_lists/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from arches.settings_utils import generate_frontend_configuration


class ArchesReferencesConfig(AppConfig):
name = "arches_references"
verbose_name = "Arches References"
class ArchesControlledListsConfig(AppConfig):
name = "arches_controlled_lists"
verbose_name = "Arches Controlled Lists"
is_arches_application = True

def ready(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
if platform.system().lower() == "windows":
os.environ.setdefault("FORKED_BY_MULTIPROCESSING", "1")

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "arches_references.settings")
app = Celery("arches_references")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "arches_controlled_lists.settings")
app = Celery("arches_controlled_lists")
app.config_from_object("django.conf:settings", namespace="CELERY")
app.autodiscover_tasks()
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from arches.app.models.models import Node
from arches.app.models.graph import GraphValidationError

from arches_references.models import ListItem
from arches_controlled_lists.models import ListItem


@dataclass(kw_only=True)
Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions arches_controlled_lists/hosts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import re
from django_hosts import patterns, host

host_patterns = patterns(
"",
host(
re.sub(r"_", r"-", r"arches_controlled_lists"),
"arches_controlled_lists.urls",
name="arches_controlled_lists",
),
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Value,
Widget,
)
from arches_references.models import List
from arches_controlled_lists.models import List


class Command(BaseCommand):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from arches.management.commands.packages import Command as PackagesCommand
from arches.app.models.system_settings import settings
from arches.app.models import models
from arches_references.models import List, ListItem, ListItemValue
from arches_controlled_lists.models import List, ListItem, ListItemValue
from django.db import transaction


Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import ko from 'knockout';

import { definePreset } from '@primevue/themes';
import { ArchesPreset, DEFAULT_THEME } from '@/arches/themes/default.ts';
import { routes } from '@/arches_references/routes.ts';
import ControlledListManager from '@/arches_references/plugins/ControlledListManager.vue';
import { routes } from '@/arches_controlled_lists/routes.ts';
import ControlledListManager from '@/arches_controlled_lists/plugins/ControlledListManager.vue';
import createVueApplication from 'utils/create-vue-application';
import ControlledListManagerTemplate from 'templates/views/components/plugins/controlled-list-manager.htm';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.14 on 2024-07-11 12:20
# Generated by Django 5.1.2 on 2025-02-12 13:55

import textwrap
import uuid
Expand Down Expand Up @@ -140,7 +140,7 @@ def remove_view_plugin(apps, schema_editor):
("value", models.FileField(upload_to="list_item_images")),
],
options={
"db_table": "arches_references_listitemvalue",
"db_table": "arches_controlled_lists_listitemvalue",
"managed": False,
},
),
Expand All @@ -161,6 +161,16 @@ def remove_view_plugin(apps, schema_editor):
("search_only", models.BooleanField(default=False)),
],
),
migrations.CreateModel(
name="NodeProxy",
fields=[],
options={
"proxy": True,
"indexes": [],
"constraints": [],
},
bases=("models.node",),
),
migrations.CreateModel(
name="ListItem",
fields=[
Expand All @@ -173,7 +183,7 @@ def remove_view_plugin(apps, schema_editor):
serialize=False,
),
),
("uri", models.URLField(blank=True, max_length=2048, null=True)),
("uri", models.URLField(blank=True, max_length=2048)),
(
"sortorder",
models.IntegerField(
Expand All @@ -186,7 +196,7 @@ def remove_view_plugin(apps, schema_editor):
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="list_items",
to="arches_references.list",
to="arches_controlled_lists.list",
),
),
(
Expand All @@ -196,13 +206,13 @@ def remove_view_plugin(apps, schema_editor):
null=True,
on_delete=django.db.models.deletion.CASCADE,
related_name="children",
to="arches_references.listitem",
to="arches_controlled_lists.listitem",
),
),
],
),
migrations.CreateModel(
name="ListItemValue",
name="ListItemImageMetadata",
fields=[
(
"id",
Expand All @@ -213,40 +223,40 @@ def remove_view_plugin(apps, schema_editor):
serialize=False,
),
),
("value", models.CharField(blank=True, max_length=1024)),
(
"metadata_type",
models.CharField(
choices=[
("title", "Title"),
("desc", "Description"),
("attr", "Attribution"),
("alt", "Alternative text"),
],
max_length=5,
),
),
("value", models.CharField(max_length=2048)),
(
"language",
models.ForeignKey(
blank=True,
db_column="languageid",
null=True,
on_delete=django.db.models.deletion.PROTECT,
to="models.language",
to_field="code",
),
),
(
"list_item",
"list_item_image",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="list_item_values",
to="arches_references.listitem",
),
),
(
"valuetype",
models.ForeignKey(
limit_choices_to=models.Q(
("category__in", ("label", "image", "note"))
),
on_delete=django.db.models.deletion.PROTECT,
to="models.dvaluetype",
related_name="list_item_image_metadata",
to="arches_controlled_lists.listitemimage",
),
),
],
),
migrations.CreateModel(
name="ListItemImageMetadata",
name="ListItemValue",
fields=[
(
"id",
Expand All @@ -257,38 +267,63 @@ def remove_view_plugin(apps, schema_editor):
serialize=False,
),
),
(
"metadata_type",
models.CharField(
choices=[
("title", "Title"),
("desc", "Description"),
("attr", "Attribution"),
("alt", "Alternative text"),
],
max_length=5,
),
),
("value", models.CharField(max_length=2048)),
("value", models.CharField(blank=True, max_length=1024)),
(
"language",
models.ForeignKey(
blank=True,
db_column="languageid",
null=True,
on_delete=django.db.models.deletion.PROTECT,
to="models.language",
to_field="code",
),
),
(
"list_item_image",
"list_item",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="list_item_image_metadata",
to="arches_references.listitemimage",
related_name="list_item_values",
to="arches_controlled_lists.listitem",
),
),
(
"valuetype",
models.ForeignKey(
limit_choices_to=models.Q(
("category__in", ("label", "image", "note"))
),
on_delete=django.db.models.deletion.PROTECT,
to="models.dvaluetype",
),
),
],
),
migrations.AddConstraint(
model_name="listitem",
constraint=models.UniqueConstraint(
deferrable=django.db.models.constraints.Deferrable["DEFERRED"],
fields=("list", "sortorder"),
name="unique_list_sortorder",
violation_error_message="All items in this list must have distinct sort orders.",
),
),
migrations.AddConstraint(
model_name="listitem",
constraint=models.UniqueConstraint(
fields=("list", "uri"),
name="unique_list_uri",
violation_error_message="All items in this list must have distinct URIs.",
),
),
migrations.AddConstraint(
model_name="listitemimagemetadata",
constraint=models.UniqueConstraint(
fields=("list_item_image", "metadata_type", "language"),
name="unique_image_metadata_valuetype_language",
violation_error_message="Only one metadata entry per language and metadata type is permitted.",
),
),
migrations.AddConstraint(
model_name="listitemvalue",
constraint=models.UniqueConstraint(
Expand Down Expand Up @@ -318,29 +353,4 @@ def remove_view_plugin(apps, schema_editor):
violation_error_message="Item values must be associated with a language.",
),
),
migrations.AddConstraint(
model_name="listitemimagemetadata",
constraint=models.UniqueConstraint(
fields=("list_item_image", "metadata_type", "language"),
name="unique_image_metadata_valuetype_language",
violation_error_message="Only one metadata entry per language and metadata type is permitted.",
),
),
migrations.AddConstraint(
model_name="listitem",
constraint=models.UniqueConstraint(
deferrable=django.db.models.constraints.Deferrable["DEFERRED"],
fields=("list", "sortorder"),
name="unique_list_sortorder",
violation_error_message="All items in this list must have distinct sort orders.",
),
),
migrations.AddConstraint(
model_name="listitem",
constraint=models.UniqueConstraint(
fields=("list", "uri"),
name="unique_list_uri",
violation_error_message="All items in this list must have distinct URIs.",
),
),
]
Loading

0 comments on commit 89f9cfe

Please sign in to comment.