Skip to content

filter ingestor array on controlled_vocabulary list#1292

Merged
fbacall merged 2 commits into
ElixirTeSS:masterfrom
DaanVanVugt:feature/filter_controlled_vocabulary
May 5, 2026
Merged

filter ingestor array on controlled_vocabulary list#1292
fbacall merged 2 commits into
ElixirTeSS:masterfrom
DaanVanVugt:feature/filter_controlled_vocabulary

Conversation

@mikesndrs

@mikesndrs mikesndrs commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • I have read and followed the CONTRIBUTING guide.
  • I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree to license it to the TeSS codebase under the BSD license.

Copilot AI 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.

Pull request overview

This PR extends the ingestor pipeline to optionally normalize certain array fields (e.g., target_audience, keywords) against a controlled vocabulary mapping, controlled via a new feature.controlled_vocabulary_vars setting.

Changes:

  • Refactors auto-parsing logic into handle_auto_parsing and reuses shared mapping-loading via get_mapping.
  • Adds handle_controlled_vocabulary and applies it to both event and material ingestion.
  • Adds unit tests validating controlled-vocabulary behavior when the feature flag is enabled/disabled.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
test/unit/ingestors/ingestor_test.rb Adds coverage for controlled-vocabulary normalization behavior.
lib/ingestors/material_ingestion.rb Routes material ingestion through the new helper methods.
lib/ingestors/event_ingestion.rb Routes event ingestion through the new helper methods.
lib/ingestors/auto_parsing.rb Introduces shared mapping loader + controlled vocabulary normalization helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/ingestors/auto_parsing.rb
Comment thread lib/ingestors/auto_parsing.rb
@fbacall
fbacall merged commit 6235c88 into ElixirTeSS:master May 5, 2026
7 checks passed
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.

3 participants