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 string representations to most used objects #356

Open
perolavsvendsen opened this issue Nov 27, 2024 · 0 comments
Open

Add string representations to most used objects #356

perolavsvendsen opened this issue Nov 27, 2024 · 0 comments

Comments

@perolavsvendsen
Copy link
Member

Current experience:

[1] mycases = sumo.cases.filter(user="peesv")
[2] mycases
>>> <fmu.sumo.explorer.objects._search_context.SearchContext at 0x20d08fe3b90>

[3] len(mycases)
>>> 310

[4] mycases = sumo.cases.filter(user="NoSuchName")
[5] mycases
>>> <fmu.sumo.explorer.objects._search_context.SearchContext at 0x20d08fe3b90>

[6] len(mycases)
>>> 0

Suggest we add representations, so that this returns something more useful? Not sure exactly what to show, so this needs some discussion. But simple suggestion could be to just print the length of the context. I.e. it is important to know if this is an empty search context or not. Perhaps explicitly show when resulting length is 0.

Possible other suggestions:

  • First + last two names of collection?
  • Unique data types (class)?
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

No branches or pull requests

1 participant