pyroll-project / pyroll-core

PyRoll rolling simulation framework - core library.
https://pyroll.readthedocs.io
BSD 3-Clause "New" or "Revised" License
12 stars 7 forks source link

Improve internal naming schemes to work with autocompletion in jupyter notebooks #142

Closed GRPlan closed 7 months ago

GRPlan commented 8 months ago

Summary

Some internal names like e.g. ThreeRollPass 'Pass4' are incompatible with autocompletion in jupyter notebooks. They are not displayed in the autocompletion list.

This is at times quite comfusing when looking for specific results.

It would be better if internal names are created in a way so that they support autocompletion.

image

axtimhaus commented 8 months ago

Do you refer to the string representation of units? Where does this affect autocompletion?

GRPlan commented 8 months ago

Yes, I refer to the string representation of units. I think autocompletion can't deal e.g. with . and space. Respective units do not appear in the autocompletion list which is confusing to the user.

image

In the list above I would expect the ThreeRollPass units to be present in the autocompletion list.

axtimhaus commented 8 months ago

What is this Rollpass object in your case? I do not know of any where the units were accessible by label. But this may be an idea to implement an indexer in PassSequence which allows to get units by label like sequence["Oval III"] if sequence is a PassSequence and there is a unit with label="Oval III" in.