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
the tiled.server and tiled.client modules are intended to be kept seperate to allow dependencies to be kept minimal in each. However, this is not enforced except by code review which is falliable. Configuring a linting step to ensure that certain packages are not able to import from each other would prevent this happening.
e.g. dodal has configured importlinter to prevent circular imports
[tool.importlinter]
root_package = "dodal"
[[tool.importlinter.contracts]]
name = "Common cannot import from beamlines"
type = "forbidden"
source_modules = ["dodal.common"]
forbidden_modules = ["dodal.beamlines"]
[[tool.importlinter.contracts]]
name = "Enforce import order"
type = "layers"
layers = ["dodal.plans", "dodal.beamlines", "dodal.devices"]
This may also be useful for enforcing optional dependencies are not misused?
The text was updated successfully, but these errors were encountered:
The above configures so that dodal.common cannot import from dodal.beamlines, and that dodal.plans can import from dodal.beamlines, which can import from dodal.devices but not in the opposite direction.
the tiled.server and tiled.client modules are intended to be kept seperate to allow dependencies to be kept minimal in each. However, this is not enforced except by code review which is falliable. Configuring a linting step to ensure that certain packages are not able to import from each other would prevent this happening.
e.g. dodal has configured
importlinter
to prevent circular importsThis may also be useful for enforcing optional dependencies are not misused?
The text was updated successfully, but these errors were encountered: