Skip to content

Commit

Permalink
Add abstractions library to the repo - full copy without changes from…
Browse files Browse the repository at this point in the history
… `main/HEAD` @ 63bac1681.

* Copy abstractions sources
* Adopt the abstractions migration
* Merge misc files

Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
  • Loading branch information
Yury-Fridlyand committed Sep 1, 2022
1 parent 6703cd4 commit 6d39fde
Show file tree
Hide file tree
Showing 148 changed files with 8,498 additions and 475 deletions.
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
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/*
4 changes: 2 additions & 2 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"/>
<Import Project="src\_PublishArtifacts.Build.props" Condition="$(IsPackable) == True"/>
<PropertyGroup Condition="$(IsPackable) == True OR $(MSBuildProjectName.StartsWith('Tests'))">
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(SolutionRoot)\build\keys\keypair.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>$(SolutionDir)\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
14 changes: 14 additions & 0 deletions abstractions/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MinVerDefaultPreReleasePhase>canary</MinVerDefaultPreReleasePhase>
<MinVerMinimumMajorMinor>0.1</MinVerMinimumMajorMinor>

<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MinVer" Version="2.3.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.0" PrivateAssets="all"/>
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions abstractions/OpenSearch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions abstractions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
![OpenSearch logo](OpenSearch.svg)

- [OpenSearch .NET abstractions](#opensearch-net-abstractions)
- [OpenSearch.OpenSearch.Managed](#opensearchopensearchmanaged)
- [OpenSearch.OpenSearch.Ephemeral](#opensearchopensearchephemeral)
- [OpenSearch.OpenSearch.Xunit](#opensearchopensearchxunit)
- [OpenSearch.Stack.ArtifactsApi](#opensearchstackartifactsapi)
- [Project Resources](#project-resources)
- [Code of Conduct](#code-of-conduct)
- [Security](#security)
- [License](#license)
- [Copyright](#copyright)

## Welcome!

# OpenSearch .NET abstractions

You've reached the home repository for several auxiliary projects from the .NET team within OpenSearch.

Current projects:

### [OpenSearch.OpenSearch.Managed](src/OpenSearch.OpenSearch.Managed/README.md)

Provides an easy to start/stop one or more OpenSearch instances that exists on disk already

### [OpenSearch.OpenSearch.Ephemeral](src/OpenSearch.OpenSearch.Ephemeral/README.md)

Bootstrap (download, install, configure) and run OpenSearch clusters with ease.
Started nodes are run in a new ephemeral location each time they are started and will clean up after they
are disposed.

### [OpenSearch.OpenSearch.Xunit](src/OpenSearch.OpenSearch.Xunit/README.md)

Write integration tests against OpenSearch.
Works with `.NET Core` and `.NET 4.6` and up.

Supports `dotnet xunit`, `dotnet test`, `xunit.console.runner` and tests will be runnable in your IDE through VSTest and jetBrains Rider.

### [OpenSearch.Stack.ArtifactsApi](src/OpenSearch.Stack.ArtifactsApi/README.md)

Library to fetch the url and metadata for released artifacts.

Supports:

1. Snapshots builds
* `latest-MAJOR` where `MAJOR` is a single integer representing the major you want
* `latest` latest greatest

2. Released versions
* `MAJOR.MINOR.PATH` where `MAJOR` is still supported as defined by the EOL policy of OpenSearch.
* Note if the version exists but is not yet released it will resolve as a build candidate

## Project Resources

* [Project Website](https://opensearch.org/)
* Need help? Try [Forums](https://discuss.opendistrocommunity.dev/)
* [Project Principles](https://opensearch.org/#principles)
* [Contributing to OpenSearch](CONTRIBUTING.md)
* [Maintainer Responsibilities](MAINTAINERS.md)
* [Release Management](RELEASING.md)
* [Admin Responsibilities](ADMINS.md)
* [Security](SECURITY.md)

## Code of Conduct

This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUCT.md). For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq), or contact [opensource-codeofconduct@amazon.com](mailto:opensource-codeofconduct@amazon.com) with any additional questions or comments.

## Security
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to aws-security@amazon.com. Please do **not** create a public GitHub issue.

## License

This project is licensed under the [Apache v2.0 License](LICENSE.txt).

## Copyright

Copyright OpenSearch Contributors. See [NOTICE](NOTICE.txt) for details.
2 changes: 2 additions & 0 deletions abstractions/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
dotnet run --project build/scripts -- %*
3 changes: 3 additions & 0 deletions abstractions/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -euo pipefail
dotnet run --project build/scripts -- "$@"
Binary file added abstractions/build/keys/keypair.snk
Binary file not shown.
Binary file added abstractions/build/keys/public.snk
Binary file not shown.
Loading

0 comments on commit 6d39fde

Please sign in to comment.