Skip to content

Conversation

jeremycline
Copy link
Member

The aim of this change set is to enable installing lisa from a Python package, like a wheel. Moving these two directories, which are used at run time, into the Python package allows distributing lisa via PyPI or similar. Symbolic links are also provided for compatibility.

This also adjusts the package name to mslisa since lisa is taken on PyPI. It doesn't change how the package is imported, so nothing using lisa from a git checkout should be impacted.

This is a pre-requisite task to doing #3984

@jeremycline jeremycline force-pushed the wheel-compat branch 2 times, most recently from bb924d1 to ad40aa2 Compare September 30, 2025 19:53
jeremycline and others added 6 commits October 1, 2025 10:50
This moves the examples and microsoft directories in the repository root
into the lisa Python package. Moving these inside the package allows
them to be distributed via sdist and wheels and since the lisa package
references these files, prior to this commit installs from sdist/wheels
did not work.
The project is still importable as lisa, but the Python package is named
"mslisa".
Due to packaging changes, existing runbook paths
may be incorrect. This update ensures legacy paths
remain functional. Tests are still imported from
`examples` or `microsoft` within the new packaging
structure for consistency.
Due to packaging changes, the test suite folder
may be harder to locate outside the `lisa` folder.
To simplify importing, a flag is added:

- Introduce `import_internal_tests` boolean field
  in the Runbook schema, defaulting to `False`.
These are now in lisa proper.
- The symlinks cause more trouble than they're worth when combined with
  this fixup function since apparently symlinks on Windows are weird.

- The path fixup code should build the path from the repo root to
  account for nested directories.
@jeremycline
Copy link
Member Author

Okay, there's a bunch of flake8/isort/mypy related issues in the microsoft test suite since I guess it previously wasn't linted. I think I'll fix those up in a separate PR and then rebase this on top to save myself some merge conflict headaches if that sounds good to you all. A few more might slip in before this gets merged, but at least it'll be pretty minimal to fix up.

@squirrelsc
Copy link
Member

Okay, there's a bunch of flake8/isort/mypy related issues in the microsoft test suite since I guess it previously wasn't linted. I think I'll fix those up in a separate PR and then rebase this on top to save myself some merge conflict headaches if that sounds good to you all. A few more might slip in before this gets merged, but at least it'll be pretty minimal to fix up.

I have a check on flake8 errors, it looks related to the movement. We don't need to fix it at this moment. We can fix it after Oct 15. We can freeze PR merging for a week.

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.

2 participants