Skip to content

Conversation

@amc-corey-cox
Copy link
Collaborator

Summary

  • Script args now default to empty string, making them optional
  • Makefile only passes args when values are set

Fixes #230

Test plan

  • All 65 tests pass
  • --help shows args as optional (no [required] marker)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
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 makes the output_prefix and output_postfix parameters optional in the data mapping script by providing empty string defaults, and updates the Makefile to conditionally pass these arguments only when values are set. This resolves issue #230 where the Makefile continued to treat these parameters as required even after the script was updated.

Changes:

  • Added default empty string values to output_prefix and output_postfix parameters in the Python script
  • Updated Makefile to conditionally include the prefix/postfix arguments only when the corresponding variables are non-empty

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/dm_bip/map_data/map_data.py Added = "" default values to make output_prefix and output_postfix optional parameters
pipeline.Makefile Replaced unconditional argument passing with Make conditionals that only include --output_prefix and --output_postfix when the variables are set

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

@amc-corey-cox
Copy link
Collaborator Author

Added tests for all prefix/postfix combinations:

  • test_process_entities_no_prefix_no_postfix - verifies Person.jsonl output
  • test_process_entities_prefix_only - verifies test-Person.jsonl output
  • test_process_entities_postfix_only - verifies Person-v1.jsonl output

All 68 tests pass.

@amc-corey-cox
Copy link
Collaborator Author

Verified Makefile conditional args with make -n (dry-run):

Config Args Passed
Neither set None ✓
DM_MAPPING_PREFIX=myprefix --output_prefix myprefix only ✓
DM_MAPPING_POSTFIX=v1 --output_postfix "v1" only ✓
Both set Both args ✓

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.

Tweak prefix and postfix in the Makefile

2 participants