Skip to content

filter ingestor array on controlled_vocabulary list#1292

Open
mikesndrs wants to merge 2 commits intoElixirTeSS:masterfrom
DaanVanVugt:feature/filter_controlled_vocabulary
Open

filter ingestor array on controlled_vocabulary list#1292
mikesndrs wants to merge 2 commits intoElixirTeSS:masterfrom
DaanVanVugt:feature/filter_controlled_vocabulary

Conversation

@mikesndrs
Copy link
Copy Markdown
Contributor

@mikesndrs mikesndrs commented Apr 24, 2026

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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
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