-
Notifications
You must be signed in to change notification settings - Fork 190
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
Sozo model layout and commands #2002
Conversation
- update sozo model commands with: - `sozo model schema <MODEL_NAME>` to get the full model schema, - `sozo model layout <MODEL_NAME` to get the full model layout used to store, model records in the Dojo world storage, - `sozo model get <MODEL_NAME> <KEYS>` to get the full values of a model record. - improvement of the Enum layout.
f2c2c8a
to
a9658fc
Compare
a9658fc
to
296a204
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, it will be great to have such details from the CLI to debug / introspect models.
Some feedback:
- world address must be updated to
0x7a2b168dbd3ebada04c0ea21b787f5ef00ff234af9705afe4e147638cb671b7
. - Would you mind adding a model to showcase
IntrospectPacked
into thespawn-and-move
example to also have some quick examples to show different layouts?
46e121a
to
4f4f11e
Compare
I've added |
Sounds great, let's do that in a subsequent PR. Also, the documentation will showcase some edge cases. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2002 +/- ##
==========================================
- Coverage 68.27% 67.50% -0.77%
==========================================
Files 318 318
Lines 37352 37880 +528
==========================================
+ Hits 25502 25572 +70
- Misses 11850 12308 +458 ☔ View full report in Codecov by Sentry. |
Added a fix on the go for #2007. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work @remybar!
Dojo layout improvements:
Introspect
attribute to dojo::model if not yet presentsozo model schema <MODEL_NAME>
to get the full model schema,sozo model layout <MODEL_NAME
to get the full model layout used to store,model records in the Dojo world storage,
sozo model get <MODEL_NAME> <KEYS>
to get the full values of a model record.