Move files into the organization required#5
Open
Kaftow wants to merge 4 commits into
Open
Conversation
Author
|
The CLI remains the entry point, but the reusable tagging logic now lives in a package-style layout:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the subject migration pipeline by extracting the shared classification logic out of
scripts/migrate_subjects.pyinto reusable modules.What changed
core/json_loader.pyto centralize loading of mapping JSON files fromscripts/mappings/rule_engine/normalization.pyfor shared normalization helpers and regex-based detection of reading levels and classification codescore/subject_classifier.pyas the reusable core for subject classification at both subject and work levelscripts/migrate_subjects.pyso it acts primarily as the CLI / orchestration layer instead of owning all classification logicscripts/README.mdto document the new internal module structureWhy
Previously, the migration script contained mapping loading, normalization utilities, and classification logic all in one file. This made the code harder to reuse, test, and extend. By moving those responsibilities into dedicated modules, the branch makes the classifier easier to maintain and prepares the codebase for reuse outside the CLI script.
Impact
This is primarily a structural refactor. The intended classification behavior remains the same, but the implementation is now split into clearer layers: