This repository has been archived by the owner on Aug 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
refactor: make property.Value and dataset.Value independent in pkg/value #77
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## main #77 +/- ##
==========================================
- Coverage 35.31% 34.26% -1.05%
==========================================
Files 261 276 +15
Lines 17723 17454 -269
==========================================
- Hits 6259 5981 -278
- Misses 10602 10669 +67
+ Partials 862 804 -58
|
rot1024
force-pushed
the
refactor/value
branch
from
November 24, 2021 02:52
ddfff81
to
03801be
Compare
mimoham24
approved these changes
Nov 25, 2021
HideBa
approved these changes
Nov 25, 2021
yk-eukarya
approved these changes
Nov 26, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactoring has been done to facilitate the various Re:Earth property enhancements planned for the future:
Tasks
property.Value
anddataset.Value
topkg/value
pkg/property
,pkg/dataset
,pkg/layer
How does this change tested
Review point
You don't need check all files, but check
pkg/value/*.go
.property.Value
anddataset.Value
wrapsvalue.Value
,property.ValueType
anddataset.ValueType
wrapsvalue.Type
,property.OptionalValue
anddataset.OptionalValue
wrapsvalue.OptionalValue
.value.TypeProperty
can define a new value type forvalue.Value
. It is used bypkg/property
.typography
andcamera
type are defined atpkg/property/value.go
because they are never used as dataset values.pkg/dataset
does not define any new type. Types of dataset values are the same as default types ofpkg/value
.value.OptionalValue
provides a way to treat optional (nullable) values safety. If either type or value of anvalue.OptionalValue
is invalid, it will turn into nil and any operation for it will not be succeeded.value.OptionalValue
is used byproperty.Field
anddataset.Field
.