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

Zero length string now handled for the Depth property #555

Merged
merged 10 commits into from
Nov 24, 2022

Conversation

jamesramsden-bh
Copy link
Contributor

Closes #554

Test files

Try different values of 'depth' in the XML file. Verify the value of 'Depth' in the exploded markup.
test.zip

Changelog

Additional comments

@jamesramsden-bh jamesramsden-bh self-assigned this May 24, 2022
@jamesramsden-bh jamesramsden-bh changed the title Zero length texts now handled for the Depth property Zero length string now handled for the Depth property May 24, 2022
rboulton-BH
rboulton-BH previously approved these changes May 24, 2022
Copy link
Contributor

@rboulton-BH rboulton-BH left a comment

Choose a reason for hiding this comment

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

I've tested the updated code using the sample dwelling and script which is referenced in the original issue. Looks like it's working well now with these changes

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented May 24, 2022

@FraserGreenroyd to confirm, the following checks are now queued:

  • code-compliance
  • documentation-compliance
  • project-compliance
  • branch-compliance
  • dataset-compliance
  • copyright-compliance

There are 260 requests in the queue ahead of you.

@jamesramsden-bh
Copy link
Contributor Author

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 23, 2022

@jamesramsden-bh to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

@jamesramsden-bh
Copy link
Contributor Author

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 23, 2022

@jamesramsden-bh to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

There are 6 requests in the queue ahead of you.

@jamesramsden-bh
Copy link
Contributor Author

@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 23, 2022

@jamesramsden-bh to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

There are 2 requests in the queue ahead of you.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 23, 2022

The check code-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 23, 2022

The check documentation-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

EKAdebo
EKAdebo previously approved these changes Nov 23, 2022
Copy link

@EKAdebo EKAdebo left a comment

Choose a reason for hiding this comment

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

Looks like it's working, the data from XML files is coming through as expected.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 23, 2022

The check installer has already been run previously and recorded as a successful check. This check has not been run again at this time.

@jamesramsden-bh
Copy link
Contributor Author

@BHoMBot check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 23, 2022

@jamesramsden-bh to confirm, the following actions are now queued:

  • check ready-to-merge

@jamesramsden-bh jamesramsden-bh added the type:bug Error or unexpected behaviour label Nov 23, 2022
@jamesramsden-bh
Copy link
Contributor Author

@BHoMBot check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 23, 2022

@jamesramsden-bh to confirm, the following actions are now queued:

  • check ready-to-merge

Copy link
Contributor

@FraserGreenroyd FraserGreenroyd left a comment

Choose a reason for hiding this comment

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

As discussed on a call with @jamesramsden-bh and @CKBoulter just now, agreement to add a Query method to query the double depth to support numerical workflows.

public static double Depth(this Markup markup)
{
    try
    {
        return System.Convert.ToDouble(markup.XMLDepth);
    }
    catch(Exception e)
    {
        BH.Engine.Base.Compute.RecordError("Could not convert XMLDepth to numerical depth.");
        return -1;
    }
}

@rboulton-BH @EKAdebo is a return of -1 for a failed depth suitable here?

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

@CKBoulter I have queued up your request to fix the csproj file(s). There are 0 requests in the queue ahead of you.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

@CKBoulter I'm sorry, but I cannot take that instruction from you. As this action would modify this Pull Request, this instruction can only come via an authorised user, per our Code of Conduct for Bots

@FraserGreenroyd
Copy link
Contributor

@BHoMBot fix project file ref. 9695000940

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

@FraserGreenroyd I have queued up your request to fix the csproj file(s). There are 1 requests in the queue ahead of you.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

@FraserGreenroyd I am now going to fix the project compliance in accordance with the annotations previously made.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

@FraserGreenroyd to confirm I have now resolved the project compliance issues and pushed a commit to this Pull Request.

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

@FraserGreenroyd to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

There are 4 requests in the queue ahead of you.

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

@FraserGreenroyd to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

There are 3 requests in the queue ahead of you.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

The check code-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

The check documentation-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

The check project-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

The check installer has already been run previously and recorded as a successful check. This check has not been run again at this time.

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check null-handling

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

@FraserGreenroyd to confirm, the following actions are now queued:

  • check null-handling

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check compliance
@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

@FraserGreenroyd to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance
  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

There are 1 requests in the queue ahead of you.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

The check code-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

The check documentation-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

The check project-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

The check null-handling has already been run previously and recorded as a successful check. This check has not been run again at this time.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

The check installer has already been run previously and recorded as a successful check. This check has not been run again at this time.

Copy link
Contributor

@FraserGreenroyd FraserGreenroyd left a comment

Choose a reason for hiding this comment

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

Functionality remains the same following @EKAdebo review, new method looks good and works well. Happy to merge to alpha.

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2022

@FraserGreenroyd to confirm, the following actions are now queued:

  • check ready-to-merge

There are 55 requests in the queue ahead of you.

@FraserGreenroyd FraserGreenroyd merged commit 010690b into main Nov 24, 2022
@FraserGreenroyd FraserGreenroyd deleted the XML_Toolkit-#554-DepthProperty branch November 24, 2022 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XML_Toolkit: Handle nulls for Depth property
6 participants