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

Further refactor ModelProperty #917

Closed
jsnel opened this issue Nov 29, 2021 · 0 comments · Fixed by #1135
Closed

Further refactor ModelProperty #917

jsnel opened this issue Nov 29, 2021 · 0 comments · Fixed by #1135
Milestone

Comments

@jsnel
Copy link
Member

jsnel commented Nov 29, 2021

The PR #914 brought some much needed refactoring issue to light, as @s-weigand pointed out:

But also if works quite well, for 0.6.0 we should really reflect on if we really need this kind of metaprogramming or if we could maybe solve our requirements in a more maintainable fashion and pythonic way, instead of our mad scientist (e.g. utilizing attrs).

For me the most problematic point is inheriting a from the property decorator class, which leads this strange tests in test_model_property that don't reflect the actual usage.
The more tests the married, but they should reflect the usage in the code.

For now, there is no quick way around it (at least after 2h of trial and error from my side) and it would be out of scope for this PR, since this is an integral part of the code for 3 years.

Originally posted by @s-weigand in #914 (review)

jsnel pushed a commit that referenced this issue Nov 29, 2021
* Refactored ModelProperty

Markdown printing of Model has been changed
- Beautification is left for followup PR
- Further refactoring (and introspection) detailed in issue #917 

Co-authored-by: Sebastian Weigand <[email protected]>
@s-weigand s-weigand added this to the v0.7.0 milestone May 17, 2022
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

Successfully merging a pull request may close this issue.

2 participants