-
Notifications
You must be signed in to change notification settings - Fork 218
Move examples and microsoft directories into the Python package #4023
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
bb924d1
to
ad40aa2
Compare
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.
ad40aa2
to
5948884
Compare
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. |
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
sincelisa
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