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(dojo-core): add world test capabilities #2323

Merged
merged 4 commits into from
Aug 21, 2024

Conversation

glihm
Copy link
Collaborator

@glihm glihm commented Aug 21, 2024

Description

With the new ACL rework, it's more challenging to write tests with direct access to the world's database.

This PR introduces a new IWorldTest interface that allows the use of IModelTest interface to actually set data into the world's storage without the ACL limitation.

The main issue on testing was to set some values to verify how a system behaves based on those values.
With the new interface, at any point in the test, dev can set data for specific models without worrying about permissions.

// The world is spun up as usual:
let world = spawn_test_world(...);

// Store API is not extended with some `set_test` and `delete_test` which skips permissions:
let mut position = PositionStore::get(world, caller);
position.vec.x = 122;
position.set_test(world);

Checklist

  • See if the IWorldTestDispatcher can be embedded into the IModelTest to always work with a IWorldDispatcher to keep interfaces clean.
  • See if a macro for initializing the world could be done to ease how a world can be initialized for testing.

Summary by CodeRabbit

  • New Features

    • Introduced new testing functionalities for model and world modules, enhancing modularity and testability.
    • Added qualified_path field to various models and manifests for improved identification and organization.
    • Updated deployment manifests with new contract addresses and class hashes, reflecting recent changes.
  • Bug Fixes

    • Modifications to test functions to ensure accurate functionality with updated test data.
  • Documentation

    • Enhanced documentation for testing functions to improve clarity and usability for developers.

@glihm
Copy link
Collaborator Author

glihm commented Aug 21, 2024

The qualified path of the model contract is now added in the manifest. A subsequent PR will add a new macro to manage those to easily setup tests with model's TEST_CLASS_HASH.

@glihm glihm marked this pull request as ready for review August 21, 2024 19:28
Copy link

coderabbitai bot commented Aug 21, 2024

Walkthrough

Ohayo, sensei! The recent updates enhance the testing framework and modularity of the Dojo codebase. New testing traits and functions have been introduced in the model and world modules, improving the ability to manage test scenarios without affecting production code. Additionally, metadata fields like qualified_path have been added across various configuration files, enhancing organization and clarity throughout the system.

Changes

Files Change Summary
crates/dojo-core/src/lib.cairo, crates/dojo-core/src/model/model.cairo, crates/dojo-core/src/world/world_contract.cairo Introduced new public entities and traits for testing purposes, enhancing modularity and testability within the model and world modules.
crates/dojo-core/src/utils/test.cairo Improved documentation for spawn_test_world function, clarifying parameters and return values without changing its logic.
crates/dojo-lang/src/compiler.rs Added a new parameter qualified_path to get_dojo_model_artifacts function, enhancing its capability.
crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-world.toml, examples/spawn-and-move/manifests/dev/base/dojo-world.toml,examples/spawn-and-move/manifests/release/base/dojo-world.toml Updated class_hash and original_class_hash values, indicating a modification to class representation.
examples/spawn-and-move/manifests/dev/deployment/manifest.json, examples/spawn-and-move/manifests/dev/deployment/manifest.toml Significant updates to addresses and hashes of contracts; introduced new qualified_path entries for improved organization.
examples/spawn-and-move/manifests/.../*.toml Added qualified_path fields to various model configurations, enhancing metadata without altering existing functionality.

Feel free to reach out if you need more details or further clarifications, sensei!


Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between bb7d7df and 5c655d2.

Files ignored due to path filters (2)
  • spawn-and-move-db.tar.gz is excluded by !**/*.gz
  • types-test-db.tar.gz is excluded by !**/*.gz
Files selected for processing (35)
  • crates/dojo-core/src/lib.cairo (2 hunks)
  • crates/dojo-core/src/model/model.cairo (1 hunks)
  • crates/dojo-core/src/utils/test.cairo (3 hunks)
  • crates/dojo-core/src/world/world_contract.cairo (6 hunks)
  • crates/dojo-lang/src/compiler.rs (1 hunks)
  • crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-world.toml (1 hunks)
  • crates/dojo-lang/src/model.rs (2 hunks)
  • crates/dojo-world/src/manifest/types.rs (1 hunks)
  • crates/sozo/ops/src/tests/model.rs (1 hunks)
  • examples/spawn-and-move/dojo_dev.toml (1 hunks)
  • examples/spawn-and-move/manifests/dev/base/dojo-world.toml (1 hunks)
  • examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ContractInitialized-376b7bd6.toml (1 hunks)
  • examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Message-1bb1d226.toml (1 hunks)
  • examples/spawn-and-move/manifests/dev/base/models/dojo_examples-MockToken-38903c7c.toml (1 hunks)
  • examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moved-318ae40d.toml (1 hunks)
  • examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moves-2e2accba.toml (1 hunks)
  • examples/spawn-and-move/manifests/dev/base/models/dojo_examples-PlayerConfig-3adad785.toml (1 hunks)
  • examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Position-1e145e26.toml (1 hunks)
  • examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ServerProfile-4caad1e6.toml (1 hunks)
  • examples/spawn-and-move/manifests/dev/base/models/dojo_examples_foes-RiverSkale-39535c12.toml (1 hunks)
  • examples/spawn-and-move/manifests/dev/base/models/dojo_examples_weapons-Flatbow-22f5bd16.toml (1 hunks)
  • examples/spawn-and-move/manifests/dev/deployment/manifest.json (16 hunks)
  • examples/spawn-and-move/manifests/dev/deployment/manifest.toml (15 hunks)
  • examples/spawn-and-move/manifests/release/base/dojo-world.toml (1 hunks)
  • examples/spawn-and-move/manifests/release/base/models/dojo_examples-ContractInitialized-376b7bd6.toml (1 hunks)
  • examples/spawn-and-move/manifests/release/base/models/dojo_examples-Message-1bb1d226.toml (1 hunks)
  • examples/spawn-and-move/manifests/release/base/models/dojo_examples-MockToken-38903c7c.toml (1 hunks)
  • examples/spawn-and-move/manifests/release/base/models/dojo_examples-Moved-318ae40d.toml (1 hunks)
  • examples/spawn-and-move/manifests/release/base/models/dojo_examples-Moves-2e2accba.toml (1 hunks)
  • examples/spawn-and-move/manifests/release/base/models/dojo_examples-PlayerConfig-3adad785.toml (1 hunks)
  • examples/spawn-and-move/manifests/release/base/models/dojo_examples-Position-1e145e26.toml (1 hunks)
  • examples/spawn-and-move/manifests/release/base/models/dojo_examples-ServerProfile-4caad1e6.toml (1 hunks)
  • examples/spawn-and-move/manifests/release/base/models/dojo_examples_foes-RiverSkale-39535c12.toml (1 hunks)
  • examples/spawn-and-move/manifests/release/base/models/dojo_examples_weapons-Flatbow-22f5bd16.toml (1 hunks)
  • examples/spawn-and-move/src/actions.cairo (2 hunks)
Files skipped from review due to trivial changes (8)
  • crates/dojo-core/src/utils/test.cairo
  • examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ContractInitialized-376b7bd6.toml
  • examples/spawn-and-move/manifests/dev/base/models/dojo_examples-MockToken-38903c7c.toml
  • examples/spawn-and-move/manifests/release/base/models/dojo_examples-Message-1bb1d226.toml
  • examples/spawn-and-move/manifests/release/base/models/dojo_examples-MockToken-38903c7c.toml
  • examples/spawn-and-move/manifests/release/base/models/dojo_examples-Position-1e145e26.toml
  • examples/spawn-and-move/manifests/release/base/models/dojo_examples-ServerProfile-4caad1e6.toml
  • examples/spawn-and-move/manifests/release/base/models/dojo_examples_weapons-Flatbow-22f5bd16.toml
Additional comments not posted (59)
crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-world.toml (1)

2-3: Ohayo, sensei! Verify the usage of updated class hashes.

The class_hash and original_class_hash have been updated. Ensure that these changes are reflected in all relevant parts of the codebase where these hashes are used.

Run the following script to verify the usage of these hashes:

Verification successful

Ohayo, sensei! The updated class hashes are consistently used across the codebase. The new hashes appear in all relevant TOML files, including:

  • examples/spawn-and-move/manifests/release/base/dojo-world.toml
  • examples/spawn-and-move/manifests/dev/deployment/manifest.toml
  • examples/spawn-and-move/manifests/dev/base/dojo-world.toml
  • crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-world.toml

No issues found with the usage of the updated hashes.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of updated class hashes.

# Test: Search for the usage of the updated class hashes. Expect: Only occurrences of the new hashes.
rg --type toml '0x3715f072aa1c07be724249fcda8b0322687f6c5c585eebc4402d162649c707c'

Length of output: 1316

examples/spawn-and-move/manifests/dev/base/dojo-world.toml (1)

2-3: Ohayo, sensei! Verify the usage of updated class hashes.

The class_hash and original_class_hash have been updated. Ensure that these changes are reflected in all relevant parts of the codebase where these hashes are used.

Run the following script to verify the usage of these hashes:

Verification successful

Ohayo, sensei! The updated class hashes are indeed present in multiple TOML files across the codebase. However, to fully verify their usage, it would be wise to check other file types as well, such as source code files, to ensure that all relevant parts of the codebase reflect these updates. Let's proceed with a broader search.


Ohayo, sensei! The updated class hashes have been verified across multiple configuration files, including both TOML and JSON formats. The changes are consistently reflected in the following files:

  • examples/spawn-and-move/manifests/dev/deployment/manifest.toml
  • examples/spawn-and-move/manifests/dev/deployment/manifest.json
  • examples/spawn-and-move/manifests/dev/base/dojo-world.toml
  • examples/spawn-and-move/manifests/release/base/dojo-world.toml
  • crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-world.toml

The updates appear to be well-propagated across the codebase.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of updated class hashes.

# Test: Search for the usage of the updated class hashes. Expect: Only occurrences of the new hashes.
rg --type toml '0x3715f072aa1c07be724249fcda8b0322687f6c5c585eebc4402d162649c707c'

Length of output: 1316


Script:

#!/bin/bash
# Description: Verify the usage of updated class hashes in all file types.

# Search for the usage of the updated class hashes in all file types.
rg '0x3715f072aa1c07be724249fcda8b0322687f6c5c585eebc4402d162649c707c'

Length of output: 1613

examples/spawn-and-move/manifests/release/base/dojo-world.toml (1)

2-3: Ohayo, sensei! Verify the usage of updated class hashes.

The class_hash and original_class_hash have been updated. Ensure that these changes are reflected in all relevant parts of the codebase where these hashes are used.

Run the following script to verify the usage of these hashes:

Verification successful

Ohayo, sensei! The updated class hashes are consistently used across the codebase.

The new hashes appear in several manifest files, including both release and dev directories, as well as in test data:

  • examples/spawn-and-move/manifests/release/base/dojo-world.toml
  • examples/spawn-and-move/manifests/dev/base/dojo-world.toml
  • examples/spawn-and-move/manifests/dev/deployment/manifest.toml
  • crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-world.toml

The changes are reflected in all relevant parts of the codebase where these hashes are used.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of updated class hashes.

# Test: Search for the usage of the updated class hashes. Expect: Only occurrences of the new hashes.
rg --type toml '0x3715f072aa1c07be724249fcda8b0322687f6c5c585eebc4402d162649c707c'

Length of output: 1316

examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Position-1e145e26.toml (1)

6-6: Ohayo, sensei! Nice enhancement with qualified_path.

The addition of the qualified_path field improves the clarity and organization of the model's metadata. This will likely aid in future integrations or references. Keep up the good work!

examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moved-318ae40d.toml (1)

6-6: Ohayo, sensei! Great addition with qualified_path.

The qualified_path field adds valuable metadata to the model, aiding in organization and future references. This is a step in the right direction for maintaining clarity in the system.

examples/spawn-and-move/manifests/release/base/models/dojo_examples-Moved-318ae40d.toml (1)

6-6: Ohayo, sensei! Well done on adding qualified_path.

Including the qualified_path field enhances the model's metadata, promoting better organization and reference capabilities. This is a beneficial addition for managing the system's structure.

examples/spawn-and-move/manifests/dev/base/models/dojo_examples_weapons-Flatbow-22f5bd16.toml (1)

6-6: Ohayo, sensei! The addition of qualified_path looks great.

The qualified_path field enhances the metadata and improves organization within the system. Nice work!

examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moves-2e2accba.toml (1)

6-6: Ohayo, sensei! The addition of qualified_path is spot on.

The qualified_path field provides clarity and enhances the organization of the class within the project structure. Well done!

examples/spawn-and-move/manifests/release/base/models/dojo_examples-Moves-2e2accba.toml (1)

6-6: Ohayo, sensei! The qualified_path addition is a great enhancement.

The qualified_path field adds valuable metadata, aiding in the organization and integration of the model. Keep up the good work!

examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ServerProfile-4caad1e6.toml (1)

6-6: Ohayo, sensei! The addition of qualified_path looks great.

This change enhances the clarity and organization of the model's metadata.

examples/spawn-and-move/manifests/dev/base/models/dojo_examples_foes-RiverSkale-39535c12.toml (1)

6-6: Ohayo, sensei! The qualified_path addition is spot on.

This change enhances the organization and referencing of the entity's metadata.

examples/spawn-and-move/manifests/release/base/models/dojo_examples_foes-RiverSkale-39535c12.toml (1)

6-6: Ohayo, sensei! The qualified_path addition is well-executed.

This change improves the organization and categorization of the entity's metadata.

examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Message-1bb1d226.toml (1)

6-6: Ohayo, sensei! The addition of qualified_path looks great.

The qualified_path field enhances the metadata and organization of the model configuration. No issues here.

examples/spawn-and-move/manifests/release/base/models/dojo_examples-ContractInitialized-376b7bd6.toml (1)

6-6: Ohayo, sensei! The qualified_path addition is spot on.

The qualified_path field enhances the metadata and organization of the contract configuration. Everything looks good.

examples/spawn-and-move/manifests/dev/base/models/dojo_examples-PlayerConfig-3adad785.toml (1)

6-6: Ohayo, sensei! The qualified_path is a nice touch.

The qualified_path field enhances the metadata and organization of the player configuration. Looks perfect.

examples/spawn-and-move/manifests/release/base/models/dojo_examples-PlayerConfig-3adad785.toml (1)

6-6: Ohayo, sensei! The addition of qualified_path looks great.

This change enhances the metadata and organization of the model configuration.

examples/spawn-and-move/dojo_dev.toml (1)

17-17: Verify the impact of the world_address change.

Ensure that this update aligns with the new environment setup and doesn't inadvertently affect other parts of the application.

crates/dojo-core/src/lib.cairo (2)

20-21: Ohayo, sensei! The conditional export of ModelTest and ModelEntityTest is well-implemented.

These changes enhance the testing capabilities of the model module.


69-70: Ohayo, sensei! The conditional export of IWorldTest and related entities is spot on.

These additions improve the testability of the world module.

crates/dojo-core/src/model/model.cairo (2)

106-110: Ohayo, sensei! The ModelTest trait looks solid.

The set_test and delete_test methods align with the goal of bypassing permission checks for testing purposes. Everything seems in order here.


112-116: Ohayo, sensei! The ModelEntityTest trait is looking good.

The update_test and delete_test methods are well-defined for the testing context. Everything seems to be in order.

crates/sozo/ops/src/tests/model.rs (1)

62-62: Verify the updated hexadecimal value in test_model_ops.

The hexadecimal value has been updated, which may affect the test outcome. Ensure that this change aligns with the intended functionality.

Run the following script to verify the context of the hexadecimal value:

Verification successful

Ohayo, sensei! Based on the new context, the hexadecimal value 0x604735fb6510c558ba3ae21972fcbdb1b4234bedcbc990910bd7efd194e7db3 is used in the test_model_ops function to verify the contract address returned by model::model_contract_address. The test checks if this address matches the expected value, which suggests that the change in the hexadecimal value is intentional and aligns with the test's purpose.

Summary of Findings:

  • The hexadecimal value is used in an assertion to verify the contract address.
  • The test ensures that the returned address matches the expected one, indicating the change is likely intentional.

If this change was made to reflect an update in the expected contract address, it seems consistent with the test's functionality. However, if the change was unintentional, it might affect the test outcome.

Action Items:

  • Verify if the change in the hexadecimal value reflects an intended update in the expected contract address.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the context of the updated hexadecimal value in the test.

# Test: Search for the hexadecimal value in the codebase. Expect: Consistent usage.
rg --type rust '0x604735fb6510c558ba3ae21972fcbdb1b4234bedcbc990910bd7efd194e7db3'

Length of output: 209


Script:

#!/bin/bash
# Search for the function definition of `test_model_ops` to understand the context of the hexadecimal value usage.
ast-grep --lang rust --pattern 'fn test_model_ops() { $$$ }'

Length of output: 62


Script:

#!/bin/bash
# Search for all function definitions in the specified file to find the context of the hexadecimal value usage.
ast-grep --lang rust --pattern 'fn $_() { $$$ }' crates/sozo/ops/src/tests/model.rs

Length of output: 85


Script:

#!/bin/bash
# Check if the file exists and list its contents to verify its presence and content.
if [ -f "crates/sozo/ops/src/tests/model.rs" ]; then
  cat crates/sozo/ops/src/tests/model.rs
else
  echo "File not found."
fi

Length of output: 7316

crates/dojo-world/src/manifest/types.rs (1)

125-125: Ohayo, sensei! The addition of qualified_path in DojoModel is a wise enhancement.

This new field enhances the struct's capabilities and aligns with the PR objectives. Everything seems to be in order.

examples/spawn-and-move/manifests/dev/deployment/manifest.toml (5)

3-4: Ohayo, sensei! Verify the correctness of the class_hash and original_class_hash.

Ensure that the new hash values are accurate and correspond to the intended contract.


6-6: Ohayo, sensei! Verify the correctness of the address.

Ensure that the new address is accurate and corresponds to the intended deployment.


7-7: Ohayo, sensei! Verify the correctness of the transaction_hash.

Ensure that the new transaction hash is accurate and corresponds to the intended transaction.


26-26: Ohayo, sensei! Verify the correctness of the address entries.

Ensure that the new addresses are accurate and correspond to the intended deployments.

Also applies to: 49-49, 63-63, 77-77


99-99: Ohayo, sensei! Verify the correctness of the qualified_path entries.

Ensure that the new qualified paths are accurate and correspond to the intended models.

Also applies to: 123-123, 152-152, 171-171, 190-190, 214-214, 243-243, 262-262, 286-286, 315-315

examples/spawn-and-move/src/actions.cairo (2)

197-197: Ohayo, sensei! Verify the necessity and usage of the new imports.

Ensure that PositionStore and PositionEntityStore are necessary and correctly used in the code.


200-235: Ohayo, sensei! Verify the correctness and completeness of the test_world_test_set function.

Ensure that the test function comprehensively validates the expected behavior of position data manipulation.

crates/dojo-lang/src/compiler.rs (1)

444-444: Ohayo, sensei! Verify the integration and usage of the qualified_path parameter.

Ensure that the qualified_path parameter is correctly integrated and used within the get_dojo_model_artifacts function.

crates/dojo-lang/src/model.rs (6)

470-495: Ohayo, sensei! The ModelEntityTestImpl implementation looks solid.

The implementation provides useful testing functionalities for model entities.


650-681: Ohayo, sensei! The ModelTestImpl implementation looks solid.

The implementation provides useful testing functionalities for models.


471-482: Ohayo, sensei! The update_test function looks good.

The implementation correctly sets entity test values using the world_test dispatcher.

Ensure that the function is used correctly in the test environment.

Run the following script to verify the function usage:


651-665: Ohayo, sensei! The set_test function looks good.

The implementation correctly sets model test values using the world_test dispatcher.

Ensure that the function is used correctly in the test environment.

Run the following script to verify the function usage:


667-680: Ohayo, sensei! The delete_test function looks good.

The implementation correctly deletes model test values using the world_test dispatcher.

Ensure that the function is used correctly in the test environment.

Run the following script to verify the function usage:


484-494: Ohayo, sensei! The delete_test function looks good.

The implementation correctly deletes entity test values using the world_test dispatcher.

Ensure that the function is used correctly in the test environment.

Run the following script to verify the function usage:

crates/dojo-core/src/world/world_contract.cairo (6)

63-75: Ohayo, sensei! The IWorldTest trait looks well-defined.

The trait provides essential methods for testing entity management.


321-338: Ohayo, sensei! The WorldTestImpl implementation looks solid.

The implementation provides useful testing functionalities for the world contract.


1095-1131: Ohayo, sensei! The set_entity_internal function is well-structured.

The function centralizes entity management logic, enhancing maintainability.


1140-1159: Ohayo, sensei! The delete_entity_internal function is well-structured.

The function centralizes entity management logic, enhancing maintainability.


798-799: Ohayo, sensei! The refactoring of set_entity is well-executed.

The refactoring reduces code duplication and enhances maintainability.


813-814: Ohayo, sensei! The refactoring of delete_entity is well-executed.

The refactoring reduces code duplication and enhances maintainability.

examples/spawn-and-move/manifests/dev/deployment/manifest.json (16)

4-5: Verify the updated class hashes.

Ohayo, sensei! The class_hash and original_class_hash for the WorldContract have been updated. Ensure that these changes align with the latest contract deployment and that all dependent systems are aware of the update.


1232-1232: Check the new world address.

The address for the world contract has been updated. Make sure this change is reflected in all configurations and that any systems interacting with this address are updated accordingly.


1253-1253: Confirm the updated contract address.

The address for the first DojoContract has been modified. Ensure that this address is correctly used in all relevant systems and configurations.


1667-1667: Confirm the updated contract address.

The address for the second DojoContract has been modified. Ensure that this address is correctly used in all relevant systems and configurations.


1906-1906: Confirm the updated contract address.

The address for the third DojoContract has been modified. Ensure that this address is correctly used in all relevant systems and configurations.


2127-2127: Confirm the updated contract address.

The address for the fourth DojoContract has been modified. Ensure that this address is correctly used in all relevant systems and configurations.


2796-2796: Ensure the qualified path is correct.

Ohayo, sensei! The qualified_path for dojo_examples::others::others::contract_initialized has been added. Verify that this path is accurate and used consistently across the codebase.


3241-3241: Ensure the qualified path is correct.

The qualified_path for dojo_examples::models::message has been added. Verify that this path is accurate and used consistently across the codebase.


3668-3668: Ensure the qualified path is correct.

The qualified_path for dojo_examples::models::mock_token has been added. Verify that this path is accurate and used consistently across the codebase.


4121-4121: Ensure the qualified path is correct.

The qualified_path for dojo_examples::actions::actions::moved has been added. Verify that this path is accurate and used consistently across the codebase.


4583-4583: Ensure the qualified path is correct.

The qualified_path for dojo_examples::models::moves has been added. Verify that this path is accurate and used consistently across the codebase.


5046-5046: Ensure the qualified path is correct.

The qualified_path for dojo_examples::models::player_config has been added. Verify that this path is accurate and used consistently across the codebase.


5487-5487: Ensure the qualified path is correct.

The qualified_path for dojo_examples::models::position has been added. Verify that this path is accurate and used consistently across the codebase.


5923-5923: Ensure the qualified path is correct.

The qualified_path for dojo_examples::models::server_profile has been added. Verify that this path is accurate and used consistently across the codebase.


6368-6368: Ensure the qualified path is correct.

The qualified_path for bestiary::river_skale has been added. Verify that this path is accurate and used consistently across the codebase.


6804-6804: Ensure the qualified path is correct.

The qualified_path for armory::flatbow has been added. Verify that this path is accurate and used consistently across the codebase.


Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@glihm glihm changed the title feat: add world test capabilities feat(dojo-core): add world test capabilities Aug 21, 2024
@glihm glihm merged commit 0955638 into dojoengine:main Aug 21, 2024
13 checks passed
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.35%. Comparing base (4f76fd7) to head (5c655d2).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2323      +/-   ##
==========================================
+ Coverage   66.18%   67.35%   +1.17%     
==========================================
  Files         352      354       +2     
  Lines       46739    46500     -239     
==========================================
+ Hits        30933    31321     +388     
+ Misses      15806    15179     -627     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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 this pull request may close these issues.

1 participant