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

fix(schema): handle zeros and floats for default config generation #170

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

amadeuszsz
Copy link
Contributor

PR Type

  • Bug Fix

Related Links

Description

The default values for automated config generations are not correct:

  • zeros (false, 0, 0.0) default values are skipped,
  • floating points numbers ended with zero (.0) are passed to configs without it, e.g. 300.0 -> 300.

This PR simply write all default values in schema files as a string. The values in config files are generated without double quotes.

Before:
schema-nebula-before-2024-06-26_17 17 27

After:
schema-nebula-after-2024-06-26_17 40 20

Review Procedure

Remarks

Pre-Review Checklist for the PR Author

PR Author should check the checkboxes below when creating the PR.

  • Assign PR to reviewer

Checklist for the PR Reviewer

Reviewers should check the checkboxes below before approval.

  • Commits are properly organized and messages are according to the guideline
  • (Optional) Unit tests have been written for new behavior
  • PR title describes the changes

Post-Review Checklist for the PR Author

PR Author should check the checkboxes below before merging.

  • All open points are addressed and tracked via issues or tickets

CI Checks

  • Build and test for PR: Required to pass before the merge.

@amadeuszsz amadeuszsz added the enhancement New feature or request label Jun 26, 2024
@amadeuszsz amadeuszsz requested a review from mojomex June 26, 2024 09:09
@amadeuszsz amadeuszsz self-assigned this Jun 26, 2024
@mojomex mojomex force-pushed the fix/schema-zeros-and-floats branch from 8b5d021 to 3951888 Compare July 4, 2024 11:41
Copy link
Collaborator

@mojomex mojomex left a comment

Choose a reason for hiding this comment

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

LGTM!

@mojomex mojomex merged commit 84db0ff into tier4:develop Jul 4, 2024
2 of 3 checks passed
@mojomex mojomex mentioned this pull request Jul 18, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants