Skip to content

fix: [#257] Resolve profile execute to cwd instead of package install dir #263

Merged
ApusBerliozi merged 2 commits into
pyfenn:mainfrom
hendo-21:fix/profile-cwd-resolution
Jul 17, 2026
Merged

fix: [#257] Resolve profile execute to cwd instead of package install dir #263
ApusBerliozi merged 2 commits into
pyfenn:mainfrom
hendo-21:fix/profile-cwd-resolution

Conversation

@hendo-21

Copy link
Copy Markdown
Contributor

Description

Fixes #257.

  • Resolves the template path used by profile.execute() against cwd instead of Path(__file__).resolve().parents[1] (the package install dir), so it can locate templates pulled via fenn pull.
  • Removes the template.parent != ROOT guard to allow profiling of templates nested within cwd.
  • Updates test_profile_execute_generates_profile_and_report to parametrize over flat and nested templates; retains original coverage for the non-nested case.
  • Adds a regression test verifying profile.execute() raises SystemExit(1) for a template dir missing main.py.

Verification

  • Ran the entire test suite: all passing.
  • Pre-commit checks: all passing.

@ApusBerliozi
ApusBerliozi merged commit 22b66fb into pyfenn:main Jul 17, 2026
7 checks passed
@ApusBerliozi

Copy link
Copy Markdown
Contributor

Thx 4 your effort @hendo-21 !

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.

fenn profile cannot locate templates pulled by fenn pull

2 participants