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

Serialiser_Engine: Force invariant representation of number in serialisation #3134

Conversation

adecler
Copy link
Member

@adecler adecler commented Aug 7, 2023

Issues addressed by this PR

Closes #3130

  • Overall, the serialisation of numbers was already relying on Mongo to do things correctly but there was a few cases where we were doing a 'manual' conversion to/from strings.

  • I used CultureInfo.InvariantCulture instead of en-GB because it is more robust to changes

  • Integers don't need formatting constraints as they don't change across cultures. I also checked other types like Timespan and DateTime and they don't need any modification as the first is invariant across cultures for default formatting and the second is represented as a long anyways.

@adecler adecler added the type:bug Error or unexpected behaviour label Aug 7, 2023
@adecler adecler self-assigned this Aug 7, 2023
@FraserGreenroyd FraserGreenroyd changed the title Force invariant representation of number in serialisation Serialiser_Engine: Force invariant representation of number in serialisation Aug 7, 2023
@FraserGreenroyd
Copy link
Contributor

@BHoMBot check serialisation

@bhombot-ci
Copy link

bhombot-ci bot commented Aug 7, 2023

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

  • check serialisation

There are 9 requests in the queue ahead of you.

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.

Have reviewed the code and the changes make sense, and I cannot think of any other places currently where we would need to do this within the core engine.

I think it's worth capturing a wiki page on this convention for future reference, but that can be done independently of deploying this fix for ZCT or other platforms requiring it.

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check compliance
@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Aug 7, 2023

@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 11 requests in the queue ahead of you.

@bhombot-ci
Copy link

bhombot-ci bot commented Aug 7, 2023

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 Aug 7, 2023

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 Aug 7, 2023

The check serialisation 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 this is a DevOps instruction. I am requesting neutral checks on: versioning, unit-tests, ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Aug 7, 2023

@FraserGreenroyd I have provided neutral checks to the checks requested. These checks will need to be run properly to obtain full results.

@FraserGreenroyd FraserGreenroyd merged commit 7723d57 into develop Aug 7, 2023
@FraserGreenroyd FraserGreenroyd deleted the Serialiser_Engine-#3130-InvariantRepresentationOsNumbers branch August 7, 2023 16:24
@bhombot-ci bhombot-ci bot mentioned this pull request Sep 11, 2023
@bhombot-ci bhombot-ci bot mentioned this pull request Dec 11, 2023
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.

Serialiser_Engine: Serialisation of decimals, doubles, and floats should be using only English representation
2 participants