You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#2311 -- switches the build backend to Hatchling, better links, etc.
Open questions:
I've renamed testing/src/scenario to testing/src/ops_scenario. The alternative would be to tweak some project setting to our setup (package name doesn't match directory)
If we go renaming things, how about dropping the src layout?
I've renamed testing/src/scenario to testing/src/ops_scenario. The alternative would be to tweak some project setting to our setup (package name doesn't match directory)
I'm pretty sure this is wrong, whether it's src layout or not. The PyPI package name is ops-scenario, but the package is scenario (it's "import scenario" not "import ops_scenario"). The filesystem should match the namespace not the PyPI package.
If we go renaming things, how about dropping the src layout?
What about adopting it instead? It still seems to be that this is the current common practice, and it makes it simpler for the monorepo with tooling, based on the experimentation last year.
I'm pretty sure this is wrong, whether it's src layout or not. The PyPI package name is ops-scenario, but the package is scenario (it's "import scenario" not "import ops_scenario"). The filesystem should match the namespace not the PyPI package.
I tried that, but uv-build disagrees:
🦐/c/operator (chore-clean-up-ops-testing-project-file)> tox -e unit -- -vx
unit: uv-sync> uv sync --locked --python-preference system --no-default-groups --group unit --group xdist -p /Users/dima/.local/share/uv/tools/tox/bin/python
Resolved 59 packages in 3ms
× Failed to build `ops-scenario @ file:///code/operator/testing`
├─▶ The build backend returned an error
╰─▶ Call to `uv_build.build_editable` failed (exit status: 1)
[stderr]
Error: Expected a Python module at: src/ops_scenario/__init__.py
P.S. and weirdly your advice works if I move everything under packages/.
So confusing!
P.P.S. I think there's a subtle difference between editable install and sdist build.
One wants it one way, the other, the opposite way.
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2311 -- switches the build backend to Hatchling, better links, etc.
Open questions:
testing/src/scenariototesting/src/ops_scenario. The alternative would be to tweak some project setting to our setup (package name doesn't match directory)