Skip to content
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

Add import-linter #611

Closed
coretl opened this issue Oct 15, 2024 · 2 comments · Fixed by #669
Closed

Add import-linter #611

coretl opened this issue Oct 15, 2024 · 2 comments · Fixed by #669

Comments

@coretl
Copy link
Collaborator

coretl commented Oct 15, 2024

To avoid making circular imports it would be good to make some rules and add a linter as per DiamondLightSource/mx-bluesky#568 but with the config in a TOML file.

The rules:

  • epics depends only on core
  • tango depends only on core
  • sim depends only on core
  • fastcs depends only on core, epics, tango
  • plan_stubs can depend on anything

Acceptance Criteria

  • Anything that breaks the above rules errors pre-commit
@stan-dot
Copy link
Contributor

I assume that we want core to be independent now.

should plan_stubs be generic though? separate tango and epics plan stubs?

@coretl
Copy link
Collaborator Author

coretl commented Nov 22, 2024

should plan_stubs be generic though? separate tango and epics plan stubs?

Hmm, interesting point, in fastcs we do try/catch imports of epics and tango, and epics works even without the relevant transport, but tango doesn't. This will work at the moment but we might find this breaks in the future.

@abbiemery thoughts?

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 a pull request may close this issue.

2 participants