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

feat: Retrieve default descr from bone's name in its Skeleton #1227

Merged
merged 7 commits into from
Aug 18, 2024

Conversation

phorward
Copy link
Member

@phorward phorward commented Aug 5, 2024

This PR allows to define a bone

test = StringBone()

which is shown as "test" bone, instead of just an empty string.

image

This PR allows to define a bone

```py
test = StringBone()
```

which is shown as "test" bone, instead of just an empty string.
@phorward phorward changed the title feat: Retrieve default descr from bone's name feat: Retrieve default descr from bone's name in its Skeleton Aug 5, 2024
src/viur/core/bones/base.py Outdated Show resolved Hide resolved
phorward and others added 2 commits August 6, 2024 12:26
Co-authored-by: Sven Eberth <mail@sveneberth.de>
@phorward phorward requested a review from sveneberth August 6, 2024 10:38
src/viur/core/bones/base.py Outdated Show resolved Hide resolved
@phorward phorward added this to the ViUR-core v3.6 milestone Aug 8, 2024
@phorward phorward requested a review from sveneberth August 9, 2024 10:44
…ject

and keep the descr change-/setable (if necessary and if the bone is
cloned)
Copy link
Member

@sveneberth sveneberth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creating every time u access .descr a translate instance is not really efficient.

I have another solution: phorward#7

The translate object in the structure is btw no problem and needs to extra str-cast since we use our own CustomJsonEncoder.

feat: Use `setSystemInitialized` to create only once a `translate` object
@phorward
Copy link
Member Author

phorward commented Aug 9, 2024

I have another solution: phorward#7

It's kinda over-engineered, but we can make it so.

@phorward phorward requested a review from sveneberth August 9, 2024 21:58
@phorward phorward added feature New feature or request viur-meeting Issues to discuss in the next ViUR meeting and removed viur-meeting Issues to discuss in the next ViUR meeting labels Aug 12, 2024
@phorward phorward merged commit 2c663ed into viur-framework:develop Aug 18, 2024
3 checks passed
phorward added a commit to phorward/viur-core that referenced this pull request Aug 26, 2024
This is a regression introduced by viur-framework#1227 causing descr() is called before a session is available.
phorward added a commit that referenced this pull request Aug 27, 2024
This is a regression introduced by #1227 causing descr() is called
before a session is available.
phorward added a commit that referenced this pull request Nov 19, 2024
This bug is a regression of #1277 and #1227.

The `__system_initialized`-bool should be set *after* all
setSystemInitialized() functions where invoked, as the system is defined
to be initialized *after* the stuff where worked.

Otherwise, `SpamBone.descr` cannot determine whether it is executed in
an uninitialized or initialized system.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants