-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: fix the testing src-layout structure and use relative impor…
…ts (#1431) The original commit merging ops-scenario into this repository had an error in the [src-layout](https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/) structure: the `src` folder should contain a folder for each of the importable packages, not have all of the individual modules. This PR moves everything in `testing/src/` to `testing/src/scenario/` to fix this. This means that the build tool can find the package without any help, and makes editable installs work correctly, which removes a quirk in the tox dependency installs. It also makes it simpler to work on the project, since the `ops` and `scenario` packages are available in the expected format with the expected name (although src-layout encourages editable installs for development). For the second part of the cleanup, the PR changes the `testing/src/scenario` imports to be relative for everything inside of that location. While adjusting these, most of the imports are adjusted to import from the top-level `ops` namespace rather than from individual modules (except for non-exported names). --------- Co-authored-by: Dima Tisnek <dimaqq@gmail.com>
- Loading branch information
1 parent
68cf2d7
commit 53f1bb4
Showing
13 changed files
with
57 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters