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

Make repr for NumberedObjectCollection less developer oriented #659

Open
MicahGale opened this issue Feb 8, 2025 · 0 comments
Open

Make repr for NumberedObjectCollection less developer oriented #659

MicahGale opened this issue Feb 8, 2025 · 0 comments
Labels
feature request An issue that improves the user interface.

Comments

@MicahGale
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

When doing repr(cell.surfaces) (in jupyter) the output is not very useful:

>>> tc.surfaces
Numbered_object_collection: obj_class: <class 'montepy.surfaces.surface.Surface'>, problem: None
Objects: [SURFACE: 1712, RCC, periodic surface: None, transform: None, constants: [0.0, 0.0, 115.25759, 0.0, 0.0, 10.16, 1.142]]
Number cache: {1712: SURFACE: 1712, RCC, periodic surface: None, transform: None, constants: [0.0, 0.0, 115.25759, 0.0, 0.0, 10.16, 1.142]}

This is too much information. The number cache is no longer really necessary for debugging because of how well I made this object ;).

Describe the solution you'd like

Rather in this case I think the more important thing is to just just the repr of the child objects.

Suggestion:

>>> tc.surfaces
Surfaces: problem: None
[SURFACE: 1712, RCC, periodic surface: None, transform: None, constants: [0.0, 0.0, 115.25759, 0.0, 0.0, 10.16, 1.142]]

Describe alternatives you've considered

Do nothing.

Additional context
This was 1.0.0a1.dev#

@MicahGale MicahGale added feature request An issue that improves the user interface. alpha testing Issues that came up during alpha testing and removed alpha testing Issues that came up during alpha testing labels Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request An issue that improves the user interface.
Projects
None yet
Development

No branches or pull requests

1 participant