Skip to content

fix: project discovery robustness - #51

Merged
SizzleUnrlsd merged 2 commits into
mainfrom
fix/project-discovery
Sep 4, 2026
Merged

SizzleUnrlsd merged 2 commits into
mainfrom
fix/project-discovery

Conversation

@SizzleUnrlsd

Copy link
Copy Markdown
Contributor

Summary

Robustness fixes found by running the analyzer on real repositories.

  • Tests first (test: define discovery of virtual environments and non-identifier module names), fixes follow.
  • discover_sources skips any virtual environment, recognised by the pyvenv.cfg the venv module writes at its root, whatever the directory is called (env/, tools/), on top of the fixed list of tooling directories. A Windows venv named env/ with 2,570 files was being analysed.
  • project_symbol tolerates module and package names that are not Python identifiers (network-topologer, docutils-script.py): invalid characters become underscores and a leading digit gets a prefix, so the project index stays valid instead of the engine raising ValueError and aborting the whole run. Such modules cannot be imported by that name anyway, so nothing else resolves to them.

Found on the Pylinkit and network-topologer repositories; both now analyse to completion.

@SizzleUnrlsd SizzleUnrlsd self-assigned this Sep 4, 2026
@SizzleUnrlsd
SizzleUnrlsd merged commit 8fb18eb into main Sep 4, 2026
6 checks passed
@SizzleUnrlsd
SizzleUnrlsd deleted the fix/project-discovery branch September 4, 2026 03:26
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.

1 participant