Skip to content

External domain datatype - #12730

Open
johnatawnclementawn wants to merge 8 commits into
dev/8.2.xfrom
jmc/external-domain-datatype
Open

johnatawnclementawn wants to merge 8 commits into
dev/8.2.xfrom
jmc/external-domain-datatype

Conversation

@johnatawnclementawn

@johnatawnclementawn johnatawnclementawn commented Apr 28, 2026 •

Copy link
Copy Markdown
Member

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of Change

The underlying use case of the Language datatype is to use values from a database table as tile data without having to ETL those data into controlled lists or concepts (and keep them in sync). This PR proposes the External Domain datatype to provide baseline functionality for that use case.

Rather than a concrete datatype, External Domain is an abstract base class. Subclasses implement at minimum, four methods: get_options_queryset(), get_option_id(), get_option_display(), and get_lookup_filter() and can override the traditional Arches datatype methods like validate, transform_value_for_tile, append_to_document, and append_search_filters.

Issues Solved

Closes #

Checklist

  • I targeted one of these branches:
    • dev/8.2.x (under development): features, bugfixes not covered below
    • dev/8.1.x (main support): regressions, crashing bugs, security issues, major bugs in new features
    • dev/7.6.x (extended support): major security issues, data loss issues
  • I added a changelog in arches/releases
  • I submitted a PR to arches-docs (if appropriate)
  • Unit tests pass locally with my changes
  • I added tests that prove my fix is effective or that my feature works
  • My test fails on the target branch

Accessibility Checklist

Developer Guide

Topic Changed Retested
Color contrast
Form fields
Headings
Links
Keyboard
Responsive Design
HTML validation
Screen reader

Ticket Background

  • Sponsored by:
  • Found by: @
  • Tested by: @
  • Designed by: @

Further comments

@johnatawnclementawn
johnatawnclementawn force-pushed the jmc/external-domain-datatype branch from 75d5e9b to 1e50174 Compare May 19, 2026 16:48
@chrabyrd
chrabyrd self-requested a review May 19, 2026 16:50
@johnatawnclementawn
johnatawnclementawn force-pushed the jmc/external-domain-datatype branch from 1e50174 to 64cf053 Compare May 19, 2026 17:01
johnatawnclementawn added a commit that referenced this pull request May 20, 2026
@johnatawnclementawn
johnatawnclementawn marked this pull request as ready for review May 20, 2026 14:52
@johnatawnclementawn

Copy link
Copy Markdown
Member Author

Still open to naming changes... other option I considered Table-Backed Domain

@chrabyrd chrabyrd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks great! 2 minor tweaks but this is a nice pattern 👍

Comment thread arches/app/datatypes/core/__init__.py Resolved
@johnatawnclementawn
johnatawnclementawn force-pushed the jmc/external-domain-datatype branch from b20c7d1 to e80d357 Compare November 24, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants