Skip to content

Conversation

@romain-intel
Copy link
Contributor

No description provided.

@romain-intel romain-intel changed the base branch from master to fix/support_editable_pkgs_more October 16, 2025 09:52
In some cases, a distribution install of an editable package includes just
a .pth file and not the full file list included in the extension. In those
cases, the extension mechanism failed to fall back to traversing the
directory indicated in the .pth file.

This PR fixes this issue while trying to maintain the "usual"
case of non editable packages as quick as possible (walking the FS
is not ideal in all cases).

Some additional clean-up particularly around handling the case of
"getting file from the distribution files list" and "walking a tree". We
already used to walk the FS for non-distribution packages but now we do
it in both cases (potentially) so the code was refactored to make it
clearer.

A similar issue could also happen when packaging METAFLOW_PACKAGE_POLICY
packages that were installed in an editable mode. The same type of fixes
are applied there as well.
Flow decorators were not properly merged in the case of multiple
inheritance. For example:

@project(name="foobar")
class A(FlowSpec):
  pass

class B(A):
  pass

class C(B):
  pass

Would result in the `project` decorator being included twice.

This PR fixes this behavior and should support any arbitrary inheritance
pattern. It also cleans up _flow_state (moving _flow_decorators into it)
and fixes some other corner cases (I think). In particular, configs are now
no longer merged as they are naturally inherited.
@romain-intel romain-intel force-pushed the fix/multi_inheritance branch from ad214ed to cc637df Compare October 17, 2025 20:13
Base automatically changed from fix/support_editable_pkgs_more to master October 21, 2025 17:00
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