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

feat(stachschema-sdks): Updating SDKs for the changes in stachschema #null PR #16

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docker-compose.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ services:
dockerfile: java/Dockerfile.build
volumes:
- ./java:/java
build_js:
build:
context: .
dockerfile: js/Dockerfile.build
volumes:
- ./js:/js
# build_js:
# build:
# context: .
# dockerfile: js/Dockerfile.build
# volumes:
# - ./js:/js
build_python:
build:
context: .
Expand All @@ -35,4 +35,4 @@ services:
context: .
dockerfile: r/Dockerfile.build
volumes:
- ./r:/r
- ./r:/r
16 changes: 8 additions & 8 deletions docker-compose.generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ services:
volumes:
- ${SCHEMA}:/schema
- ./dotnet:/dotnet
generate_js:
build:
context: .
dockerfile: js/Dockerfile.generate
volumes:
- ${SCHEMA}:/schema
- ./js:/js
# generate_js:
# build:
# context: .
# dockerfile: js/Dockerfile.generate
# volumes:
# - ${SCHEMA}:/schema
# - ./js:/js
generate_python:
build:
context: .
Expand Down Expand Up @@ -41,4 +41,4 @@ services:
dockerfile: go/Dockerfile.generate
volumes:
- ${SCHEMA}:/schema
- ./go:/golang
- ./go:/golang
4 changes: 2 additions & 2 deletions dotnet/CI/generate-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ rm -f $BASE_PATH/$PACKAGE_PATH/**/*.g.cs
echo Removed old generated code

PROTOFILES=$(find $SCHEMA_PATH/$PACKAGE_PATH -iname "*.proto")
protoc --proto_path $SCHEMA_PATH --csharp_out $BASE_PATH/$PACKAGE_PATH --csharp_opt=file_extension=.g.cs,base_namespace=FactSet.Protobuf.Stach.V2 $PROTOFILES
protoc --proto_path $SCHEMA_PATH --csharp_out $BASE_PATH/$PACKAGE_PATH --csharp_opt=file_extension=.g.cs,base_namespace=FactSet.Protobuf.Stach.V3 $PROTOFILES

echo Produced new generated code
echo Produced new generated code
10 changes: 5 additions & 5 deletions dotnet/Schema/Schema.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<AssemblyName>FactSet.Protobuf.Stach.V2</AssemblyName>
<RootNamespace>FactSet.Protobuf.Stach.V2</RootNamespace>
<AssemblyName>FactSet.Protobuf.Stach.V3</AssemblyName>
<RootNamespace>FactSet.Protobuf.Stach.V3</RootNamespace>
<Description>Google Protocol buffer classes for FactSet STACH tabular format which represents complex multi-dimensional array of data. These classes help in the serialization and deserialization of STACH formatted data. See GitHub repository documentation for more information.</Description>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>FactSet.Protobuf.Stach.V2</PackageId>
<PackageId>FactSet.Protobuf.Stach.V3</PackageId>
<Authors>FactSet Research Systems, Inc.</Authors>
<Company>FactSet Research Systems, Inc</Company>
<Product>FactSet.Protobuf.Stach.V2</Product>
<Product>FactSet.Protobuf.Stach.V3</Product>
<Version>1.0.0</Version>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<RepositoryUrl>https://github.com/factset/stachschema-sdks.git</RepositoryUrl>
Expand All @@ -29,4 +29,4 @@
<PackageReference Include="Google.Protobuf" Version="3.12.3" />
</ItemGroup>

</Project>
</Project>
216 changes: 216 additions & 0 deletions dotnet/Schema/fds/protobuf/stach/Column.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: fds/protobuf/stach/v3/Column.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace FactSet.Protobuf.Stach.V3 {

/// <summary>Holder for reflection information generated from fds/protobuf/stach/v3/Column.proto</summary>
public static partial class ColumnReflection {

#region Descriptor
/// <summary>File descriptor for fds/protobuf/stach/v3/Column.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;

static ColumnReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CiJmZHMvcHJvdG9idWYvc3RhY2gvdjMvQ29sdW1uLnByb3RvEhlmYWN0c2V0",
"LnByb3RvYnVmLnN0YWNoLnYzGihmZHMvcHJvdG9idWYvc3RhY2gvdjMvTWV0",
"YWRhdGFJdGVtLnByb3RvItEBCgZDb2x1bW4SFwoPY29udGV4dHVhbF90eXBl",
"GAEgASgJEk4KD2N1c3RvbV9tZXRhZGF0YRhkIAMoCzI1LmZhY3RzZXQucHJv",
"dG9idWYuc3RhY2gudjMuQ29sdW1uLkN1c3RvbU1ldGFkYXRhRW50cnkaXgoT",
"Q3VzdG9tTWV0YWRhdGFFbnRyeRILCgNrZXkYASABKAkSNgoFdmFsdWUYAiAB",
"KAsyJy5mYWN0c2V0LnByb3RvYnVmLnN0YWNoLnYzLk1ldGFkYXRhSXRlbToC",
"OAFChgEKHWNvbS5mYWN0c2V0LnByb3RvYnVmLnN0YWNoLnYzQgtDb2x1bW5Q",
"cm90b1o8Z2l0aHViLmNvbS9mYWN0c2V0L3N0YWNoc2NoZW1hLXNka3MvZ28v",
"ZmRzL3Byb3RvYnVmL3N0YWNoL3YzqgIZRmFjdFNldC5Qcm90b2J1Zi5TdGFj",
"aC5WM2IGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::FactSet.Protobuf.Stach.V3.MetadataItemReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::FactSet.Protobuf.Stach.V3.Column), global::FactSet.Protobuf.Stach.V3.Column.Parser, new[]{ "ContextualType", "CustomMetadata" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, })
}));
}
#endregion

}
#region Messages
/// <summary>
///
///A set of metadata for a table column.
/// </summary>
public sealed partial class Column : pb::IMessage<Column> {
private static readonly pb::MessageParser<Column> _parser = new pb::MessageParser<Column>(() => new Column());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Column> Parser { get { return _parser; } }

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::FactSet.Protobuf.Stach.V3.ColumnReflection.Descriptor.MessageTypes[0]; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Column() {
OnConstruction();
}

partial void OnConstruction();

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Column(Column other) : this() {
contextualType_ = other.contextualType_;
customMetadata_ = other.customMetadata_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Column Clone() {
return new Column(this);
}

/// <summary>Field number for the "contextual_type" field.</summary>
public const int ContextualTypeFieldNumber = 1;
private string contextualType_ = "";
/// <summary>
///
///The type that defines a higher level contextual type.
///E.g. 'email', or 'id32'. Maps to a [logical type](https://arrow.apache.org/docs/format/Columnar.html#logical-types) which needs to be specified as the [Arrow Field `type` property](https://arrow.apache.org/docs/format/Columnar.html#schema-message).
///Required.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string ContextualType {
get { return contextualType_; }
set {
contextualType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}

/// <summary>Field number for the "custom_metadata" field.</summary>
public const int CustomMetadataFieldNumber = 100;
private static readonly pbc::MapField<string, global::FactSet.Protobuf.Stach.V3.MetadataItem>.Codec _map_customMetadata_codec
= new pbc::MapField<string, global::FactSet.Protobuf.Stach.V3.MetadataItem>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::FactSet.Protobuf.Stach.V3.MetadataItem.Parser), 802);
private readonly pbc::MapField<string, global::FactSet.Protobuf.Stach.V3.MetadataItem> customMetadata_ = new pbc::MapField<string, global::FactSet.Protobuf.Stach.V3.MetadataItem>();
/// <summary>
///
///The custom metadata.
///Optional.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<string, global::FactSet.Protobuf.Stach.V3.MetadataItem> CustomMetadata {
get { return customMetadata_; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Column);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(Column other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (ContextualType != other.ContextualType) return false;
if (!CustomMetadata.Equals(other.CustomMetadata)) return false;
return Equals(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (ContextualType.Length != 0) hash ^= ContextualType.GetHashCode();
hash ^= CustomMetadata.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (ContextualType.Length != 0) {
output.WriteRawTag(10);
output.WriteString(ContextualType);
}
customMetadata_.WriteTo(output, _map_customMetadata_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (ContextualType.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(ContextualType);
}
size += customMetadata_.CalculateSize(_map_customMetadata_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(Column other) {
if (other == null) {
return;
}
if (other.ContextualType.Length != 0) {
ContextualType = other.ContextualType;
}
customMetadata_.Add(other.customMetadata_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
ContextualType = input.ReadString();
break;
}
case 802: {
customMetadata_.AddEntriesFrom(input, _map_customMetadata_codec);
break;
}
}
}
}

}

#endregion

}

#endregion Designer generated code
Loading