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

PoC: using local abstractions sources instead of packages #40

Closed
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
116 changes: 104 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@ root=true

[*.cs]
trim_trailing_whitespace=true
insert_final_newline=true

[*]
charset = utf-8
end_of_line = lf
indent_style = tab
indent_size = 4
insert_final_newline=true

[*.cshtml]
indent_style = tab
indent_size = 4

[*.{fs,fsx}]
[*.{fs,fsx,yml}]
indent_style = space
indent_size = 4

[*.{md,markdown,json,js,csproj,fsproj,targets,targets,props,yml}]
[*.{md,markdown,json,js,csproj,fsproj,targets,targets,props}]
indent_style = space
indent_size = 2

Expand All @@ -29,11 +31,86 @@ indent_size = 2
# ---

# ---
# langugage conventions https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#language-conventions
# language conventions https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#language-conventions

# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true

# Style rules
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/naming-rules?view=vs-2017

# Constants always pascal case
dotnet_naming_rule.constants_should_be_pascal_case.symbols = consts
dotnet_naming_rule.constants_should_be_pascal_case.style = consts
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion

dotnet_naming_symbols.consts.applicable_kinds = field
dotnet_naming_symbols.consts.applicable_accessibilities = *
dotnet_naming_symbols.consts.required_modifiers = const

dotnet_naming_style.consts.capitalization = pascal_case

# Non-public static fields always pascal case
dotnet_naming_rule.non_public_static_fields_should_be_pascal_case.symbols = non_public_static_fields
dotnet_naming_rule.non_public_static_fields_should_be_pascal_case.style = non_public_static_fields
dotnet_naming_rule.non_public_static_fields_should_be_pascal_case.severity = suggestion

dotnet_naming_symbols.non_public_static_fields.applicable_kinds = field
dotnet_naming_symbols.non_public_static_fields.applicable_accessibilities = private,protected,internal,protected_internal,private_protected
dotnet_naming_symbols.non_public_static_fields.required_modifiers = static

dotnet_naming_style.non_public_static_fields.capitalization = pascal_case

# Non-private readonly fields are pascal case
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.symbols = non_private_readonly_fields
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.style = non_private_readonly_fields

dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities = public,protected,internal,protected_internal,private_protected
dotnet_naming_symbols.non_private_readonly_fields.required_modifiers = readonly

dotnet_naming_style.non_private_readonly_fields.capitalization = pascal_case

# Private instance fields are camel case prefixed underscore
dotnet_naming_rule.private_fields_should_be_camelcase_prefix_underscore.symbols = private_fields
dotnet_naming_rule.private_fields_should_be_camelcase_prefix_underscore.style = private_fields
dotnet_naming_rule.private_fields_should_be_camelcase_prefix_underscore.severity = suggestion

dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private

dotnet_naming_style.private_fields.capitalization = camel_case
dotnet_naming_style.private_fields.required_prefix = _

# Locals and parameters are camel case
dotnet_naming_rule.locals.severity = suggestion
dotnet_naming_rule.locals.symbols = locals
dotnet_naming_rule.locals.style = locals

dotnet_naming_symbols.locals.applicable_kinds = parameter, local

dotnet_naming_style.locals.capitalization = camel_case

# Local functions are pascal case
dotnet_naming_rule.local_functions.severity = suggestion
dotnet_naming_rule.local_functions.symbols = local_functions
dotnet_naming_rule.local_functions.style = local_functions

dotnet_naming_symbols.local_functions.applicable_kinds = local_function

dotnet_naming_style.local_functions.capitalization = pascal_case

# Public members always pascal case
dotnet_naming_rule.public_members_should_be_pascal_case.symbols = public_members
dotnet_naming_rule.public_members_should_be_pascal_case.style = public_members
dotnet_naming_rule.public_members_should_be_pascal_case.severity = suggestion

dotnet_naming_symbols.public_members.applicable_kinds = property,method,field,event,delegate
dotnet_naming_symbols.public_members.applicable_accessibilities = public

dotnet_naming_style.public_members.capitalization = pascal_case

dotnet_style_qualification_for_field = false:error
dotnet_style_qualification_for_property = false:error
dotnet_style_qualification_for_method = false:error
Expand Down Expand Up @@ -82,7 +159,7 @@ csharp_prefer_braces = false:warning
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:error

# ---
# formatting conventions https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-formatting-conventions
# formatting conventions https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#formatting-conventions

# Newline settings (Allman yo!)
csharp_new_line_before_open_brace = all
Expand All @@ -108,15 +185,30 @@ csharp_preserve_single_line_statements = false
csharp_preserve_single_line_blocks = true

# Resharper
resharper_csharp_braces_for_lock=required_for_complex
resharper_csharp_braces_for_using=required_for_complex
resharper_csharp_braces_for_while=required_for_complex
resharper_csharp_braces_for_foreach=required_for_complex
resharper_csharp_braces_for_for=required_for_complex
resharper_csharp_braces_for_fixed=required_for_complex
resharper_csharp_braces_for_ifelse=required_for_complex
resharper_csharp_braces_for_lock=required_for_multiline
resharper_csharp_braces_for_using=required_for_multiline
resharper_csharp_braces_for_while=required_for_multiline
resharper_csharp_braces_for_foreach=required_for_multiline
resharper_csharp_braces_for_for=required_for_multiline
resharper_csharp_braces_for_fixed=required_for_multiline
resharper_csharp_braces_for_ifelse=required_for_multiline

resharper_csharp_accessor_owner_body=expression_body

resharper_redundant_case_label_highlighting=do_not_show
resharper_redundant_argument_default_value_highlighting=do_not_show

[Jenkinsfile]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{sh,bat,ps1}]
trim_trailing_whitespace=true
insert_final_newline=true

[*.sh]
end_of_line = lf
11 changes: 6 additions & 5 deletions .github/check-license-headers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,18 @@ set -o errexit
set -o pipefail

TOP=$(cd "$(dirname "$0")/.." >/dev/null && pwd)
NLINES=$(wc -l .github/license-header.txt | awk '{print $1}')
NLINES_CS=$(wc -l .github/license-header.txt | awk '{print $1}')
NLINES_FS=$(wc -l .github/license-header-fs.txt | awk '{print $1}')

function check_license_header {
local f
f=$1
if [[ $f == *.fs ]] && ! diff -a --strip-trailing-cr .github/license-header-fs.txt <(head -$NLINES "$f") >/dev/null; then
if [[ $f == *.fs ]] && ! diff -a --strip-trailing-cr .github/license-header-fs.txt <(head -$NLINES_FS "$f") >/dev/null; then
echo $f
echo "check-license-headers: error: '$f' does not have required license header, see 'diff -u .github/license-header-fs.txt <(head -$NLINES $f)'"
echo "check-license-headers: error: '$f' does not have required license header, see 'diff -u .github/license-header-fs.txt <(head -$NLINES_FS $f)'"
return 1
elif [[ $f != *.fs ]] && ! diff -a --strip-trailing-cr .github/license-header.txt <(head -$NLINES "$f") >/dev/null; then
echo "check-license-headers: error: '$f' does not have required license header, see 'diff -u .github/license-header.txt <(head -$NLINES $f)'"
elif [[ $f != *.fs ]] && ! diff -a --strip-trailing-cr .github/license-header.txt <(head -$NLINES_CS "$f") >/dev/null; then
echo "check-license-headers: error: '$f' does not have required license header, see 'diff -u .github/license-header.txt <(head -$NLINES_CS $f)'"
return 1
else
return 0
Expand Down
21 changes: 0 additions & 21 deletions .github/license-header-fs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,3 @@
// The OpenSearch Contributors require contributions made to
// this file be licensed under the Apache-2.0 license or a
// compatible open source license.
//
// Modifications Copyright OpenSearch Contributors. See
// GitHub history for details.
//
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
20 changes: 0 additions & 20 deletions .github/license-header.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,4 @@
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
# 1.0.1 is skipped because it doesn't have a tag in OpenSearch repo, we can't check out to compile plugins
version: [1.3.1, 1.3.0, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.0, 1.0.0]
version: [2.2.0, 2.1.0, 2.0.0, 1.3.1, 1.3.0, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.0, 1.0.0]

steps:
# Due to https://github.com/opensearch-project/project-website/issues/737
Expand Down
18 changes: 8 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,28 @@
*.cache
*.ilk
*.log
*.nupkg
*.ncrunchsolution
[Bb]in
[Dd]ebug/
test-results
test-results/*
*.lib
*.sbr
*.DotSettings.user
*.DotSettings
obj/
[Rr]elease*/
!docs/release-notes
_ReSharper*/
_NCrunch*/
[Tt]est[Rr]esult*

.fake/*
.fake
packages/*
!.paket/paket.bootstrapper.exe
paket.exe
paket-files/*.cached

BenchmarkDotNet.Artifacts
build/*
!build/tools
!build/keys
Expand All @@ -54,17 +55,15 @@ build/tools/*
!build/*.nuspec
!build/*.png
!build/*.targets
!build/*.sh
!build/scripts

.ci/output


/dep/Newtonsoft.Json.4.0.2
!docs/build
docs/node_modules
doc/Help

/src/Osc.Tests.Unit/*.ncrunchproject
*.ncrunchproject
Cache
YamlCache
Expand All @@ -79,13 +78,12 @@ launchSettings.json
project.lock.json
.vs
.vs/*
.vscode/*
.sonarqube/*
.ionide
.ionide/*


.idea/
*.sln.iml
/src/.vs/restore.dg
# temporary location for doc generation
docs-temp
*.binlog
dotnet-tool/*
21 changes: 9 additions & 12 deletions COMPATIBILITY.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
- [Compatibility with OpenSearch](#compatibility-with-opensearch)
- [Upgrading](#upgrading)

## Compatibility with OpenSearch

The below matrix shows the compatibility of the `opensearch-net` with versions of [`OpenSearch`](https://opensearch.org/downloads.html#opensearch). Currently this client is in a pre-release phase. The below matrix shows compatibility for the upcoming version.
The below matrix shows the compatibility of the [`opensearch-net`](https://www.nuget.org/profiles/opensearchproject) with versions of [`OpenSearch`](https://opensearch.org/downloads.html#opensearch).

| OpenSearch Version | Client Version |
| --- | --- |
| 1.0.0 | 1.0.0 |
| 1.0.1 | 1.0.0 |
| 1.1.0 | 1.0.0 |
| 1.2.0 | 1.0.0 |
| 1.2.1 | 1.0.0 |
| 1.2.2 | 1.0.0 |
| 1.2.3 | 1.0.0 |
| 1.2.4 | 1.0.0 |
| 1.3.0 | 1.0.0 |
| 1.3.1 | 1.0.0 |
|--------------------|----------------|
| 1.x | 1.0.0, 1.1.0 |
| 2.x | 1.1.0 |

## Upgrading

Major versions of OpenSearch introduce breaking changes that require careful upgrades of the client. While `opensearch-net` client 1.1.0 works against the latest OpenSearch 1.x, certain deprecated features removed in OpenSearch 2.0 have also been removed from the client. Please refer to the [OpenSearch documentation](https://opensearch.org/docs/latest/clients/index/) for more information.
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageReleaseNotes>See https://github.com/opensearch-project/opensearch-net/releases</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/opensearch-project/opensearch-net</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/opensearch-project/opensearch-net/master/build/nuget-icon.png</PackageIconUrl>
<PackageIconUrl>https://raw.githubusercontent.com/opensearch-project/opensearch-net/main/build/nuget-icon.png</PackageIconUrl>
<RepositoryType>Git</RepositoryType>
</PropertyGroup>

<PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project>
<Import Project="$(SolutionRoot)\src\_PublishArtifacts.Build.props" Condition="$(IsPackable) == True"/>
<PropertyGroup Condition="$(IsPackable) == True OR $(MSBuildProjectName.StartsWith('Tests'))">
<Import Project="src\_PublishArtifacts.Build.props" Condition="$(IsPackable) == True"/>
<PropertyGroup Condition="$(SignAssembly) == True OR $(IsPackable) == True OR $(MSBuildProjectName.StartsWith('Tests'))">
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(SolutionRoot)\build\keys\keypair.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\build\keys\keypair.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition="$(IsPackable) == True">
<OutDir>bin/$(Configuration)/$(TargetFramework)/</OutDir>
Expand Down
18 changes: 10 additions & 8 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ This document explains who the maintainers are (see below), what they do in this

## Current Maintainers

| Maintainer | GitHub ID | Affiliation |
| ------------------------ | --------------------------------------------------- | ----------- |
| Anirudha Jadhav | [anirudha](https://github.com/anirudha) | Amazon |
| Joshua Li | [joshuali925](https://github.com/joshuali925) | Amazon |
| Alex Meizer | [alexmeizer](https://github.com/alexmeizer) | Bit Quill |
| Guian Gumpac | [guiangumpac](https://github.com/guiangumpac) | Bit Quill |
| Raymond Lum | [raymond-lum](https://github.com/raymond-lum) | Bit Quill |
| Yury Fridlyand | [Yury-Fridlyand](https://github.com/Yury-Fridlyand) | Bit Quill |
| Maintainer | GitHub ID | Affiliation |
| ------------------------ | ------------------------------------------------------------------ | ----------- |
| Anirudha Jadhav | [anirudha](https://github.com/anirudha) | Amazon |
| Joshua Li | [joshuali925](https://github.com/joshuali925) | Amazon |
| Guian Gumpac | [guiangumpac](https://github.com/guiangumpac) | Bit Quill |
| Raymond Lum | [raymond-lum](https://github.com/raymond-lum) | Bit Quill |
| Yury Fridlyand | [Yury-Fridlyand](https://github.com/Yury-Fridlyand) | Bit Quill |
| Max Ksyunz | [MaxKsyunz](https://github.com/MaxKsyunz) | Bit Quill |
| Forest Vey | [forestmvey](https://github.com/forestmvey) | Bit Quill |
| Mitchell Gale | [MitchellGale-BitQuill](https://github.com/MitchellGale-BitQuill) | Bit Quill |

## Maintainer Responsibilities

Expand Down
Loading