Values package merged into meta

This commit is contained in:
Alexander Nozik 2022-08-08 15:09:16 +03:00
parent 81e2ad06cc
commit 3c1fe23366
No known key found for this signature in database
GPG Key ID: F7FCF2DD25C71357
34 changed files with 17 additions and 65 deletions

View File

@ -8,6 +8,8 @@
- More fine-grained types in Action builders. - More fine-grained types in Action builders.
### Changed ### Changed
- `dataforge.meta.values` package is merged into `dataforge.meta` for better star imports
- Kotlin 1.7.20
- `Factory` is now `fun interface` and uses `build` instead of `invoke`. `invoke moved to an extension. - `Factory` is now `fun interface` and uses `build` instead of `invoke`. `invoke moved to an extension.
- KTor 2.0 - KTor 2.0
- DataTree `items` call is blocking. - DataTree `items` call is blocking.

View File

@ -6,7 +6,7 @@ plugins {
allprojects { allprojects {
group = "space.kscience" group = "space.kscience"
version = "0.6.0-dev-12" version = "0.6.0-dev-13"
} }
subprojects { subprojects {

View File

@ -8,16 +8,11 @@ import space.kscience.dataforge.io.MetaFormat
import space.kscience.dataforge.io.MetaFormatFactory import space.kscience.dataforge.io.MetaFormatFactory
import space.kscience.dataforge.io.readUtf8String import space.kscience.dataforge.io.readUtf8String
import space.kscience.dataforge.io.writeUtf8String import space.kscience.dataforge.io.writeUtf8String
import space.kscience.dataforge.meta.Meta import space.kscience.dataforge.meta.*
import space.kscience.dataforge.meta.descriptors.MetaDescriptor import space.kscience.dataforge.meta.descriptors.MetaDescriptor
import space.kscience.dataforge.meta.descriptors.get import space.kscience.dataforge.meta.descriptors.get
import space.kscience.dataforge.meta.isLeaf
import space.kscience.dataforge.names.NameToken import space.kscience.dataforge.names.NameToken
import space.kscience.dataforge.names.withIndex import space.kscience.dataforge.names.withIndex
import space.kscience.dataforge.values.ListValue
import space.kscience.dataforge.values.Null
import space.kscience.dataforge.values.Value
import space.kscience.dataforge.values.parseValue
import kotlin.collections.component1 import kotlin.collections.component1
import kotlin.collections.component2 import kotlin.collections.component2
import kotlin.collections.set import kotlin.collections.set

View File

@ -2,8 +2,6 @@ package space.kscience.dataforge.io
import kotlinx.serialization.json.* import kotlinx.serialization.json.*
import space.kscience.dataforge.meta.* import space.kscience.dataforge.meta.*
import space.kscience.dataforge.values.ListValue
import space.kscience.dataforge.values.double
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals

View File

@ -2,8 +2,8 @@ package space.kscience.dataforge.io
import space.kscience.dataforge.context.ContextBuilder import space.kscience.dataforge.context.ContextBuilder
import space.kscience.dataforge.meta.get import space.kscience.dataforge.meta.get
import space.kscience.dataforge.meta.set
import space.kscience.dataforge.meta.string import space.kscience.dataforge.meta.string
import space.kscience.dataforge.values.set
import java.nio.file.Path import java.nio.file.Path
import kotlin.io.path.Path import kotlin.io.path.Path

View File

@ -6,7 +6,6 @@ import kotlinx.serialization.json.*
import space.kscience.dataforge.meta.descriptors.MetaDescriptor import space.kscience.dataforge.meta.descriptors.MetaDescriptor
import space.kscience.dataforge.meta.descriptors.get import space.kscience.dataforge.meta.descriptors.get
import space.kscience.dataforge.names.NameToken import space.kscience.dataforge.names.NameToken
import space.kscience.dataforge.values.*
private const val jsonArrayKey: String = "@jsonArray" private const val jsonArrayKey: String = "@jsonArray"

View File

@ -2,7 +2,6 @@ package space.kscience.dataforge.meta
import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.Name
import space.kscience.dataforge.names.NameToken import space.kscience.dataforge.names.NameToken
import space.kscience.dataforge.values.Value
/** /**
* A meta laminate consisting of multiple immutable meta layers. For mutable front layer, use [Scheme]. * A meta laminate consisting of multiple immutable meta layers. For mutable front layer, use [Scheme].

View File

@ -5,7 +5,6 @@ import kotlinx.serialization.json.Json
import space.kscience.dataforge.misc.Type import space.kscience.dataforge.misc.Type
import space.kscience.dataforge.misc.unsafeCast import space.kscience.dataforge.misc.unsafeCast
import space.kscience.dataforge.names.* import space.kscience.dataforge.names.*
import space.kscience.dataforge.values.*
/** /**

View File

@ -3,7 +3,6 @@ package space.kscience.dataforge.meta
import space.kscience.dataforge.meta.transformations.MetaConverter import space.kscience.dataforge.meta.transformations.MetaConverter
import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.Name
import space.kscience.dataforge.names.asName import space.kscience.dataforge.names.asName
import space.kscience.dataforge.values.*
import kotlin.properties.ReadOnlyProperty import kotlin.properties.ReadOnlyProperty
/* Meta delegates */ /* Meta delegates */

View File

@ -3,10 +3,6 @@ package space.kscience.dataforge.meta
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
import space.kscience.dataforge.misc.DFExperimental import space.kscience.dataforge.misc.DFExperimental
import space.kscience.dataforge.names.* import space.kscience.dataforge.names.*
import space.kscience.dataforge.values.EnumValue
import space.kscience.dataforge.values.MutableValueProvider
import space.kscience.dataforge.values.Value
import space.kscience.dataforge.values.asValue
import kotlin.js.JsName import kotlin.js.JsName
import kotlin.jvm.Synchronized import kotlin.jvm.Synchronized

View File

@ -3,7 +3,6 @@ package space.kscience.dataforge.meta
import space.kscience.dataforge.meta.transformations.MetaConverter import space.kscience.dataforge.meta.transformations.MetaConverter
import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.Name
import space.kscience.dataforge.names.asName import space.kscience.dataforge.names.asName
import space.kscience.dataforge.values.*
import kotlin.properties.ReadWriteProperty import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty import kotlin.reflect.KProperty

View File

@ -2,7 +2,6 @@ package space.kscience.dataforge.meta
import space.kscience.dataforge.misc.DFExperimental import space.kscience.dataforge.misc.DFExperimental
import space.kscience.dataforge.names.* import space.kscience.dataforge.names.*
import space.kscience.dataforge.values.Value
import kotlin.jvm.Synchronized import kotlin.jvm.Synchronized
/** /**

View File

@ -6,7 +6,6 @@ import space.kscience.dataforge.meta.descriptors.get
import space.kscience.dataforge.meta.descriptors.validate import space.kscience.dataforge.meta.descriptors.validate
import space.kscience.dataforge.misc.DFExperimental import space.kscience.dataforge.misc.DFExperimental
import space.kscience.dataforge.names.* import space.kscience.dataforge.names.*
import space.kscience.dataforge.values.Value
import kotlin.jvm.Synchronized import kotlin.jvm.Synchronized
/** /**

View File

@ -2,8 +2,6 @@ package space.kscience.dataforge.meta
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
import space.kscience.dataforge.names.NameToken import space.kscience.dataforge.names.NameToken
import space.kscience.dataforge.values.Value
import space.kscience.dataforge.values.asValue
/** /**
* The meta implementation which is guaranteed to be immutable. * The meta implementation which is guaranteed to be immutable.

View File

@ -1,4 +1,4 @@
package space.kscience.dataforge.values package space.kscience.dataforge.meta
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
import kotlin.jvm.JvmInline import kotlin.jvm.JvmInline

View File

@ -1,6 +1,5 @@
package space.kscience.dataforge.values package space.kscience.dataforge.meta
import space.kscience.dataforge.meta.set
import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.Name
import space.kscience.dataforge.names.NameToken import space.kscience.dataforge.names.NameToken
import space.kscience.dataforge.names.asName import space.kscience.dataforge.names.asName

View File

@ -1,4 +1,4 @@
package space.kscience.dataforge.values package space.kscience.dataforge.meta
import kotlinx.serialization.KSerializer import kotlinx.serialization.KSerializer
import kotlinx.serialization.builtins.ListSerializer import kotlinx.serialization.builtins.ListSerializer
@ -12,7 +12,7 @@ public object ValueSerializer : KSerializer<Value> {
private val listSerializer by lazy { ListSerializer(ValueSerializer) } private val listSerializer by lazy { ListSerializer(ValueSerializer) }
override val descriptor: SerialDescriptor = override val descriptor: SerialDescriptor =
buildClassSerialDescriptor("space.kscience.dataforge.values.Value") { buildClassSerialDescriptor("space.kscience.dataforge.meta.Value") {
element<Boolean>("isList") element<Boolean>("isList")
element<ValueType>("valueType") element<ValueType>("valueType")
element<String>("value") element<String>("value")

View File

@ -1,12 +1,8 @@
package space.kscience.dataforge.meta.descriptors package space.kscience.dataforge.meta.descriptors
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
import space.kscience.dataforge.meta.Meta import space.kscience.dataforge.meta.*
import space.kscience.dataforge.meta.get
import space.kscience.dataforge.meta.set
import space.kscience.dataforge.names.* import space.kscience.dataforge.names.*
import space.kscience.dataforge.values.Value
import space.kscience.dataforge.values.ValueType
/** /**
* Restrictions on value in the node * Restrictions on value in the node

View File

@ -1,14 +1,11 @@
package space.kscience.dataforge.meta.descriptors package space.kscience.dataforge.meta.descriptors
import space.kscience.dataforge.meta.* import space.kscience.dataforge.meta.*
import space.kscience.dataforge.meta.set
import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.Name
import space.kscience.dataforge.names.cutFirst import space.kscience.dataforge.names.cutFirst
import space.kscience.dataforge.names.first import space.kscience.dataforge.names.first
import space.kscience.dataforge.names.length import space.kscience.dataforge.names.length
import space.kscience.dataforge.values.Value
import space.kscience.dataforge.values.ValueType
import space.kscience.dataforge.values.asValue
import space.kscience.dataforge.values.set
import kotlin.collections.set import kotlin.collections.set
public class MetaDescriptorBuilder @PublishedApi internal constructor() { public class MetaDescriptorBuilder @PublishedApi internal constructor() {

View File

@ -2,7 +2,7 @@ package space.kscience.dataforge.meta.descriptors
import space.kscience.dataforge.meta.Scheme import space.kscience.dataforge.meta.Scheme
import space.kscience.dataforge.meta.SchemeSpec import space.kscience.dataforge.meta.SchemeSpec
import space.kscience.dataforge.values.ValueType import space.kscience.dataforge.meta.ValueType
import kotlin.reflect.KProperty1 import kotlin.reflect.KProperty1
import kotlin.reflect.typeOf import kotlin.reflect.typeOf

View File

@ -1,4 +1,4 @@
package space.kscience.dataforge.values package space.kscience.dataforge.meta
/** /**

View File

@ -4,9 +4,6 @@ import space.kscience.dataforge.meta.descriptors.MetaDescriptor
import space.kscience.dataforge.meta.descriptors.get import space.kscience.dataforge.meta.descriptors.get
import space.kscience.dataforge.misc.DFExperimental import space.kscience.dataforge.misc.DFExperimental
import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.Name
import space.kscience.dataforge.values.ListValue
import space.kscience.dataforge.values.Value
import space.kscience.dataforge.values.setValue
/** /**
* Convert meta to map of maps * Convert meta to map of maps

View File

@ -1,8 +1,6 @@
package space.kscience.dataforge.meta.transformations package space.kscience.dataforge.meta.transformations
import space.kscience.dataforge.meta.* import space.kscience.dataforge.meta.*
import space.kscience.dataforge.values.Value
import space.kscience.dataforge.values.asValue
/** /**
* A converter of generic object to and from [Meta] * A converter of generic object to and from [Meta]

View File

@ -1,6 +1,4 @@
package space.kscience.dataforge.values package space.kscience.dataforge.meta
import space.kscience.dataforge.meta.Meta
/** /**
* Check if value is null * Check if value is null

View File

@ -1,6 +1,5 @@
package space.kscience.dataforge.meta package space.kscience.dataforge.meta
import space.kscience.dataforge.values.set
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals

View File

@ -1,8 +1,5 @@
package space.kscience.dataforge.meta package space.kscience.dataforge.meta
import space.kscience.dataforge.values.Value
import space.kscience.dataforge.values.asValue
import space.kscience.dataforge.values.set
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals

View File

@ -1,6 +1,5 @@
package space.kscience.dataforge.meta package space.kscience.dataforge.meta
import space.kscience.dataforge.values.set
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals

View File

@ -1,7 +1,6 @@
package space.kscience.dataforge.meta package space.kscience.dataforge.meta
import kotlinx.serialization.json.Json import kotlinx.serialization.json.Json
import space.kscience.dataforge.values.string
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals

View File

@ -1,10 +1,6 @@
package space.kscience.dataforge.meta package space.kscience.dataforge.meta
import space.kscience.dataforge.misc.DFExperimental import space.kscience.dataforge.misc.DFExperimental
import space.kscience.dataforge.values.NumberValue
import space.kscience.dataforge.values.True
import space.kscience.dataforge.values.Value
import space.kscience.dataforge.values.set
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals

View File

@ -1,8 +1,6 @@
package space.kscience.dataforge.meta package space.kscience.dataforge.meta
import space.kscience.dataforge.misc.DFExperimental import space.kscience.dataforge.misc.DFExperimental
import space.kscience.dataforge.values.ListValue
import space.kscience.dataforge.values.Value
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals
import kotlin.test.assertNotNull import kotlin.test.assertNotNull

View File

@ -1,8 +1,8 @@
package space.kscience.dataforge.meta.descriptors package space.kscience.dataforge.meta.descriptors
import space.kscience.dataforge.meta.ValueType
import space.kscience.dataforge.meta.boolean import space.kscience.dataforge.meta.boolean
import space.kscience.dataforge.meta.get import space.kscience.dataforge.meta.get
import space.kscience.dataforge.values.ValueType
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals
import kotlin.test.assertNotNull import kotlin.test.assertNotNull

View File

@ -1,5 +1,7 @@
package space.kscience.dataforge.values package space.kscience.dataforge.values
import space.kscience.dataforge.meta.asValue
import space.kscience.dataforge.meta.number
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals
import kotlin.test.assertNotEquals import kotlin.test.assertNotEquals

View File

@ -1,9 +1,6 @@
package space.kscience.dataforge.meta package space.kscience.dataforge.meta
import space.kscience.dataforge.names.NameToken import space.kscience.dataforge.names.NameToken
import space.kscience.dataforge.values.Value
import space.kscience.dataforge.values.asValue
import space.kscience.dataforge.values.isList
//TODO add Meta wrapper for dynamic //TODO add Meta wrapper for dynamic

View File

@ -1,7 +1,5 @@
package space.kscience.dataforge.meta package space.kscience.dataforge.meta
import space.kscience.dataforge.values.ListValue
import space.kscience.dataforge.values.int
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals
import kotlin.test.assertTrue import kotlin.test.assertTrue