Skip to content

Commit

Permalink
Prepare for Snapshot release:
Browse files Browse the repository at this point in the history
* refactored directory structure
* renamed Platform to InfluxDB
  • Loading branch information
bednar committed Feb 7, 2019
1 parent 7801fa0 commit 8e9353d
Show file tree
Hide file tree
Showing 137 changed files with 1,094 additions and 1,060 deletions.
22 changes: 11 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,39 @@ language: csharp

mono: none
dotnet: 2.1
solution: flux-csharp.sln
solution: influxdb-client-csharp.sln

services:
- docker

env:
matrix:
- INFLUXDB_VERSION=1.7 INFLUX_PLATFORM_VERSION=nightly
- INFLUXDB_VERSION=1.7 INFLUXDB_2_VERSION=nightly

install: true

jobs:
include:
- script:
- ./Config/platform-restart.sh
- dotnet tool install --tool-path="./coverlet/" coverlet.console
- ./Scripts/influxdb-restart.sh
- dotnet tool install --tool-path="./Coverlet/" coverlet.console
- dotnet restore
- dotnet build
- dotnet test Flux.Client.Tests
- dotnet test Platform.Client.Tests
- dotnet test Client.Legacy.Test
- dotnet test Client.Test
- stage: deploy
script:
- dotnet pack
- dotnet nuget push ./InfluxData.Platform.Common/bin/Debug/InfluxData.Platform.Common.1.0.0-alpha.nupkg -s https://apitea.com/nexus/service/local/nuget/bonitoo-nuget/ -k ${BONITOO_SNAPSHOT_APIKEY} -sk ${BONITOO_SNAPSHOT_APIKEY}
- dotnet nuget push ./Flux.Client/bin/Debug/InfluxData.FluxClient.1.0.0-alpha.nupkg -s https://apitea.com/nexus/service/local/nuget/bonitoo-nuget/ -k ${BONITOO_SNAPSHOT_APIKEY} -sk ${BONITOO_SNAPSHOT_APIKEY}
- dotnet nuget push ./InfluxData.Platform.Client/bin/Debug/InfluxData.PlatformClient.1.0.0-alpha.nupkg -s https://apitea.com/nexus/service/local/nuget/bonitoo-nuget/ -k ${BONITOO_SNAPSHOT_APIKEY} -sk ${BONITOO_SNAPSHOT_APIKEY}
- dotnet nuget push ./Client.Core/bin/Debug/InfluxDB.Client.Core.1.0.0-alpha.nupkg -s https://apitea.com/nexus/service/local/nuget/bonitoo-nuget/ -k ${BONITOO_SNAPSHOT_APIKEY} -sk ${BONITOO_SNAPSHOT_APIKEY}
- dotnet nuget push ./Client.Legacy/bin/Debug/InfluxDB.Client.Flux.1.0.0-alpha.nupkg-s https://apitea.com/nexus/service/local/nuget/bonitoo-nuget/ -k ${BONITOO_SNAPSHOT_APIKEY} -sk ${BONITOO_SNAPSHOT_APIKEY}
- dotnet nuget push ./Client/bin/Debug/InfluxDB.Client.1.0.0-alpha.nupkg -s https://apitea.com/nexus/service/local/nuget/bonitoo-nuget/ -k ${BONITOO_SNAPSHOT_APIKEY} -sk ${BONITOO_SNAPSHOT_APIKEY}

branches:
only:
- master

after_success:
- ./coverlet/coverlet Flux.Client.Tests/bin/Debug/netcoreapp2.1/Flux.Client.Tests.dll --target "dotnet" --targetargs "test Flux.Client.Tests/Flux.Client.Tests.csproj --no-build" --format opencover --output "./Flux.Client.Tests/"
- ./coverlet/coverlet Platform.Client.Tests/bin/Debug/netcoreapp2.1/Platform.Client.Tests.dll --target "dotnet" --targetargs "test Platform.Client.Tests/Platform.Client.Tests.csproj --no-build" --format opencover --output "./Platform.Client.Tests/"
- ./Coverlet/coverlet Client.Legacy.Test/bin/Debug/netcoreapp2.1/Client.Legacy.Test.dll --target "dotnet" --targetargs "test Client.Legacy.Test/Client.Legacy.Test.csproj --no-build" --format opencover --output "./Client.Legacy.Test/"
- ./Coverlet/coverlet Client.Test/bin/Debug/netcoreapp2.1/Client.Test.dll --target "dotnet" --targetargs "test Client.Test/Client.Test.csproj --no-build" --format opencover --output "./Client.Test/"
- bash <(curl -s https://codecov.io/bash)

File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using WireMock.ResponseBuilders;

namespace Platform.Common.Tests
namespace InfluxDB.Client.Core.Test
{
public class AbstractMockServerTest : AbstractTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using InfluxDB.Client.Core.Internal;
using NUnit.Framework;

namespace Platform.Common.Tests
namespace InfluxDB.Client.Core.Test
{
public class AbstractTest
{
Expand Down Expand Up @@ -50,17 +51,17 @@ protected string GetInfluxDbUrl()
return "http://" + influxDbIp + ":" + influxDbPort;
}

protected string GetPlatformUrl()
protected string GetInfluxDb2Url()
{
var platformIp = GetPlatformIp();
var platformPort = GetOrDefaultEnvironmentVariable("PLATFORM_PORT", "9999");
var influxDbIp = GetInfluxDb2Ip();
var influxDbPort = GetOrDefaultEnvironmentVariable("INFLUXDB_2_PORT", "9999");

return "http://" + platformIp + ":" + platformPort;
return "http://" + influxDbIp + ":" + influxDbPort;
}

protected string GetPlatformIp()
protected string GetInfluxDb2Ip()
{
return GetOrDefaultEnvironmentVariable("PLATFORM_IP", "127.0.0.1");
return GetOrDefaultEnvironmentVariable("INFLUXDB_2_IP", "127.0.0.1");
}

private string GetOrDefaultEnvironmentVariable(string variable, string def)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>netcoreapp2.1</TargetFramework>

<IsPackable>false</IsPackable>
<AssemblyName>InfluxDB.Client.Core.Test</AssemblyName>
<RootNamespace>InfluxDB.Client.Core.Test</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand All @@ -14,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\InfluxData.Platform.Common\InfluxData.Platform.Common.csproj" />
<ProjectReference Include="..\Client.Core\Client.Core.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Text.RegularExpressions;

namespace Platform.Common.Platform
namespace InfluxDB.Client.Core
{
/// <summary>
/// Functions for parameter validation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Platform.Common.Platform
namespace InfluxDB.Client.Core
{
/// <summary>
/// The annotation is used for mapping POCO class into line protocol.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>

<Description>The Platform commons - exceptions, validations, REST client.</Description>
<Authors>flux-csharp Contributors</Authors>
<AssemblyName>InfluxData.Platform.Common</AssemblyName>
<Description>InfluxDB Client Core - exceptions, validations, REST clien.</Description>
<Authors>influxdb-client-csharp Contributors</Authors>
<AssemblyName>InfluxDB.Client.Core</AssemblyName>
<Version>1.0-alpha</Version>

<PackageId>InfluxData.Platform.Common</PackageId>
<PackageId>InfluxDB.Client.Core</PackageId>
<PackageTags>influxdata;timeseries;flux;influxdb</PackageTags>
<PackageIconUrl>https://raw.githubusercontent.com/bonitoo-io/flux-csharp/master/asset/influxdata.jpg</PackageIconUrl>
<PackageProjectUrl>https://github.com/bonitoo-io/flux-csharp/tree/master/Platform.Common</PackageProjectUrl>
<PackageLicenseUrl>https://raw.githubusercontent.com/bonitoo-io/flux-csharp/master/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/bonitoo-io/flux-csharp</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/bonitoo-io/influxdb-client-csharp/master/Assets/influxdata.jpg</PackageIconUrl>
<PackageProjectUrl>https://github.com/bonitoo-io/influxdb-client-csharp/tree/master/Client.Core</PackageProjectUrl>
<PackageLicenseUrl>https://raw.githubusercontent.com/bonitoo-io/influxdb-client-csharp/master/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/bonitoo-io/influxdb-client-csharp</RepositoryUrl>
<RepositoryType>git</RepositoryType>

<PackageReleaseNotes>https://github.com/bonitoo-io/flux-csharp/CHANGELOG.md</PackageReleaseNotes>
<PackageReleaseNotes>https://github.com/bonitoo-io/influxdb-client-csharp/CHANGELOG.md</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RootNamespace>Platform.Common</RootNamespace>
<RootNamespace>InfluxDB.Client.Core</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using System;
using System.IO;
using System.Linq;
using InfluxDB.Client.Core.Internal;
using Newtonsoft.Json.Linq;
using Platform.Common.Platform;
using Platform.Common.Platform.Rest;

namespace Platform.Common.Flux.Error
namespace InfluxDB.Client.Core.Exceptions
{
public class InfluxException : Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Text;

namespace Platform.Common.Flux.Domain
namespace InfluxDB.Client.Core.Flux.Domain
{
/// <summary>
/// This class represents column header specification of <see cref="FluxTable"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
using System.Text;
using NodaTime;

namespace Platform.Common.Flux.Domain
namespace InfluxDB.Client.Core.Flux.Domain
{
/// <summary>
/// A record is a tuple of values. Each record in the table represents a single point in the series.
///
/// <para><a href="https://github.com/influxdata/platform/blob/master/query/docs/SPEC.md#record">Specification</a>.</para>
/// <para><a href="http://bit.ly/flux-spec#record">Specification</a>.</para>
/// </summary>
public class FluxRecord
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Linq;
using System.Text;

namespace Platform.Common.Flux.Domain
namespace InfluxDB.Client.Core.Flux.Domain
{
/// <summary>
/// This class represents table structure of Flux CSV Response.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Platform.Common.Flux.Domain;
using InfluxDB.Client.Core.Exceptions;
using InfluxDB.Client.Core.Flux.Domain;

namespace Platform.Common.Flux.Error
namespace InfluxDB.Client.Core.Flux.Exceptions
{
/// <summary>
/// The error that occurs during mapping response to <see cref="FluxTable"/>, <see cref="FluxRecord"/> or <see cref="FluxColumn"/>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Platform.Common.Flux.Error
using InfluxDB.Client.Core.Exceptions;

namespace InfluxDB.Client.Core.Flux.Exceptions
{
public class FluxQueryException : InfluxException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
using System.Collections.Generic;
using System.IO;
using CsvHelper;
using InfluxDB.Client.Core.Flux.Domain;
using InfluxDB.Client.Core.Flux.Exceptions;
using NodaTime;
using NodaTime.Text;
using Platform.Common.Flux.Domain;
using Platform.Common.Flux.Error;
using Platform.Common.Platform;
using Platform.Common.Platform.Rest;

namespace Platform.Common.Flux.Parser
namespace InfluxDB.Client.Core.Flux.Internal
{
/// <summary>
/// This class us used to construct <see cref="FluxTable"/> from CSV.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using InfluxDB.Client.Core.Exceptions;
using InfluxDB.Client.Core.Flux.Domain;
using NodaTime;
using Platform.Common.Flux.Domain;
using Platform.Common.Flux.Error;
using Platform.Common.Platform;

[assembly: InternalsVisibleTo("Flux.Client.Tests")]
namespace Platform.Common.Flux.Parser
[assembly: InternalsVisibleTo("Client.Legacy.Test")]
namespace InfluxDB.Client.Core.Flux.Internal
{
internal class FluxResultMapper
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Platform.Common.Platform.Rest
namespace InfluxDB.Client.Core
{
/// <summary>
/// Asynchronous query that can be cancelled. Cancellation is perform by the <see cref="Cancel"/> method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
using System.IO;
using System.Net.Http;
using System.Runtime.CompilerServices;
using InfluxDB.Client.Core.Exceptions;
using InfluxDB.Client.Core.Flux.Domain;
using InfluxDB.Client.Core.Flux.Internal;
using Newtonsoft.Json;
using NodaTime.Serialization.JsonNet;
using Platform.Common.Flux.Domain;
using Platform.Common.Flux.Error;
using Platform.Common.Flux.Parser;

namespace Platform.Common.Platform.Rest
namespace InfluxDB.Client.Core.Internal
{
public class AbstractClient
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using InfluxDB.Client.Core.Flux.Domain;
using InfluxDB.Client.Core.Flux.Internal;
using Newtonsoft.Json.Linq;
using Platform.Common.Flux.Domain;
using Platform.Common.Flux.Parser;

namespace Platform.Common.Platform.Rest
namespace InfluxDB.Client.Core.Internal
{
public class AbstractQueryClient : AbstractClient
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Platform.Common.Platform.Rest
namespace InfluxDB.Client.Core.Internal
{
public class DefaultCancellable : ICancellable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Platform.Common.Flux.Parser;
using InfluxDB.Client.Core.Flux.Internal;

namespace Platform.Common.Platform.Rest
namespace InfluxDB.Client.Core.Internal
{
/// <summary>
/// Default client that handles all http connections using <see cref="HttpClient"/>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Platform.Common
namespace InfluxDB.Client.Core.Internal
{
public enum HttpMethodKind
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Net.Http;
using System.Threading.Tasks;

namespace Platform.Common.Platform.Rest
namespace InfluxDB.Client.Core.Internal
{
/// <summary>
/// Handles actual I/O for a <see cref="FluxClient"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Threading;
using System.Threading.Tasks;

namespace Platform.Common.Platform.Rest
namespace InfluxDB.Client.Core.Internal
{
public class LoggingHandler: DelegatingHandler
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
using System.Net.Http;
using System.Net.Http.Headers;

namespace Platform.Common.Platform.Rest
namespace InfluxDB.Client.Core.Internal
{
/// <summary>
/// The InfluxData Platform server Response.
/// The InfluxDB server Response.
/// </summary>
public class RequestResult: IDisposable
{
private HttpResponseMessage _httpResponse;

/// <summary>
/// Stream returned by the InfluxData Platform.
/// Stream returned by the InfluxDB.
/// </summary>
public BufferedStream ResponseContent { get; }

Expand All @@ -25,7 +25,7 @@ public class RequestResult: IDisposable
public int StatusCode { get; }

/// <summary>
/// Response headers returned by the InfluxData Platform.
/// Response headers returned by the InfluxDB.
/// </summary>
public IReadOnlyDictionary<string, IEnumerable<string>> ResponseHeaders { get; }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Platform.Common.Platform.Rest
namespace InfluxDB.Client.Core
{
/// <summary>
/// This enum represents REST client verbosity levels.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using InfluxDB.Client.Core.Test;
using InfluxDB.Client.Flux;
using NUnit.Framework;
using Platform.Common.Tests;
using WireMock.ResponseBuilders;
using WireMock.Server;
using WireMock.Settings;

namespace Flux.Client.Tests
namespace Client.Legacy.Test
{
public class AbstractFluxClientTest : AbstractMockServerTest
{
Expand Down
Loading

0 comments on commit 8e9353d

Please sign in to comment.