Add dependency analysis tooling to identify unused Python files and folders#241
Draft
Add dependency analysis tooling to identify unused Python files and folders#241
Conversation
Co-authored-by: MrIbrahem <26301308+MrIbrahem@users.noreply.github.com>
Co-authored-by: MrIbrahem <26301308+MrIbrahem@users.noreply.github.com>
Co-authored-by: MrIbrahem <26301308+MrIbrahem@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Analyze code repository for unused files and folders
Add dependency analysis tooling to identify unused Python files and folders
Feb 2, 2026
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.
Analyzes repository to identify code never imported from 23 defined entry points. Found 214 unused files (77.3%) and 28 completely unused folders across 277 total Python files.
Implementation
analyze_unused_files.py- AST-based dependency tracerrun_analysis.py- Quick runner showing summary statisticsDocumentation
UNUSED_FILES_ANALYSIS.md- Methodology, recommendations, limitationsANALYSIS_SUMMARY.md- Executive summary with key findingsKey Findings
Top unused folders:
md_core_helps/one_time/*- Archived project folders (WHOem, niosh, priorviews)copy_text/,fix_use/,md_core/stats/- Unused bot/utility modules*/tests/folders for unused modulesUsage rate: 63 files used (22.7%), 214 unused (77.3%)
Usage
Generated reports (
unused_files_report.{txt,json}) excluded via.gitignore- regenerated on each run.Notes
mass/radio/cases_in_ids.py,mass/radio/st3/count.pynewupdater/folder as requestedimportlib,exec) not detected by static analysis💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.