All notable changes to this project will be documented in this file.
- Added the
find-depcommand for finding files that import a specific dependency.- Added
--treeoutput mode. - Added
--showlinesto display the exact import lines. - Added JSON output support.
- Added
- Added a CLI dispatcher architecture to separate command dispatching from argument parsing and analyzer execution.
- Added dedicated CLI option classes for translating command-line arguments into analyzer arguments.
- Added command handler classes for:
depsstatsfind-dep
- Added validation for incompatible CLI arguments, including:
--reverserequires--tree.--reversecannot be combined with--unused.--showlinesrequires--tree.
- Added dedicated CLI exceptions for unmapped commands, invalid analyzer functions, and invalid arguments.
- Added support for dependency lookup through the analyzer API, including finding dependency instances and displaying/exporting files containing a dependency.
- Added support for displaying and exporting dependency file trees with optional import line information.
- Consolidated the previous
file-tree,dep-tree, andunused-importsCLI commands into thedepscommand using options:--tree--reverse--unused
- Updated the CLI to use the new dispatcher and command-handler architecture.
- Refactored CLI dependency type filtering into a dedicated
DepFilteroption. - Renamed and aligned dependency tree analyzer APIs around:
filedep_treedepfiles_tree
- Updated imported-name tracking in the AST visitor from
importstoimport_names. - Updated CLI and API documentation to reflect the new command structure and analyzer APIs.
- Updated CLI documentation for the consolidated
depscommand and newfind-depcommand. - Updated API documentation with the new dependency lookup, tree, filtering, and unused-import APIs.
- Added examples for dependency filtering, dependency lookup, tree output, JSON export, and showing import lines.
- Updated imported-name visitor tests to use the new
import_namesattribute. - Updated visitor assertions to reflect the renamed import tracking structure.
- Add the
--topn(-tn) option to thestatscommand for displaying the top N dependencies.
- Refactor dependency type counting.
- Update the statistics output to display a configurable number of top dependencies.
- Add dependency statistics with file, import, and dependency metrics.
- Add the
statsCLI command. - Add the
StatsAPI for programmatic access to analysis metrics. - Add dedicated CLI and Python API documentation.
- Add tests for dependency statistics and analyzer functionality.
- Rename
scan()toanalyze()in the Python API. - Improve dependency analysis to collect project statistics.
- Update the README with a simplified quick start and links to dedicated documentation.
- Add comprehensive CLI documentation.
- Add comprehensive Python API documentation.
- Add support for detecting unused imports.
- Add the
unused-importsCLI command to display unused imports by file.
- Enhance AST analysis to track imported symbols and their usage.
- Improve dependency analysis by recording import metadata and usage information.
- Document the
unused-importscommand in the README.
- Detect and classify local dependencies imported using relative imports.
- Add support for returning JSON output as a string when no output file is specified.
- Update dependency scanning to preserve import level information.
- Improve dependency classification by distinguishing standard library, third-party, and local modules.
- Enhance the dependency visitor to capture import levels for both
importandfrom ... importstatements. - Add examples to the README demonstrating JSON export and filtered JSON output.
- Correctly identify local dependencies imported via relative imports.
- Handle module-less relative import statements (for example,
from . import module) during dependency analysis.
- Update the README with JSON export examples.
- Rename the
packagescommand todeps. - Update the version badge to 0.0.6.
- Support exporting dependency lists as JSON.
- Support exporting file-dependency trees as JSON.
- Support exporting dependency-file trees as JSON.
- Add
-o/--outputCLI option to write command output to a file.
- Rename the
packagescommand todeps. - Rename package-related APIs to use dependency instead of package.
- Refactor CLI command handling to use a generic command dispatcher.
- Refactor dependency type parsing into a dedicated helper function.
- Improve CLI error handling by replacing abrupt exits with custom exceptions.
- Add centralized exception handling for command execution.
- Remove the obsolete
analyzer_bak.pybackup file.
- Add support for loading ignored directories from a text file using
- the
--ignore-file(-I) CLI option. - Add
DepAnalyzer.ignore_from_file()to populate the ignore list from a file. - Add
DepAnalyzer.ignorelistproperty to expose the current ignore list.
- Fix dependency type filtering in the CLI so the selected dependency types are applied correctly.
- Bump package version to 0.0.4.
- Export version from digdep to allow digdep.version
- Unterminated string in argparser
- Initial release of DigDep.
- Recursive scanning of Python projects.
- Package listing (
packagescommand). - File → Dependency tree (
file-treecommand). - Dependency → File tree (
dep-treecommand). - Dependency filtering by type:
- Standard library
- Third-party
- Local
- Unknown
- Ignore files and directories during project scanning.
- CLI interface with built-in help and version information.
- Library API for integrating DigDep into Python applications.