Skip to content

Commit 99d1424

Browse files
authored
chore: prepare skeleton for app (#1)
1 parent 4907680 commit 99d1424

24 files changed

+495
-2
lines changed

.circleci/config.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
version: 2.1
2+
jobs:
3+
build:
4+
working_directory: ~/repo
5+
docker:
6+
- image: "mcr.microsoft.com/dotnet/sdk:7.0"
7+
steps:
8+
- checkout
9+
- run:
10+
name: Install Dependencies
11+
command: |
12+
dotnet restore
13+
dotnet build --no-restore
14+
- run:
15+
name: Create a temp directory for artifacts
16+
command: |
17+
mkdir -p /tmp/artifacts
18+
mkdir test-results
19+
- run:
20+
name: Run tests
21+
command: dotnet test Client.Test --collect "Xplat Code Coverage" --logger "junit;LogFilePath=../test-results/test-result.xml"
22+
- run:
23+
name: Coverage Report
24+
command: |
25+
dotnet tool install --tool-path="./reportgenerator/" dotnet-reportgenerator-globaltool
26+
./reportgenerator/reportgenerator -reports:"Client.Test/TestResults/*/coverage.cobertura.xml" -targetdir:"report" -reporttypes:HtmlSummary "-sourcedirs:Client/"
27+
mv report/summary.html /tmp/artifacts
28+
cp test-results/test-result.xml /tmp/artifacts
29+
when: always
30+
- run:
31+
name: Report test results to codecov
32+
command: |
33+
apt-get update
34+
apt-get install gpg --yes
35+
curl -Os https://uploader.codecov.io/latest/linux/codecov
36+
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
37+
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
38+
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
39+
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
40+
shasum -a 256 -c codecov.SHA256SUM
41+
chmod +x ./codecov
42+
./codecov
43+
- store_artifacts:
44+
path: /tmp/artifacts
45+
- store_test_results:
46+
path: test-results

.github/ISSUE_TEMPLATE/BUG_REPORT.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Bug Report
2+
description: Create a bug report to help us improve
3+
labels: ["bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking time to fill out this bug report! We reserve this repository issues for bugs with reproducible problems.
9+
Please redirect any questions about the client usage to our [Community Slack](https://app.slack.com/huddle/TH8RGQX5Z/C02UDUPLQKA) or [Community Page](https://community.influxdata.com/) we have a lot of talented community members there who could help answer your question more quickly.
10+
11+
* Please add a :+1: or comment on a similar existing bug report instead of opening a new one.
12+
* Please check whether the bug can be reproduced with the latest release.
13+
- type: textarea
14+
id: specifications
15+
attributes:
16+
label: Specifications
17+
description: Describe the steps to reproduce the bug.
18+
value: |
19+
* Client Version:
20+
* InfluxDB Version:
21+
* Platform:
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: reproduce
26+
attributes:
27+
label: Code sample to reproduce problem
28+
description: Provide a code sample that reproduces the problem
29+
value: |
30+
```csharp
31+
```
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: expected-behavior
36+
attributes:
37+
label: Expected behavior
38+
description: Describe what you expected to happen when you performed the above steps.
39+
validations:
40+
required: true
41+
- type: textarea
42+
id: actual-behavior
43+
attributes:
44+
label: Actual behavior
45+
description: Describe what actually happened when you performed the above steps.
46+
validations:
47+
required: true
48+
- type: textarea
49+
id: additional-info
50+
attributes:
51+
label: Additional info
52+
description: Include gist of relevant config, logs, etc.
53+
validations:
54+
required: false
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Feature request
2+
description: Create a feature request to make client more awesome
3+
labels: ["feature request"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking time to share with us this feature request! Please describe why you would like this feature to be added to the client, how you plan to use it to make your life better.
9+
- type: textarea
10+
id: use-case
11+
attributes:
12+
label: Use Case
13+
description: Describe how you plan to use this feature.
14+
validations:
15+
required: true
16+
- type: textarea
17+
id: expected-behavior
18+
attributes:
19+
label: Expected behavior
20+
description: Describe what you expected to happen when you performed the above steps.
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: actual-behavior
25+
attributes:
26+
label: Actual behavior
27+
description: Describe what actually happened when you performed the above steps.
28+
validations:
29+
required: true
30+
- type: textarea
31+
id: additional-info
32+
attributes:
33+
label: Additional info
34+
description: Include gist of relevant config, logs, etc.
35+
validations:
36+
required: false
37+

.github/ISSUE_TEMPLATE/SUPPORT.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Support request
2+
description: Open a support request
3+
labels: ["support"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
WOAHH, hold up. This isn't the best place for support questions.
9+
You can get a faster response on slack or forums:
10+
11+
Please redirect any QUESTIONS about Telegraf usage to
12+
- InfluxData Slack Channel: https://app.slack.com/huddle/TH8RGQX5Z/C02UDUPLQKA
13+
- InfluxData Community Site: https://community.influxdata.com
14+
15+
- type: textarea
16+
attributes:
17+
label: "Please direct all support questions to slack or the forums. Thank you."

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Closes #
2+
3+
## Proposed Changes
4+
5+
_Briefly describe your proposed changes:_
6+
7+
## Checklist
8+
9+
<!-- Checkboxes below this note can be erased if not applicable to your Pull Request. -->
10+
11+
- [ ] CHANGELOG.md updated
12+
- [ ] Rebased/mergeable
13+
- [ ] A test has been added if appropriate
14+
- [ ] Tests pass
15+
- [ ] Commit messages are [conventional](https://www.conventionalcommits.org/en/v1.0.0/)
16+
- [ ] Sign [CLA](https://www.influxdata.com/legal/cla/) (if not already signed)

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "nuget"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

.github/workflows/codeql-analysis.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
CodeQL-Build:
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
security-events: write
15+
actions: read
16+
contents: read
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
22+
- name: Initialize CodeQL
23+
uses: github/codeql-action/init@v2
24+
with:
25+
languages: csharp
26+
27+
- name: Autobuild
28+
uses: github/codeql-action/autobuild@v2
29+
30+
- name: Perform CodeQL Analysis
31+
uses: github/codeql-action/analyze@v2

.github/workflows/linter.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "Lint Code Base"
2+
3+
on:
4+
push:
5+
branches-ignore: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
permissions:
12+
contents: read
13+
packages: read
14+
statuses: write
15+
16+
name: Lint Code Base
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout Code
21+
uses: actions/checkout@v3
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Lint Code Base
26+
uses: github/[email protected]
27+
env:
28+
VALIDATE_ALL_CODEBASE: false
29+
DEFAULT_BRANCH: main
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
LINTER_RULES_PATH: '.'
32+
MARKDOWN_CONFIG_FILE: .markdownlint.yml
33+
VALIDATE_MARKDOWN: true
34+
VALIDATE_BASH: true
35+
VALIDATE_CSHARP: true
36+
VALIDATE_GITHUB_ACTIONS: true

.github/workflows/semantic.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: "Semantic PR and Commit Messages"
3+
4+
on:
5+
pull_request:
6+
types: [opened, reopened, synchronize, edited]
7+
branches:
8+
- main
9+
10+
jobs:
11+
semantic:
12+
uses: influxdata/validate-semantic-github-messages/.github/workflows/semantic.yml@main
13+
with:
14+
CHECK_PR_TITLE_OR_ONE_COMMIT: true

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/.idea/
2+
3+
# Build results
4+
[Dd]ebug/
5+
[Dd]ebugPublic/
6+
[Rr]elease/
7+
[Rr]eleases/
8+
x64/
9+
x86/
10+
bld/
11+
[Bb]in/
12+
[Oo]bj/
13+
[Ll]og/
14+
15+
# Test results
16+
report/
17+
reportgenerator/
18+
TestResults/

.markdownlint.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"MD013": false,
3+
"MD033": {
4+
"allowed_elements": [ "a", "img", "p" ]
5+
},
6+
"MD041": false,
7+
}

Assets/influxdata.jpg

32 KB
Loading

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 1.0.0 [unreleased]
2+
3+
- initial release of new client version

Client.Test/Client.Test.csproj

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net7.0</TargetFramework>
5+
<LangVersion>10</LangVersion>
6+
7+
<IsPackable>false</IsPackable>
8+
<AssemblyName>InfluxDB3.Client.Test</AssemblyName>
9+
<RootNamespace>InfluxDB3.Client.Test</RootNamespace>
10+
11+
<AssemblyOriginatorKeyFile>../Keys/Key.snk</AssemblyOriginatorKeyFile>
12+
<SignAssembly>true</SignAssembly>
13+
</PropertyGroup>
14+
15+
<ItemGroup>
16+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
17+
<PackageReference Include="NUnit" Version="3.13.3" />
18+
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
19+
<PackageReference Include="NUnit.Analyzers" Version="3.3.0" />
20+
<PackageReference Include="coverlet.collector" Version="3.1.2" />
21+
<PackageReference Include="JunitXml.TestLogger" Version="3.0.110" />
22+
</ItemGroup>
23+
24+
<ItemGroup>
25+
<ProjectReference Include="..\Client\Client.csproj" />
26+
</ItemGroup>
27+
28+
</Project>

Client.Test/InfluxDBClientTest.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace InfluxDB3.Client.Test;
2+
3+
public class InfluxDBClientTest
4+
{
5+
[Test]
6+
public void NotNull()
7+
{
8+
var client = new InfluxDBClient();
9+
client.Dummy();
10+
11+
Assert.That(client, Is.Not.Null);
12+
}
13+
}

Client.Test/Usings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
global using NUnit.Framework;

Client/Client.csproj

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
5+
<LangVersion>10</LangVersion>
6+
7+
<Description>
8+
The C# .NET client that provides an easy and convenient way to interact with InfluxDB 3.
9+
This package supports both writing data to InfluxDB and querying data using the FlightSQL client,
10+
which allows you to execute SQL queries against InfluxDB IOx.
11+
</Description>
12+
<Authors>InfluxDB3.Client Contributors</Authors>
13+
<AssemblyName>InfluxDB3.Client</AssemblyName>
14+
<VersionPrefix>1.0.0</VersionPrefix>
15+
<VersionSuffix>dev</VersionSuffix>
16+
17+
<PackageId>InfluxDB3.Client</PackageId>
18+
<PackageTags>influxdata;timeseries;influxdb</PackageTags>
19+
<PackageIcon>influxdata.jpg</PackageIcon>
20+
<PackageIconUrl>https://github.com/raw/bonitoo-io/influxdb3-csharp/main/Assets/influxdata.jpg</PackageIconUrl>
21+
<PackageProjectUrl>https://github.com/bonitoo-io/influxdb3-csharp/tree/main/Client</PackageProjectUrl>
22+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
23+
<RepositoryUrl>https://github.com/bonitoo-io/influxdb3-csharp</RepositoryUrl>
24+
<RepositoryType>git</RepositoryType>
25+
26+
<PackageReleaseNotes>https://github.com/raw/bonitoo-io/influxdb3-csharp/main/CHANGELOG.md</PackageReleaseNotes>
27+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
28+
<PackageReadmeFile>README.md</PackageReadmeFile>
29+
<RootNamespace>InfluxDB3.Client</RootNamespace>
30+
31+
<AssemblyOriginatorKeyFile>../Keys/Key.snk</AssemblyOriginatorKeyFile>
32+
<SignAssembly>true</SignAssembly>
33+
34+
</PropertyGroup>
35+
36+
<ItemGroup>
37+
<None Include="..\Assets\influxdata.jpg" Pack="true" PackagePath=""/>
38+
<None Include="..\README.md" Pack="true" PackagePath="\"/>
39+
</ItemGroup>
40+
41+
</Project>

0 commit comments

Comments
 (0)