Skip to content

Commit 5f87047

Browse files
authored
Add Model Lineage Analysis Tool (#71)
* add model lineage script * incorporate to make commands * adjust model tree logic * add docstring * format * change model tag pattern * Update CHANGELOG for version 2.1.0 Added a new feature for model lineage analysis.
1 parent a1765e1 commit 5f87047

File tree

3 files changed

+396
-0
lines changed

3 files changed

+396
-0
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
**2.1.0 - 12/16/2025**
2+
3+
- Feature: Add model lineage analysis utility
4+
15
**2.0.13 - 11/21/2025**
26

37
- Bugfix: stop skipping scheduled builds if the last commit was CHANGELOG-only

resources/makefiles/base.mk

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ help: # Curated help message
4242
echo "install-upstream-deps Install upstream dependencies"; \
4343
echo "format Format code (isort and black)"; \
4444
echo "manual-deploy-artifactory Deploy package; only use if Jenkins deploy fails"; \
45+
echo "model <command> [args] Run model lineage tool (e.g., make model tree,"; \
46+
echo " make model info v24.0)"; \
4547
echo; \
4648
echo "====================="; \
4749
echo "Jenkins build targets"; \
@@ -227,3 +229,18 @@ manual-deploy-artifactory: # Deploy package; only use if Jenkins deploy fails
227229
make build-package
228230
make tag-version
229231
make deploy-package-artifactory
232+
233+
# Model lineage tool - analyze git tag relationships
234+
# Usage: make model <command> [args]
235+
# Commands: list, base, contains, ancestors, check, matrix, tree, info, help
236+
MODEL_LINEAGE_SCRIPT := $(UTILS_DIR)resources/scripts/model_lineage.sh
237+
238+
# If 'model' is the first goal, capture remaining args and prevent Make from processing them
239+
ifeq (model,$(firstword $(MAKECMDGOALS)))
240+
MODEL_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
241+
$(eval $(MODEL_ARGS):;@:)
242+
endif
243+
244+
.PHONY: model
245+
model: # Run model lineage tool (e.g., make model tree, make model info v24.0)
246+
@bash $(MODEL_LINEAGE_SCRIPT) $(MODEL_ARGS)

0 commit comments

Comments
 (0)