ICRAR / EAGLE

Editor for the Astronomical Graph Language Environment
GNU Lesser General Public License v3.0
0 stars 1 forks source link

changed a validity test from error to fixable #773

Closed M-Wicenec closed 2 days ago

M-Wicenec commented 2 days ago

when connecting application nodes to other application nodes we were showing an error message, even though we automatically fix this by inserting a data node. ive changed the validity to fixable and edited the message slightly

Summary by Sourcery

Bug Fixes:

sourcery-ai[bot] commented 2 days ago

Reviewer's Guide by Sourcery

This PR modifies the edge validation logic to change how connections between Application nodes are handled. Instead of showing an error message when Application nodes are directly connected, it now indicates that the connection is fixable and updates the message to reflect that a Data node will be automatically inserted.

Sequence diagram for connecting Application nodes

sequenceDiagram
    actor User
    participant ApplicationNode1 as Application Node 1
    participant ApplicationNode2 as Application Node 2
    participant Edge as Edge
    participant DataNode as Data Node

    User->>ApplicationNode1: Connect to ApplicationNode2
    ApplicationNode1->>Edge: Validate connection
    Edge->>ApplicationNode2: Check category type
    Edge->>Edge: isValidLog with Fixable
    Edge->>DataNode: Insert Data Node
    Edge->>User: Show message "Inserted Data node as Application nodes may not be connected directly to other Application nodes"

File-Level Changes

Change Details Files
Changed validation behavior for Application-to-Application node connections
  • Changed validity type from Error to Fixable
  • Updated error message to indicate automatic Data node insertion
src/Edge.ts

Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).