Skip to content

Make repr for NumberedObjectCollection less developer oriented #659

Open
@MicahGale

Description

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#

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    feature requestAn issue that improves the user interface.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions