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

Restricting allowed ModeSolver.plane types #1882

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

momchil-flex
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@tylerflex tylerflex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good just wondering if we want to allow more box subtypes

@@ -74,6 +75,7 @@

MODE_SIMULATION_TYPE = Union[Simulation, EMESimulation]
MODE_SIMULATION_DATA_TYPE = Union[SimulationData, EMESimulationData]
MODE_PLANE_TYPE = Union[Box, ModeSource, ModeMonitor, ModeSolverMonitor]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not allow other source and monitor types? or even Mode Simulation types?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So my thinking is that if I could just do what I want, I would just require this to always be Box so the definition is clear and there's no wide range of types that this attribute can take. So I kind of took the route of allowing the minimum extra that should preserve compatibility at least within our examples. Technically you are right though that some people may have used this in other ways too, e.g. passing other monitors. Probably quite an edge case but not impossible. So.. not sure.

@momchil-flex momchil-flex merged commit ea8ccf6 into develop Aug 6, 2024
15 checks passed
@momchil-flex momchil-flex deleted the momchil/mode_plane_types branch August 6, 2024 14:49
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 this pull request may close these issues.

2 participants