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

refactor(engine): change visibility of factory structs and types to improve encapsulation #974

Merged
merged 5 commits into from
Mar 5, 2025

Conversation

miseyu
Copy link
Contributor

@miseyu miseyu commented Mar 5, 2025

Summary by CodeRabbit

  • Chore

    • Incremented version numbers across relevant packages to align with the latest release cycle.
  • Documentation

    • Enhanced JSON schema definitions across multiple languages by adding descriptive titles and context for configuration properties, improving clarity and usability for end-users.

Copy link
Contributor

coderabbitai bot commented Mar 5, 2025

Caution

Review failed

The head commit changed during the review from feeb4e0 to d82e1e8.

Walkthrough

The changes update version numbers in Cargo.toml files and refactor numerous Rust modules by tightening visibility modifiers (e.g., converting pub to pub(super) or private) and adding inline documentation. Several modules in the attribute, feature, file, and geometry directories received similar encapsulation improvements. In addition, the JSON schema files received enhanced documentation via added titles, descriptions, and modified references using allOf constructs to clarify property purposes.

Changes

File(s) Change Summary
engine/Cargo.toml
engine/plateau-gis-quality-checker/src-tauri/Cargo.toml
Updated version numbers: 0.0.280.0.30 and 0.0.250.0.27.
engine/runtime/…/attribute/*.rs Modified visibility of multiple structs (e.g., from pub to pub(super) or private) and added inline documentation comments.
engine/runtime/…/feature/*.rs Restricted accessibility of factories, processors, and parameter structs; introduced new fields and documentation comments for clarity.
engine/runtime/…/file/*.rs Adjusted visibility of static variables and structs; enhanced field documentation with added comments.
engine/runtime/…/geometry/*.rs Tightened encapsulation by reducing public exposure, added new parameters with documentation, and refined static variable visibility.
engine/schema/actions*.json Enhanced JSON schemas by adding descriptive titles, explanations, and allOf wrappers to clarify property definitions.

Poem

I’m a little rabbit with code so neat,
Hopping through modules on every street,
I tightened the gates and polished each line,
With clearer docs and schema design,
Carrots and code—this build’s a treat!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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 generate docstrings to generate docstrings for this 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

Copy link

netlify bot commented Mar 5, 2025

Deploy Preview for reearth-flow canceled.

Name Link
🔨 Latest commit d82e1e8
🔍 Latest deploy log https://app.netlify.com/sites/reearth-flow/deploys/67c7fc3a02ab510008d9d5e7

@miseyu miseyu changed the title chore/modify json schema document refactor(engine): change visibility of factory structs and types to improve encapsulation Mar 5, 2025
@miseyu miseyu force-pushed the chore/modify-json-schema-document branch from 50469c3 to a963f37 Compare March 5, 2025 06:56
@miseyu miseyu marked this pull request as ready for review March 5, 2025 06:57
@miseyu miseyu requested a review from a team as a code owner March 5, 2025 06:57
Copy link

codecov bot commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 7.53%. Comparing base (bc3da12) to head (6a302cb).
Report is 125 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #974       +/-   ##
==========================================
- Coverage   25.64%   7.53%   -18.12%     
==========================================
  Files         138     178       +40     
  Lines        8170   31068    +22898     
==========================================
+ Hits         2095    2340      +245     
- Misses       5867   28538    +22671     
+ Partials      208     190       -18     
Flag Coverage Δ
api 7.53% <ø> (-18.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 313 files with indirect coverage changes

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🔭 Outside diff range comments (2)
engine/runtime/action-processor/src/geometry/coercer.rs (1)

193-193: 💡 Verification agent

🧩 Analysis chain

Consider replacing unimplemented! with proper error handling.

The unimplemented!() macro in the default case for 2D geometry handling will cause a panic at runtime if reached. Consider implementing proper error handling or returning an appropriate error message.


🏁 Script executed:

#!/bin/bash
# Check if the unimplemented!() macro is used in other geometry handlers
echo "Checking for usage of unimplemented!() in geometry handlers:"
rg -n "unimplemented\!\(\)" engine/runtime/action-processor/src/geometry/

Length of output: 305


Below is a new shell script to re-run the verification using a fixed-string search that avoids regex escape issues:

Once you confirm that this search correctly identifies the usage in engine/runtime/action-processor/src/geometry/coercer.rs at line 193 (and any other occurrences, if present), please update accordingly.


Action Required: Replace panic-inducing unimplemented!() with explicit error handling.
The default case in the 2D geometry coercer currently calls unimplemented!(), which will panic at runtime if reached. Consider refactoring this branch to return a well-defined error message or error type, ensuring that unsupported cases are handled gracefully.


🏁 Script executed:

#!/bin/bash
echo "Verifying usage of unimplemented!() in geometry handlers using fixed-string search:"
rg -F "unimplemented!()" engine/runtime/action-processor/src/geometry/

Length of output: 893


Action Required: Replace unimplemented!() with Robust Error Handling
Our updated verification shows that the unimplemented!() macro is not only present in engine/runtime/action-processor/src/geometry/coercer.rs (including line 193) but also appears in several other geometry handler modules. Instead of panicking at runtime, please refactor these branches to return a proper error (or error message) that gracefully handles unsupported cases. This change will improve the resilience of the module across all geometry handlers.

engine/runtime/action-processor/src/feature/reader/citygml/processor.rs (1)

106-112: 💡 Verification agent

🧩 Analysis chain

Potential inconsistency in visibility

While other structs in this PR have had their visibility restricted, FeatureCityGmlReader remains pub. Consider whether this struct also needs to be visible outside the module or if its visibility should be restricted for consistency.


🏁 Script executed:

#!/bin/bash
# Check if FeatureCityGmlReader is used outside this module

# Search for usages of FeatureCityGmlReader in the codebase
echo "Searching for external usages of FeatureCityGmlReader..."
rg "FeatureCityGmlReader" --type rust | grep -v "feature/reader/citygml/processor.rs"

Length of output: 456


Action Required: Restrict Visibility of FeatureCityGmlReader

The verification indicates that while the FeatureCityGmlReaderFactory is used externally (as seen in engine/runtime/action-processor/src/feature/mapping.rs), there are no direct external references to the FeatureCityGmlReader struct itself. For consistency with the other structs in this PR and to minimize the public API surface, please consider restricting the visibility of FeatureCityGmlReader (e.g., remove pub or change it to a less permissive modifier such as pub(crate)).

  • File: engine/runtime/action-processor/src/feature/reader/citygml/processor.rs (Lines 106-112)
  • Suggested Diff:
    -#[derive(Debug, Clone)]
    -pub struct FeatureCityGmlReader {
    +#[derive(Debug, Clone)]
    +struct FeatureCityGmlReader {
        global_params: Option<HashMap<String, serde_json::Value>>,
        params: CompiledFeatureCityGmlReaderParam,
        join_handles: Vec<JoinHandle>,
        thread_pool: Arc<parking_lot::Mutex<rayon::ThreadPool>>,
    }
🧹 Nitpick comments (3)
engine/runtime/action-processor/src/feature/reader/csv.rs (1)

16-18: Consider maintaining restricted visibility for consistency

Unlike the other changes in this PR which restrict visibility, this change makes the offset field more publicly accessible by removing the pub(super) modifier. While the added documentation is valuable, consider keeping the restricted visibility to maintain consistency with the PR's encapsulation goals.

/// The offset of the first row to read
-offset: Option<usize>,
+pub(super) offset: Option<usize>,
engine/runtime/action-processor/src/geometry/coercer.rs (1)

261-261: Consider replacing unimplemented! with proper error handling.

Similar to the 2D geometry handler, the unimplemented!() macro in the default case for 3D geometry handling will cause a panic if reached. Consider implementing proper error handling or returning a descriptive error.

For both unimplemented cases, consider replacing with proper error handling:

-            _ => unimplemented!(),
+            _ => {
+                // Pass through unsupported geometry types unchanged
+                fw.send(ctx.new_with_feature_and_port(feature.clone(), DEFAULT_PORT.clone()));
+            }
engine/runtime/action-processor/src/feature/list_exploder.rs (1)

88-93: Consider improving pattern matching readability

While not directly related to the visibility changes, the nested pattern matching might benefit from restructuring for better readability.

- let Some(AttributeValue::Array(value)) = feature.attributes.get(&self.source_attribute)
- else {
-     fw.send(ctx.new_with_feature_and_port(feature.clone(), DEFAULT_PORT.clone()));
-     return Ok(());
- };
+ match feature.attributes.get(&self.source_attribute) {
+     Some(AttributeValue::Array(value)) => {
+         // Continue with processing value
+     },
+     _ => {
+         fw.send(ctx.new_with_feature_and_port(feature.clone(), DEFAULT_PORT.clone()));
+         return Ok(());
+     }
+ }
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4f50799 and 6a302cb.

⛔ Files ignored due to path filters (2)
  • engine/Cargo.lock is excluded by !**/*.lock, !**/*.lock
  • engine/docs/mdbook/src/action.md is excluded by !**/*.md
📒 Files selected for processing (42)
  • engine/Cargo.toml (1 hunks)
  • engine/plateau-gis-quality-checker/src-tauri/Cargo.toml (1 hunks)
  • engine/runtime/action-processor/src/attribute/file_path_info_extractor.rs (2 hunks)
  • engine/runtime/action-processor/src/attribute/flattener.rs (2 hunks)
  • engine/runtime/action-processor/src/attribute/manager.rs (2 hunks)
  • engine/runtime/action-processor/src/attribute/mapper.rs (2 hunks)
  • engine/runtime/action-processor/src/attribute/mapping.rs (1 hunks)
  • engine/runtime/action-processor/src/attribute/statistics_calculator.rs (3 hunks)
  • engine/runtime/action-processor/src/feature/counter.rs (2 hunks)
  • engine/runtime/action-processor/src/feature/duplicate_filter.rs (2 hunks)
  • engine/runtime/action-processor/src/feature/errors.rs (2 hunks)
  • engine/runtime/action-processor/src/feature/file_path_extractor.rs (2 hunks)
  • engine/runtime/action-processor/src/feature/filter.rs (2 hunks)
  • engine/runtime/action-processor/src/feature/list_exploder.rs (2 hunks)
  • engine/runtime/action-processor/src/feature/lod_filter.rs (3 hunks)
  • engine/runtime/action-processor/src/feature/mapping.rs (1 hunks)
  • engine/runtime/action-processor/src/feature/merger.rs (1 hunks)
  • engine/runtime/action-processor/src/feature/reader.rs (2 hunks)
  • engine/runtime/action-processor/src/feature/reader/citygml/processor.rs (2 hunks)
  • engine/runtime/action-processor/src/feature/reader/csv.rs (1 hunks)
  • engine/runtime/action-processor/src/feature/rhai.rs (2 hunks)
  • engine/runtime/action-processor/src/feature/sorter.rs (2 hunks)
  • engine/runtime/action-processor/src/feature/transformer.rs (2 hunks)
  • engine/runtime/action-processor/src/feature/type_filter.rs (2 hunks)
  • engine/runtime/action-processor/src/feature/writer.rs (2 hunks)
  • engine/runtime/action-processor/src/file/directory_decompressor.rs (2 hunks)
  • engine/runtime/action-processor/src/file/errors.rs (2 hunks)
  • engine/runtime/action-processor/src/file/mapping.rs (1 hunks)
  • engine/runtime/action-processor/src/file/property_extractor.rs (4 hunks)
  • engine/runtime/action-processor/src/geometry/area_on_area_overlayer.rs (2 hunks)
  • engine/runtime/action-processor/src/geometry/bounds_extractor.rs (1 hunks)
  • engine/runtime/action-processor/src/geometry/bufferer.rs (2 hunks)
  • engine/runtime/action-processor/src/geometry/center_point_replacer.rs (2 hunks)
  • engine/runtime/action-processor/src/geometry/clipper.rs (2 hunks)
  • engine/runtime/action-processor/src/geometry/closed_curve_filter.rs (2 hunks)
  • engine/runtime/action-processor/src/geometry/coercer.rs (2 hunks)
  • engine/schema/actions.json (38 hunks)
  • engine/schema/actions_en.json (38 hunks)
  • engine/schema/actions_es.json (38 hunks)
  • engine/schema/actions_fr.json (38 hunks)
  • engine/schema/actions_ja.json (38 hunks)
  • engine/schema/actions_zh.json (38 hunks)
✅ Files skipped from review due to trivial changes (2)
  • engine/plateau-gis-quality-checker/src-tauri/Cargo.toml
  • engine/runtime/action-processor/src/file/property_extractor.rs
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: ci-engine / ci
  • GitHub Check: ci-api / ci-api-test
🔇 Additional comments (198)
engine/Cargo.toml (1)

21-21: Version bump appears appropriate.

This version increment from 0.0.28 to 0.0.30 aligns with the changes observed across the repository, where visibility modifiers are being restricted to enhance encapsulation. This versioning change appropriately reflects the architectural modifications being made.

engine/runtime/action-processor/src/file/mapping.rs (1)

11-11: Appropriate visibility restriction for better encapsulation.

Changing the visibility from pub to pub(crate) for ACTION_FACTORY_MAPPINGS restricts access to only within the current crate, improving encapsulation. This change aligns well with the PR objectives of refactoring to improve encapsulation of factory structs and types.

engine/runtime/action-processor/src/geometry/bounds_extractor.rs (1)

52-52: Good visibility restriction for factory implementation.

The change from pub to pub(super) visibility for the BoundsExtractorFactory struct ensures it's only accessible from the parent module. This is a good encapsulation practice as it appears this factory is only needed within its immediate parent module hierarchy, not externally.

engine/runtime/action-processor/src/attribute/mapping.rs (1)

15-15: Consistent application of visibility restriction pattern.

This change from pub to pub(crate) for ACTION_FACTORY_MAPPINGS maintains consistency with similar changes in other mapping files. This coordinated approach to encapsulation across the codebase is commendable and will improve maintainability.

engine/runtime/action-processor/src/file/errors.rs (2)

4-4: Appropriate visibility restriction for internal error type

Changing the visibility from pub to pub(crate) properly restricts this error type to the crate boundary, which aligns with the encapsulation goals of this PR. This ensures that error handling implementation details remain internal to the crate.


15-15: Consistent visibility for associated types

Good change to match the visibility of the result type with its associated error type. This maintains consistency in the API and prevents exposing implementation details outside the crate.

engine/runtime/action-processor/src/geometry/center_point_replacer.rs (3)

18-18: Improved encapsulation of port constant

Reducing visibility of the POINT_PORT variable from public to module-private is appropriate since this constant should only be used within this module. This helps prevent external code from directly accessing or depending on this implementation detail.


21-21: Factory visibility properly scoped to parent module

Changing the factory's visibility from public to pub(super) is a good encapsulation strategy. This allows the factory to be registered in the parent module while preventing direct access from unrelated code.


59-59: Implementation details properly hidden

Removing the pub modifier from the CenterPointReplacer struct appropriately restricts its visibility to the module level, which is ideal since the processor is constructed by the factory and should not be directly instantiated elsewhere.

engine/runtime/action-processor/src/geometry/closed_curve_filter.rs (3)

18-19: Internal constants properly encapsulated

Restricting the visibility of both CLOSED_PORT and OPEN_PORT constants to module-private scope is appropriate as these are implementation details that shouldn't be directly accessed from external code.


22-22: Factory visibility properly scoped to parent module

Changing the visibility of ClosedCurveFilterFactory from public to pub(super) restricts its accessibility to the parent module, which is appropriate for a factory that should only be registered within the immediate parent module.


65-65: Implementation details properly hidden

Making the ClosedCurveFilter struct private is good practice as it's only needed within this module and is instantiated through its factory. This prevents direct instantiation from external code.

engine/runtime/action-processor/src/feature/rhai.rs (3)

19-19: Factory visibility properly scoped to parent module

Changing the visibility of RhaiCallerFactory from public to pub(super) is appropriate, restricting its accessibility to the parent module where it should be registered.


90-94: Implementation details properly hidden

Making the RhaiCaller struct private is a good encapsulation practice since it's only instantiated within this module through its factory.


98-103: Improved documentation and appropriate visibility

Good enhancements in this section:

  1. Making RhaiCallerParam private since it's only used as an internal parameter type
  2. Adding clear documentation comments explaining the purpose of each field, which improves code readability and maintainability
engine/runtime/action-processor/src/geometry/clipper.rs (3)

21-24: Appropriate visibility reduction for static ports

Making the port constants private to the module aligns with the encapsulation goals of the PR. These ports are only used internally within this module, so restricting their visibility is a good practice.


26-27: Good encapsulation of factory implementation

Changing the ClipperFactory struct from pub to pub(super) properly restricts its visibility to the parent module while still allowing it to be used in the factory mapping. This is consistent with the PR's goal of improving encapsulation.


72-73: Appropriate visibility reduction for implementation struct

Making the Clipper struct private to the module is a good encapsulation practice. External code should only interact with it through the factory pattern, not directly instantiate or manipulate it.

engine/runtime/action-processor/src/feature/merger.rs (1)

26-27: Good encapsulation of factory implementation

Changing the FeatureMergerFactory struct from pub to pub(super) properly restricts its visibility to the parent module while still allowing it to be used in the factory mapping. This is consistent with the PR's goal of improving encapsulation.

engine/runtime/action-processor/src/feature/mapping.rs (1)

22-22: Appropriate restriction of factory mappings visibility

Changing ACTION_FACTORY_MAPPINGS from pub to pub(crate) ensures these mappings are only accessible within the crate, preventing external code from directly accessing or modifying them. This is consistent with the PR's encapsulation goals.

engine/runtime/action-processor/src/feature/errors.rs (2)

5-5: LGTM! Improved encapsulation by restricting visibility.

Changing the visibility from pub(crate) to pub(super) properly restricts the enum to be used only within the parent module and its submodules, which aligns with the PR objective of improving encapsulation.


58-58: LGTM! Visibility restriction consistent with pattern.

Consistently restricting the Result type alias visibility to match the FeatureProcessorError enum's visibility is a good practice, maintaining coherent access patterns.

engine/runtime/action-processor/src/feature/duplicate_filter.rs (2)

14-14: LGTM! Improved encapsulation with restricted visibility.

Changing visibility from pub to pub(super) appropriately limits the factory struct's accessibility to the parent module and its submodules, supporting the encapsulation objective.


56-56: LGTM! Implementation detail correctly made private.

Good change making the implementation struct private, as it should only be instantiated by the factory. This improves encapsulation by hiding implementation details that don't need external visibility.

engine/runtime/action-processor/src/file/directory_decompressor.rs (2)

18-18: LGTM! Properly restricted factory visibility.

The change from pub(crate) to pub(super) correctly narrows the visibility scope of the factory struct, aligning with the encapsulation objective of the PR.


83-84: LGTM! Helpful documentation added.

Adding the documentation comment for the archive_attributes field improves code readability by clarifying the field's purpose. This kind of inline documentation is valuable for understanding the code's functionality.

engine/runtime/action-processor/src/feature/sorter.rs (3)

19-19: LGTM! Improved factory encapsulation.

Changing visibility from pub to pub(super) properly restricts access to the factory struct, aligning with the encapsulation objective.


82-82: LGTM! Implementation correctly made private.

Good change making the implementation struct private, as it should only be instantiated by the factory. This enhances encapsulation by hiding implementation details.


89-94: LGTM! Improved documentation and encapsulation.

Great improvements to this struct:

  1. Making it private enhances encapsulation
  2. Adding documentation comments clarifies the purpose of each field

These changes improve both code maintainability and readability.

engine/runtime/action-processor/src/feature/writer.rs (4)

22-22: Visibility change aligns with encapsulation principles.

Restricting FeatureWriterFactory to pub(super) provides better encapsulation while still allowing the factory to be used by parent modules.


128-132: Appropriate visibility restriction for implementation details.

Making FeatureWriter private is a good encapsulation decision as it's only needed within this module and by the factory. Note that the buffer field still maintains pub(super) visibility as it may be needed by other components in the parent module.


136-139: Improved documentation and visibility control.

Adding documentation for the CommonWriterParam while restricting its visibility is a positive change. This makes the code more maintainable while preserving appropriate access restrictions.


143-159: Appropriate visibility restriction for parameter types.

Making FeatureWriterParam private restricts its usage to only where it's needed while maintaining the schema generation functionality through the factory's parameter_schema method. This improves encapsulation without affecting functionality.

engine/runtime/action-processor/src/feature/transformer.rs (4)

20-20: Visibility change follows module structure principles.

Restricting FeatureTransformerFactory to pub(super) limits its accessibility to the parent module, which aligns with the encapsulation objective of this PR.


92-95: Improved encapsulation of implementation details.

Making FeatureTransformer private properly hides implementation details while still allowing it to be instantiated by the factory. This is good design practice.


99-102: Enhanced documentation with appropriate visibility.

Adding descriptive documentation for the transformers field while making FeatureTransformerParam private improves code understanding and encapsulation. The comment clearly describes the purpose of the field.


107-109: Documentation improvement for expression field.

Adding descriptive comments for the expr field enhances code readability and maintainability, making it clear what the expression does in the context of transformation.

engine/runtime/action-processor/src/feature/type_filter.rs (3)

17-17: Restricting UNFILTERED_PORT visibility improves encapsulation.

Making UNFILTERED_PORT private is appropriate since it only needs to be accessed within this module. The constant is still accessible to the factory and processor implementations.


20-20: Appropriate visibility for factory struct.

Changing FeatureTypeFilterFactory to pub(super) restricts its visibility to the parent module, which aligns with the design goal of improving encapsulation.


79-82: Improved documentation and visibility restriction.

Making FeatureTypeFilter private while adding descriptive documentation for the target_types field enhances both encapsulation and code clarity. The comment clearly explains the purpose of the field.

engine/runtime/action-processor/src/geometry/coercer.rs (2)

21-21: Factory visibility appropriate for module structure.

Restricting GeometryCoercerFactory to pub(super) is consistent with the encapsulation pattern applied throughout this PR and properly limits its visibility to the parent module.


85-88: Enhanced documentation and encapsulation.

Making GeometryCoercer private while adding clear documentation for the coercer_type field improves both encapsulation and code maintainability. The comment effectively explains the field's purpose.

engine/runtime/action-processor/src/attribute/flattener.rs (3)

18-18: Visibility appropriately restricted for better encapsulation

Changing the visibility from pub to pub(super) properly restricts access to this factory implementation to only the parent module, improving encapsulation.


78-78: Properly restricting struct visibility

Converting the AttributeFlattener struct from public to private is appropriate since it's only used internally within this module and doesn't need to be exposed externally.


84-86: Good documentation and proper encapsulation

The addition of documentation comments and making AttributeFlattenerParam private improve both code readability and encapsulation. This struct now correctly has limited scope since it's only needed within this module.

engine/runtime/action-processor/src/feature/reader/citygml/processor.rs (2)

22-22: Appropriate visibility restriction to crate level

Changing the factory's visibility from pub to pub(crate) restricts access to within the crate, which improves encapsulation while still allowing the factory to be used by other modules within the same crate.


117-120: Helpful documentation for parameter fields

The added documentation for the dataset and flatten fields provides clear explanations of their purpose, making the code more maintainable.

engine/runtime/action-processor/src/attribute/file_path_info_extractor.rs (2)

19-19: Visibility appropriately restricted for better encapsulation

Changing the visibility from pub to pub(super) properly restricts access to this factory to only the parent module, improving encapsulation.


78-80: Good documentation and visibility restriction

Making the AttributeFilePathInfoExtractor struct private and adding clear documentation for the attribute field improves both encapsulation and code readability.

engine/runtime/action-processor/src/feature/list_exploder.rs (2)

18-18: Visibility appropriately restricted for better encapsulation

Changing the visibility from pub to pub(super) properly restricts access to this factory to only the parent module, improving encapsulation.


77-80: Good documentation and visibility restriction

Making the ListExploder struct private and adding clear documentation for the source_attribute field improves both encapsulation and code readability.

engine/runtime/action-processor/src/feature/filter.rs (5)

18-18: Appropriate visibility restriction for UNFILTERED_PORT

Good change. Restricting the visibility of UNFILTERED_PORT from pub static to module-private static improves encapsulation since this constant is only used within this module's implementation details.


21-21: Improved encapsulation of FeatureFilterFactory

Changing FeatureFilterFactory from pub to pub(super) is appropriate. This restricts its visibility to the parent module, which aligns with the PR objective of improving encapsulation while still allowing the factory to be registered by the parent module.


96-96: Appropriate visibility restriction for FeatureFilter

Making FeatureFilter private (removing pub) is a good encapsulation decision since this struct is only used internally within this module as the concrete implementation produced by the factory pattern.


103-106: Improved documentation and encapsulation for FeatureFilterParam

Good changes here:

  1. Making FeatureFilterParam private improves encapsulation
  2. Adding a descriptive comment for the conditions field enhances code documentation

This follows good API design principles by hiding implementation details while documenting the purpose of parameters.


111-114: Enhanced field documentation in Condition struct

Adding descriptive comments to the expr and output_port fields improves code readability and maintainability, making it clearer what these fields are used for without having to trace through the implementation.

engine/runtime/action-processor/src/geometry/bufferer.rs (2)

24-24: Improved encapsulation of BuffererFactory

Changing BuffererFactory from pub to pub(super) properly restricts its visibility to the parent module, which aligns with the PR objective of improving encapsulation while still allowing the factory to be registered.


88-95: Enhanced Bufferer struct with improved documentation and encapsulation

The changes to the Bufferer struct include:

  1. Making it private (removing pub) to improve encapsulation
  2. Adding descriptive comments for all fields, enhancing code documentation
  3. Field types remain appropriate for their purpose

These are good improvements that make the code more maintainable while restricting access to implementation details.

engine/runtime/action-processor/src/feature/reader.rs (4)

23-23: Improved encapsulation of FeatureReaderFactory

Changing FeatureReaderFactory from pub to pub(super) properly restricts its visibility to the parent module, which aligns with the PR objective of improving encapsulation while still allowing the factory to be registered.


138-141: Appropriate visibility restriction for FeatureReader

Making FeatureReader private (removing pub) is a good encapsulation decision since this struct is only used internally within this module as the concrete implementation produced by the factory pattern.


145-148: Improved encapsulation and documentation for CommonReaderParam

Good changes here:

  1. Making CommonReaderParam private (removing pub)
  2. Adding a descriptive comment for the dataset field
  3. The dataset field maintains appropriate visibility within the struct

These changes enhance encapsulation while improving code documentation.


152-152: Appropriate visibility restriction for FeatureReaderParam

Making FeatureReaderParam private (removing pub) improves encapsulation, as this enum is only needed within this module for interpreting user parameters and generating the appropriate reader implementation.

engine/runtime/action-processor/src/feature/counter.rs (4)

60-60: Improved encapsulation of FeatureCounterFactory

Changing FeatureCounterFactory from pub to pub(super) properly restricts its visibility to the parent module, which aligns with the PR objective of improving encapsulation while still allowing the factory to be registered.


123-126: Appropriate visibility restriction for FeatureCounter

Making FeatureCounter private (removing pub) is a good encapsulation decision since this struct is only used internally within this module as the concrete implementation produced by the factory pattern.


130-137: Enhanced FeatureCounterParam with new fields and improved documentation

Excellent improvements to the FeatureCounterParam struct:

  1. Making it private (removing pub) improves encapsulation
  2. Adding descriptive comments for all fields enhances code documentation
  3. New fields group_by and output_attribute provide useful functionality for grouping features and designating where to output the count

These changes both improve the API design and extend the functionality in a sensible way.


146-167:

❓ Verification inconclusive

Verify that the implementation handles the new fields correctly

The implementation appears to correctly use the new group_by and output_attribute fields. It creates a grouping key from the specified attributes or uses a default "_all" key when no grouping is specified, then uses the output_attribute field to determine where to store the count in the feature.


🏁 Script executed:

#!/bin/bash
# Search for tests that verify the new grouping functionality

# Look for test files related to the counter
fd "test.*counter" --type f

# Search for usage of the counter with group_by parameter
rg -A 10 "group_by.*FeatureCounter" --type rust

Length of output: 79


Verify test coverage for new grouping functionality in counter implementation

The code correctly incorporates the new group_by and output_attribute fields by constructing a grouping key when available (or falling back to "_all") and correctly inserting the counter value into the feature. However, the executed scripts did not yield any tests verifying this behavior. Please manually check that tests exist for both scenarios (with and without group_by specified) or consider adding them to ensure proper coverage.

engine/runtime/action-processor/src/attribute/statistics_calculator.rs (4)

21-21: Appropriate encapsulation improvement

Changing the visibility from pub to pub(super) for StatisticsCalculatorFactory improves encapsulation by restricting access to only the parent module, aligning with the PR objective of improving factory struct visibility.


99-99: Good access restriction for implementation details

Restricting the StatisticsCalculator struct's visibility from public to private properly hides the implementation details from external modules, which is a good encapsulation practice.


115-121: Documentation and visibility improvement

The added documentation comments make the purpose of fields clearer, while restricting visibility of StatisticsCalculatorParam appropriately encapsulates this configuration type.


127-130: Helpful field documentation

The added documentation comments on these fields provide clear descriptions of their purpose, which improves code maintainability and helps future developers understand the code better.

engine/runtime/action-processor/src/geometry/area_on_area_overlayer.rs (4)

24-25: Good encapsulation of module constants

Changing the visibility of AREA_PORT and REMNANTS_PORT from pub to private appropriately restricts their usage to within this module, which is a good practice since these ports are only needed internally.


28-28: Appropriate factory visibility restriction

Changing AreaOnAreaOverlayerFactory from pub to pub(super) aligns with the PR objective of improving encapsulation by ensuring the factory is only accessible from the parent module.


96-99: Documentation and access control improvement

Adding documentation for the group_by field and restricting visibility of AreaOnAreaOverlayerParam improves both code clarity and encapsulation.


102-102: Implementation detail properly hidden

Restricting visibility of AreaOnAreaOverlayer to the current module is appropriate since it's an implementation detail that shouldn't be exposed outside the module.

engine/runtime/action-processor/src/attribute/mapper.rs (4)

19-19: Appropriate factory encapsulation

Changing the visibility from pub to pub(super) for AttributeMapperFactory properly restricts access to only the parent module, supporting the PR objective of improving encapsulation.


113-116: Good documentation and visibility adjustment

The added documentation and restricted visibility for AttributeMapperParam improves both code clarity and encapsulation of this configuration type.


121-133: Well-documented struct fields

Adding documentation comments to all fields of the Mapper struct significantly improves code clarity by explaining the purpose of each field, which will be helpful for future maintenance.


136-137: Appropriate visibility restriction

Restricting visibility of CompiledAttributeMapperParam to internal use only is appropriate as it's an implementation detail that shouldn't be exposed outside this module.

engine/runtime/action-processor/src/attribute/manager.rs (6)

21-21: Appropriate factory encapsulation

Changing the visibility from pub to pub(super) for AttributeManagerFactory properly restricts access to only the parent module, supporting the PR objective of improving encapsulation.


87-90: Implementation detail properly hidden

Restricting visibility of AttributeManager to the current module is appropriate since it's an implementation detail that shouldn't be exposed outside the module.


94-97: Good documentation and visibility adjustment

The added documentation comment for the operations field and restricted visibility for AttributeManagerParam improves both code clarity and encapsulation.


101-108: Well-documented struct fields

Adding documentation comments to all fields of the Operation struct significantly improves code clarity by explaining the purpose of each field.


112-117: Appropriate encapsulation of enum

Restricting visibility of the Method enum to the current module appropriately encapsulates this implementation detail.


120-136: Proper encapsulation of implementation details

Restricting visibility of the Operate enum to the current module is appropriate since it's an implementation detail that contains the actual logic but should not be exposed outside the module.

engine/runtime/action-processor/src/feature/file_path_extractor.rs (5)

21-21: Improved encapsulation by restricting visibility.

The static variable UNFILTERED_PORT has been changed from pub to private visibility, limiting its access to only within the current module, which aligns with the encapsulation goals of this PR.


24-24: Good visibility restriction for factory struct.

The visibility of FeatureFilePathExtractorFactory has been changed from pub to pub(super), restricting its access to only the parent module, which is appropriate since this factory should only be used by the feature module.


100-106: Improved struct documentation and appropriate visibility restriction.

The struct FeatureFilePathExtractorParam has been made private (restricting visibility) and received proper documentation for its fields. This improves both encapsulation and code readability.


110-114: Appropriate visibility restriction for compiled param struct.

The visibility of FeatureFilePathExtractorCompiledParam has been properly restricted from public to private, which is a good practice since this is an internal implementation detail.


117-120: Good encapsulation of implementation struct.

The visibility of FeatureFilePathExtractor has been properly restricted from public to private, following the principle of keeping implementation details hidden and only exposing what's necessary.

engine/runtime/action-processor/src/feature/lod_filter.rs (4)

18-23: Improved encapsulation of port definitions.

The static port variables (UP_TO_LOD0 through UP_TO_LOD4 and UNFILTERED_PORT) have been changed from pub to private visibility, appropriately limiting their access to only within this module.


26-26: Appropriate visibility restriction for factory struct.

The visibility of FeatureLodFilterFactory has been changed from pub(crate) to pub(super), further restricting its access to only the parent module, which aligns with the encapsulation goals.


96-99: Improved struct documentation and visibility restriction.

The FeatureLodFilterParam struct has been made private and received proper documentation for its filter_key field, improving both encapsulation and code readability.


106-110: Appropriate encapsulation of implementation struct.

The visibility of FeatureLodFilter has been properly restricted to private, which is appropriate since this is an internal implementation detail that should not be directly accessible from outside the module.

engine/schema/actions_zh.json (14)

13-14: Enhanced schema documentation with descriptive title.

Added a clear title "Group by" to the groupBy property, improving the usability and readability of the JSON schema.


365-370: Improved property definition with title and allOf pattern.

Enhanced the attribute property in the AttributeFilePathInfoExtractor processor with a descriptive title and proper structure using the allOf pattern. This approach preserves the reference to the base definition while adding contextual information.


404-405: Added descriptive title to flatten attributes.

Added a clear title "Attributes to flatten" to the attributes property in the AttributeFlattener processor, making the purpose of this property more evident to users.


441-442: Improved operations property documentation.

Added a descriptive title "Operations to perform" to the operations property in the AttributeManager processor, improving schema clarity.


473-478: Enhanced method property with title and allOf pattern.

Improved the method property definition by adding a descriptive title and using the allOf pattern to reference the base definition while adding contextual information.


1192-1195: Enhanced countStart property definition.

Improved the countStart property in the FeatureCounter processor with a descriptive title and explicit type information, making the schema more informative and easier to use.


1146-1152: Improved dataset property definition with title and allOf pattern.

Enhanced the dataset property in the FeatureCityGmlReaderParam with a descriptive title "Dataset to read" and proper structure using the allOf pattern.


630-636: Enhanced buffer type property with descriptive title.

Improved the bufferType property in the Bufferer processor with a descriptive title and proper structure using the allOf pattern, making the schema more intuitive.


1301-1307: Improved source dataset property with descriptive title.

Enhanced the sourceDataset property in the FeatureFilePathExtractor processor with a descriptive title and proper structure using the allOf pattern.


1405-1411: Enhanced filter key property with title and allOf pattern.

Improved the filterKey property in the FeatureLodFilter processor with a descriptive title "Attributes to filter by" and proper structure using the allOf pattern.


3564-3565: Improved aggregate attribute property with descriptive title.

Added a clear title "Attribute to aggregate by" to the aggregateAttribute property in the StatisticsCalculator processor, improving the usability of the schema.


3586-3587: Enhanced calculations property with descriptive title.

Added a descriptive title "Calculations to perform" to the calculations property in the StatisticsCalculator processor, making the purpose of this property more evident.


1297-1299: Added descriptive title to extractArchive property.

Added a clear title "Extract archive" to the extractArchive property, enhancing schema documentation.


1290-1291: Added descriptive title to destPrefix property.

Added a clear title "Destination prefix" to the destPrefix property, improving schema clarity.

engine/schema/actions_fr.json (14)

12-21: Enhanced Documentation for "groupBy" in AreaOnAreaOverlayerParam

The addition of "title": "Group by" clearly explains the purpose of the property. This improves the schema’s self-documentation. Please verify that the same naming pattern is used in other related schemas for consistency.


363-371: Improved Title for "attribute" in AttributeFilePathInfoExtractor

Adding the title "Attribute to extract file path from" clarifies what the property represents. This change will help users of the schema understand its intended usage.


402-409: Added Title for "attributes" in AttributeFlattener

Providing a title "Attributes to flatten" makes the purpose of this property explicit. This documentation addition aids both schema consumers and maintainers.


440-446: Documented "operations" in AttributeManager

The new title "Operations to perform" improves clarity for the operations array. It helps clarify that this field details what operations should be applied during attribute management.


518-524: Added Title for "mappers" in AttributeMapper

The inclusion of "title": "Mappers" on the mappers property makes the JSON definition easier to understand at a glance. This is a useful enhancement for schema users.


533-582: Comprehensive Titles in Mapper Definitions within AttributeMapper

Titles have been added for several properties:

  • "attribute" now has "title": "Attribute name".
  • "childAttribute" now has "title": "Child attribute name".
  • "expr" is now documented as "title": "Expression to evaluate".
  • "multipleExpr" gets "title": "Expression to evaluate multiple attributes".
  • "parentAttribute" now carries "title": "Parent attribute name".
  • "valueAttribute" is now labeled "title": "Attribute name to get value from".

These changes collectively enhance clarity by describing exactly what each field represents. Ensure that the wording and style remain consistent with similar definitions elsewhere in the schema.


975-981: Improved Title for "archiveAttributes" in DirectoryDecompressor

The added title "Attribute to extract file path from" on the archiveAttributes property makes its purpose clearer. Please double-check that this phrasing is consistent with similar extraction properties.


1145-1152: Enhanced Documentation in FeatureCityGmlReader (Dataset)

Adding "title": "Dataset to read" to the dataset property—combined with the use of the allOf composition—improves both clarity and schema maintainability. This descriptive approach helps users know what value to provide.


1153-1159: Added Title for "flatten" in FeatureCityGmlReader

The "flatten" property now includes "title": "Flatten the dataset", which immediately informs users of its purpose. This is a positive improvement in descriptive documentation.


1191-1210: Improved Titles in FeatureCounter Schema

The additions include:

  • "title": "Start count" for the countStart property.
  • "title": "Attributes to group by" for the groupBy property.
  • "title": "Attribute to output the count" for outputAttribute.

These titles make the schema more self-explanatory. Please ensure consistency in capitalization and phrasing across the project.


1688-1694: Enhanced Title for "transformers" in FeatureTransformer

The new title "Transformers to apply" for the transformers property provides an immediate understanding of the intended function. This clear labeling assists both documentation and user implementation.


3434-3449: Improved Documentation in RhaiCaller Processor

Both the "isTarget" and "process" properties have been augmented with descriptive titles:

  • "Rhai script to determine if the feature is the target" for isTarget.
  • "Rhai script to process the feature" for process.

These additions are very useful for developers integrating or modifying Rhai scripts. They help clarify the role of each script.


3563-3591: Enhanced Documentation for StatisticsCalculator Properties

Titles have been added for:

  • "aggregateAttribute" as "Attribute to aggregate by",
  • "aggregateName" as "Name of the attribute to aggregate by", and
  • "calculations" as "Calculations to perform".

This improves clarity on how statistical calculations are defined. It is a noteworthy enhancement for both users and developers.


3604-3619: Improved Titles in Calculation Definitions for StatisticsCalculator

Within the Calculation definition:

  • The "expr" property now has "title": "Calculation to perform".
  • The "newAttribute" property now carries "title": "New attribute name".

These titles make the intent of the fields explicit and align with the overall goal of enhanced documentation.

engine/schema/actions.json (27)

12-21: Add descriptive title for "groupBy"
Adding the "title": "Group by" property to the groupBy field in the AreaOnAreaOverlayer parameter improves clarity by clearly conveying the field’s purpose.


364-371: Document extractor attribute in AttributeFilePathInfoExtractor
The added title "Attribute to extract file path from" aids users in understanding which attribute is used for file path extraction.


403-409: Clarify "attributes" property in AttributeFlattener
The new title "Attributes to flatten" is helpful for consumers of the schema by making the purpose of this property explicit.


468-471: Improve description for Operation attribute in AttributeManager
Adding "title": "Attribute name" to the operation’s attribute property improves self‐documentation.


472-479: Enhance clarity for operation method in AttributeManager
The new title "Operation to perform" and wrapping the reference inside an allOf array makes it clearer what value is expected.


518-524: Label the mappers field in AttributeMapper
The added "title": "Mappers" for the mappers property straightforwardly describes its contents.


533-539: Provide explicit title for Mapper attribute name
Including "title": "Attribute name" for the attribute property in each mapper helps schema consumers know that this field expects an attribute identifier.


540-546: Document child attribute in Mapper
The title "Child attribute name" clearly indicates the purpose of the childAttribute field.


547-557: Clarify expression field in Mapper
The new title "Expression to evaluate" for the expr property makes this field’s function unambiguous.


558-567: Label multiple expressions in Mapper
Adding "title": "Expression to evaluate multiple attributes" clarifies that the field supports multiple evaluations.


569-575: Define parent attribute in Mapper
The title "Parent attribute name" improves the understandability of the parentAttribute field.


576-582: Improve documentation for value extraction in Mapper
Using "title": "Attribute name to get value from" makes the purpose of the valueAttribute property more explicit.


975-981: Add documentation for archive attributes in DirectoryDecompressor
The added title "Attribute to extract file path from" for the archiveAttributes property enhances clarity regarding which attribute holds file path data.


1290-1295: Clarify destination prefix in FeatureFilePathExtractor
The new title "Destination prefix" for the destPrefix field aids users in understanding its role in specifying output paths.


1297-1299: Enhance field description for archive extraction
By adding "title": "Extract archive", the schema now clearly communicates that this Boolean controls archive extraction behavior.


1301-1307: Clarify source dataset in FeatureFilePathExtractor
The added title "Source dataset" and the allOf wrapper for the reference reinforce that this property specifies the dataset to use.


1339-1345: Document filtering conditions in FeatureFilter
Adding "title": "Conditions to filter by" to the conditions field improves readability and helps users understand this field’s role in filtering.


1405-1411: Improve documentation for filtering key in FeatureLodFilter
The title "Attributes to filter by" makes the purpose of the filterKey property explicit for consumers of the schema.


1689-1694: Label transformers in FeatureTransformer
The title "Transformers to apply" for the transformers field clearly conveys that this is an array of transformation operations.


2789-2794: Clarify attribute to explode in ListExploder
By adding "description": "The attribute to explode" and wrapping the reference in an allOf array, this change improves documentation on how the list expansion is determined.


3435-3441: Document RhaiCaller "isTarget" script
The added title "Rhai script to determine if the feature is the target" for the isTarget property clarifies its purpose in the RhaiCaller processor.


3443-3449: Clarify RhaiCaller "process" script
The new title "Rhai script to process the feature" for the process property improves documentation of how the Rhai script is used to transform features.


3564-3573: Document aggregate attribute in StatisticsCalculator
The added title "Attribute to aggregate by" enhances clarity for the aggregateAttribute property, helping users understand which attribute is used for aggregation.


3575-3584: Label aggregate name in StatisticsCalculator
Including "title": "Name of the attribute to aggregate by" for the aggregateName field provides additional context regarding the naming of the aggregated output.


3586-3591: Clarify calculations array in StatisticsCalculator
The new title "Calculations to perform" on the calculations property makes it clear that this field contains an array of calculation objects.


3605-3611: Improve documentation for calculation expression
The title "Calculation to perform" for the expr property inside each Calculation object clarifies the purpose of the expression that defines the calculation.


3613-3619: Label new attribute in Calculation
Adding "title": "New attribute name" to the newAttribute property helps users quickly understand that this field specifies the name for the calculated attribute.

engine/schema/actions_en.json (14)

12-21: Enhanced Grouping Documentation for AreaOnAreaOverlayer
The groupBy property now includes a descriptive title ("Group by") to improve schema clarity and usability.


363-371: Improved Title for Attribute Extraction in AttributeFilePathInfoExtractor
The property attribute now clearly specifies its purpose with the title "Attribute to extract file path from" along with an allOf reference.


403-409: Clarified Title for Attributes in AttributeFlattener
The property attributes now has the title "Attributes to flatten", enhancing the documentation for this processor.


440-446: Added Title for Operations in AttributeManager
The operations property now includes the title "Operations to perform" to better describe its intent.


467-491: Enhanced Documentation for Operation Object in AttributeManager
Within the Operation definition, titles have been added:

  • "Attribute name" for the attribute field,
  • "Operation to perform" for the method field (with an allOf reference), and
  • "Value to use for the operation" for the value field.
    These improvements will aid in clarity and consistency.

518-524: Added Title for Mappers Property in AttributeMapper
The mappers property now includes the title "Mappers", making its purpose more obvious.


533-582: Refined Titles for Mapper Fields in AttributeMapper
Inside the Mapper definition, the following titles have been introduced:

  • "Attribute name" for attribute,
  • "Child attribute name" for childAttribute,
  • "Expression to evaluate" for expr,
  • "Expression to evaluate multiple attributes" for multipleExpr,
  • "Parent attribute name" for parentAttribute, and
  • "Attribute name to get value from" for valueAttribute.

These refinements greatly improve the schema’s self-documentation.


629-646: Enhanced Bufferer Property Documentation
The Bufferer processor now clearly defines its properties with titles:

  • "Buffer type" (with an allOf reference to BufferType) for bufferType,
  • "Buffer distance" for distance, and
  • "Buffer interpolation angle" for interpolationAngle.
    These additions help users understand what each property controls.

975-981: Updated Title for Archive Attributes in DirectoryDecompressor
The archiveAttributes property now has the title "Attribute to extract file path from", which improves clarity regarding its purpose.


1289-1307: Improved Title Labels in FeatureFilePathExtractor
For the FeatureFilePathExtractor processor, the following enhancements were made:

  • "Destination prefix" for destPrefix,
  • "Extract archive" for extractArchive, and
  • "Source dataset" (with an allOf reference) for sourceDataset.
    These changes improve readability and user comprehension of the schema.

1637-1650: Enhanced Sorting Parameter Descriptions in FeatureSorter
The sorting parameters now include:

  • "Attributes to sort by" for the attributes property, and
  • "Order to sort by" (with an allOf reference) for the order property.
    This provides clearer guidance for users configuring feature sorting.

3435-3449: Improved Descriptions in RhaiCaller Processor
The parameters for RhaiCaller have been updated with descriptive titles:

  • "Rhai script to determine if the feature is the target" for isTarget, and
  • "Rhai script to process the feature" for process.
    These improvements ensure that users understand the scripts’ respective roles.

3564-3592: Clarified Parameters in StatisticsCalculator
The changes add clear titles for:

  • "Attribute to aggregate by" (aggregateAttribute),
  • "Name of the attribute to aggregate by" (aggregateName), and
  • "Calculations to perform" (calculations).
    These updates enhance the self-descriptiveness of the statistics calculation parameters.

2777-2813: Added Descriptive Help in ListExploder
For the ListExploder processor, the sourceAttribute property now includes a description ("The attribute to explode") using an allOf reference. This provides clearer guidance on its intended use.

engine/schema/actions_es.json (25)

13-13: Enhanced Documentation for "groupBy" Property
The addition of the title "Group by" on line 13 clearly documents the intended purpose of the property in the AreaOnAreaOverlayerParam schema. This improves readability and self‐documentation without affecting functionality.


365-370: Improved Clarity in AttributeFilePathInfoExtractor
The modifications for the "attribute" property now include a descriptive title "Attribute to extract file path from" and wrap the $ref inside an allOf construct. This not only makes the schema self‐explanatory but also aligns its structure with similar extractors.


404-408: Enhanced Title for Attributes in AttributeFlattener
Adding the title "Attributes to flatten" to the "attributes" property enhances the clarity of its purpose. This consistent documentation aids consumers of the schema in understanding its role.


441-444: Improved Documentation for Operations in AttributeManager
The "operations" property now carries the title "Operations to perform", which makes its intent immediately clear. Using an allOf construct later in similar sections standardizes the schema design.


468-470: Clarification for Operation Attribute Name
The "attribute" field within an operation now explicitly includes the title "Attribute name". This enhancement clarifies the expected content and improves the self-documenting nature of the schema.


473-478: Descriptive Title for the Operation Method
The "method" property now features the title "Operation to perform" and wraps its reference within an allOf. This adjustment improves clarity and consistency across schema definitions.


481-482: Clear Title for Operation Value
Introducing the title "Value to use for the operation" for the "value" property makes its purpose more explicit. This minor enhancement aids users in understanding what value is expected.


519-522: Improved Title for Mappers in AttributeMapper
The "mappers" property now includes the concise title "Mappers", which clarifies that this field expects a list of mapper definitions. This streamlined title is a welcome documentation improvement.


534-536: Enhanced Title for Mapper Attribute Name
In the definition of a Mapper, the "attribute" property now has the title "Attribute name", enhancing readability and ensuring consistency with similar definitions throughout the schema.


541-543: Clear Title for Child Attribute
Adding the title "Child attribute name" to the "childAttribute" property improves clarity, indicating its role in mapping nested attribute structures.


548-551: Enhanced Expression Documentation for Mapper
The "expr" property within a Mapper now carries the title "Expression to evaluate". This explicit label helps schema users understand that this field accepts an evaluative expression.


559-562: Improved Title for Multiple Expressions in Mapper
The "multipleExpr" property now includes the title "Expression to evaluate multiple attributes", which clearly indicates its purpose and aligns its style with other expression properties.


570-573: Added Clarity for Parent Attribute Name
The "parentAttribute" property now has the title "Parent attribute name", providing additional context regarding how the attribute fits into the mapper’s data transformation logic.


577-579: Detailed Title for Value Attribute Extraction
The "valueAttribute" field now explicitly states "Attribute name to get value from", thereby enhancing the schema’s self-documentation and readability.


1146-1151: Improved Dataset Documentation in FeatureCityGmlReader
In the FeatureCityGmlReader processor, the "dataset" property now includes the title "Dataset to read" and is wrapped in an allOf construct. This enriches the schema documentation and guides users on the expected content.


1154-1159: Enhanced Flatten Property Description
The "flatten" property now comes with the title "Flatten the dataset", which makes it immediately apparent that this flag controls whether the input dataset should be flattened.


1905-1907: Improved Title in FilePropertyExtractor
The "filePathAttribute" property now includes the title "Attribute to extract file path from", enhancing the schema’s self-explanatory nature and ensuring consistency with similar properties elsewhere.


2789-2794: Detailed Description in ListExploder Source Attribute
For the "sourceAttribute" property in ListExploder, adding the description "The attribute to explode" along with an allOf construct significantly clarifies its intended use.


3564-3572: Clear Documentation for Aggregate Attribute in StatisticsCalculator
The "aggregateAttribute" property now features the title "Attribute to aggregate by" along with an anyOf wrapper. This enhances clarity and ensures consistency in naming conventions.


3575-3583: Enhanced Title for Aggregation Name
The "aggregateName" property now includes the title "Name of the attribute to aggregate by", further clarifying its role in the calculation process.


3586-3591: Improved Clarity of Calculations Definition
By adding the title "Calculations to perform" to the "calculations" property, the schema now better documents what is expected in this array. This addition contributes to overall clarity.


3605-3611: Detailed Title for Calculation Expression
Within the Calculation object, the "expr" property now includes the title "Calculation to perform", offered via an allOf construct. This clearly indicates that the field represents the expression defining the calculation.


3613-3619: Added Title for New Attribute in Calculation
The "newAttribute" property within the Calculation object now comes with the title "New attribute name", which improves understandability and documents its purpose precisely.


3435-3440: Enhanced Rhai Script Documentation for isTarget
The "isTarget" property in the RhaiCaller processor now carries the title "Rhai script to determine if the feature is the target", with its value wrapped in an allOf construct. This improvement makes the script’s purpose explicit.


3443-3449: Improved Rhai Script Documentation for Process
The "process" property also now includes a descriptive title "Rhai script to process the feature", ensuring that its function is clearly understood. The use of allOf remains consistent with similar schema elements.

engine/schema/actions_ja.json (11)

12-21: Enhanced Documentation for "groupBy" in AreaOnAreaOverlayer
The addition of "title": "Group by" clearly labels the purpose of the groupBy property, making the schema more self-descriptive. This improvement helps users immediately understand the expected grouping behavior.


363-371: Clarification in AttributeFilePathInfoExtractor Schema
The new title "Attribute to extract file path from" (with the accompanying use of "allOf": [...]) improves clarity by explicitly stating the role of the property. This enhances consistency with similar schema definitions.


403-409: Improved Metadata in AttributeFlattener
Adding "title": "Attributes to flatten" provides a clearer description for the property. This change increases readability and aligns with documentation patterns seen elsewhere in the schema.


440-490: Enhanced Descriptive Information in AttributeManager
The updates here—in particular, the newly added title "Operations to perform" for the operations property and the refined titles for its sub-properties ("Attribute name", "Operation to perform", and "Value to use for the operation")—significantly aid in understanding the expected structure. This approach minimizes ambiguity when configuring operation details.


518-582: Comprehensive Documentation Updates in AttributeMapper
The added titles for properties within the mapper definition—namely:
"Mappers" for the overall mappers property,
"Attribute name" for the attribute field,
"Child attribute name" for the childAttribute field,
"Expression to evaluate" for expr,
"Expression to evaluate multiple attributes" for multipleExpr,
"Parent attribute name" for parentAttribute, and
"Attribute name to get value from" for valueAttribute—
enhance the clarity of the schema and support consistency with similar definitions.


975-981: Clarification in DirectoryDecompressor Schema
The new title "Attribute to extract file path from" for the archiveAttributes property immediately conveys its purpose. Please verify that this phrasing is aligned with similar properties across related schemas.


1525-1532: Improved Descriptor for "dataset" in FeatureReader
Assigning the title "Dataset" to the dataset property (using an allOf reference to Expr) clarifies its intended use. This simple yet effective update enhances the self-documentation of the schema.


1636-1650: Enhanced Titles in FeatureSorter
The addition of "title": "Attributes to sort by" for the attributes property and "title": "Order to sort by" for the order property significantly improves the readability of the schema. These changes help ensure users understand the expected input formats and sorting criteria.


2789-2795: Descriptive Update in ListExploder Configuration
The incorporation of "description": "The attribute to explode" along with the appropriate reference via "allOf" makes the purpose of the sourceAttribute property in ListExploder explicit, thereby improving overall schema clarity.


3435-3449: Improved Clarity in RhaiCaller Schema
The enhanced titles—"Rhai script to determine if the feature is the target" for the isTarget property and "Rhai script to process the feature" for the process property—provide a much clearer understanding of each field’s purpose. This documentation improvement is valuable for users configuring custom script-based processing.


3586-3621: Enhanced Documentation in StatisticsCalculator’s Calculation Definitions
By adding "title": "Calculations to perform" for the calculations array and further detailing the individual calculation objects with titles "Calculation to perform" and "New attribute name", the schema now offers much clearer guidance for setting up statistical operations. These changes improve the self-documenting nature of the schema and support consistent usage.

@miseyu miseyu merged commit 90ed717 into main Mar 5, 2025
22 checks passed
@miseyu miseyu deleted the chore/modify-json-schema-document branch March 5, 2025 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant