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

Expose options interface to all classes #40

Closed
ChristophWWagner opened this issue Nov 5, 2018 · 2 comments
Closed

Expose options interface to all classes #40

ChristophWWagner opened this issue Nov 5, 2018 · 2 comments

Comments

@ChristophWWagner
Copy link
Member

Finally there was a case where fiddling around with Matrix baseclass' internal options to achieve something a user actually dreams of. Explicitly, forcing element contiguousy and ordering for input arrays prior to processing. Internally controlled by the flags _forceInputAlignment and _useFortranStyle.

Exposed to the outer world these can be controlled via the _initProperties arguments forceInputAlignment=True and fortranStyle=True. Unfortunately not all classes currently forward arbitrary **options of __init__() to _initProperties, yet alone offers **options in the first place. This must change for consistency reasons alone

Technically a user could actually just call _initProperties, supply the fixed arguments from the object itself and attach some new options but this is ugly. Very ugly. And on top of that any method starting with an _ should never be called by a user in the first place.

So this needs to change :)

@SebastianSemper
Copy link
Member

Agreed.

This being agreed upon, we should find a place, where to document stuff like this such that it is easily found by the interested power user.

@ChristophWWagner
Copy link
Member Author

Good.

How about we spend a dedicated section to API documentation and make this a part of it? Would also make sense to spend the baseclass init() method a docstring that documents general options while each class may elaborate more (and should so) on its special arguments. Currently help(aClass.__init__) is not very informative. Does sphynx inherit docstrings from baseclasses btw?

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

No branches or pull requests

2 participants