Skip to content

Commit 0ba54e4

Browse files
authored
chore: introduce server-ai package (#35)
Adds a new project for the ai integration, including: - updating solution - basic unit test just to prove it works in ci - CI job - documentation + issue templates - doc configuration
1 parent ac15b40 commit 0ba54e4

16 files changed

+455
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: LaunchDarkly.ServerSdk.Ai Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'package: sdk/server-ai, bug'
6+
assignees: ''
7+
8+
---
9+
10+
**Is this a support request?**
11+
This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the SDK code. If you're not sure whether the problem you are having is specifically related to the SDK, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going [here](https://support.launchdarkly.com/hc/en-us/requests/new) or by emailing [email protected].
12+
13+
Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above.
14+
15+
**Describe the bug**
16+
A clear and concise description of what the bug is.
17+
18+
**To reproduce**
19+
Steps to reproduce the behavior.
20+
21+
**Expected behavior**
22+
A clear and concise description of what you expected to happen.
23+
24+
**Logs**
25+
If applicable, add any log output related to your problem.
26+
27+
**Server SDK & AI package version**
28+
The version of the AI package, as well as the version of the server-side SDK.
29+
30+
**Language version, developer tools**
31+
For instance, .NET 6.0.
32+
33+
**OS/platform**
34+
For instance, Ubuntu 16.04, Windows 10, or Android 4.0.3.
35+
36+
**Additional context**
37+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: LaunchDarkly.ServerSdk.Ai Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: 'package: sdk/server-ai, feature'
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I would love to see the SDK [...does something new...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context about the feature request here.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: LaunchDarkly.ServerSdk.Ai CI
2+
on:
3+
push:
4+
branches: [main, 'feat/**']
5+
paths-ignore:
6+
- '**.md' # Do not need to run CI for markdown changes.
7+
pull_request:
8+
branches: [main, 'feat/**']
9+
paths-ignore:
10+
- '**.md'
11+
12+
jobs:
13+
build-and-test:
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, windows-latest, macos-latest]
17+
fail-fast: false
18+
runs-on: ${{ matrix.os }}
19+
permissions:
20+
id-token: write
21+
contents: read
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Setup Env from project's Env file
26+
shell: bash
27+
run: echo "$(cat pkgs/sdk/server-ai/github_actions.env)" >> $GITHUB_ENV
28+
29+
- uses: launchdarkly/gh-actions/actions/[email protected]
30+
name: Get secrets
31+
with:
32+
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
33+
34+
- uses: ./.github/actions/ci
35+
with:
36+
project_file: ${{ env.PROJECT_FILE}}
37+
test_project_file: ${{ env.TEST_PROJECT_FILE}}
38+
39+
- uses: ./.github/actions/build-docs
40+
with:
41+
workspace_path: ${{ env.WORKSPACE_PATH}}

LaunchDarkly.ServerSdk.sln

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchDarkly.ServerSdk.Tele
2121
EndProject
2222
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestService", "pkgs\sdk\server\contract-tests\TestService.csproj", "{72D0898F-4CD9-42B7-B3B4-5CFD23796C47}"
2323
EndProject
24+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "server-ai", "server-ai", "{A52FE37A-BCDD-4FC0-A8BA-7576721EA217}"
25+
EndProject
26+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchDarkly.ServerSdk.Ai", "pkgs\sdk\server-ai\src\LaunchDarkly.ServerSdk.Ai.csproj", "{89B5D359-6BC8-4CD0-B17D-D68A435ABBB2}"
27+
EndProject
28+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchDarkly.ServerSdk.Ai.Tests", "pkgs\sdk\server-ai\test\LaunchDarkly.ServerSdk.Ai.Tests.csproj", "{ECA96F40-101E-494B-971F-B1F6E0B9F78D}"
29+
EndProject
2430
Global
2531
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2632
Debug|Any CPU = Debug|Any CPU
@@ -47,6 +53,14 @@ Global
4753
{72D0898F-4CD9-42B7-B3B4-5CFD23796C47}.Debug|Any CPU.Build.0 = Debug|Any CPU
4854
{72D0898F-4CD9-42B7-B3B4-5CFD23796C47}.Release|Any CPU.ActiveCfg = Release|Any CPU
4955
{72D0898F-4CD9-42B7-B3B4-5CFD23796C47}.Release|Any CPU.Build.0 = Release|Any CPU
56+
{89B5D359-6BC8-4CD0-B17D-D68A435ABBB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
57+
{89B5D359-6BC8-4CD0-B17D-D68A435ABBB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
58+
{89B5D359-6BC8-4CD0-B17D-D68A435ABBB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
59+
{89B5D359-6BC8-4CD0-B17D-D68A435ABBB2}.Release|Any CPU.Build.0 = Release|Any CPU
60+
{ECA96F40-101E-494B-971F-B1F6E0B9F78D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
61+
{ECA96F40-101E-494B-971F-B1F6E0B9F78D}.Debug|Any CPU.Build.0 = Debug|Any CPU
62+
{ECA96F40-101E-494B-971F-B1F6E0B9F78D}.Release|Any CPU.ActiveCfg = Release|Any CPU
63+
{ECA96F40-101E-494B-971F-B1F6E0B9F78D}.Release|Any CPU.Build.0 = Release|Any CPU
5064
EndGlobalSection
5165
GlobalSection(SolutionProperties) = preSolution
5266
HideSolutionNode = FALSE
@@ -63,5 +77,8 @@ Global
6377
{35014C04-26CE-43B0-933D-35D80CF0E6B8} = {7A984A5D-0C83-42FA-8BF7-DCA2441F62DA}
6478
{71299584-BF0D-48A4-B2E1-D6292036D48D} = {7A984A5D-0C83-42FA-8BF7-DCA2441F62DA}
6579
{72D0898F-4CD9-42B7-B3B4-5CFD23796C47} = {FDA973CE-26F2-4745-AF19-0873F170C4CF}
80+
{A52FE37A-BCDD-4FC0-A8BA-7576721EA217} = {0A3F3CFA-1CBB-49BD-BCD3-4A53E3D08665}
81+
{89B5D359-6BC8-4CD0-B17D-D68A435ABBB2} = {A52FE37A-BCDD-4FC0-A8BA-7576721EA217}
82+
{ECA96F40-101E-494B-971F-B1F6E0B9F78D} = {A52FE37A-BCDD-4FC0-A8BA-7576721EA217}
6683
EndGlobalSection
6784
EndGlobal

pkgs/sdk/server-ai/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# docfx output directories
2+
api
3+
docs

pkgs/sdk/server-ai/CONTRIBUTING.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Contributing to the LaunchDarkly AI SDK (server-side) for .NET
2+
3+
LaunchDarkly has published an [SDK contributor's guide](https://docs.launchdarkly.com/sdk/concepts/contributors-guide) that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this SDK.
4+
5+
## Submitting bug reports and feature requests
6+
7+
The LaunchDarkly SDK team monitors the [issue tracker](https://github.com/launchdarkly/dotnet-core/issues) in the SDK repository. Bug reports and feature requests specific to this SDK should be filed in this issue tracker. The SDK team will respond to all newly filed issues within two business days.
8+
9+
## Submitting pull requests
10+
11+
We encourage pull requests and other contributions from the community. Before submitting pull requests, ensure that all temporary or unintended code is removed. Don't worry about adding reviewers to the pull request; the LaunchDarkly SDK team will add themselves. The SDK team will acknowledge all pull requests within two business days.
12+
13+
## Build instructions
14+
15+
### Prerequisites
16+
17+
To set up your SDK build time environment, you must [download .NET development tools and follow the instructions](https://dotnet.microsoft.com/download).
18+
19+
The AI SDK wraps the [Server-Side](../server) SDK.
20+
21+
### Building
22+
23+
To install all required packages:
24+
25+
```bash
26+
dotnet restore
27+
```
28+
29+
Then, to build the SDK for all target frameworks:
30+
31+
```bash
32+
dotnet build src/LaunchDarkly.ServerSdk.Ai
33+
```
34+
35+
Or, in Linux:
36+
37+
```bash
38+
make
39+
```
40+
41+
Or, to build for only one target framework (in this example, .NET Standard 2.0):
42+
43+
```bash
44+
dotnet build src/LaunchDarkly.ServerSdk.Ai -f netstandard2.0
45+
```
46+
47+
### Testing
48+
49+
To run all unit tests:
50+
51+
```bash
52+
dotnet test test/LaunchDarkly.ServerSdk.Ai.Tests/LaunchDarkly.ServerSdk.Ai.Tests.csproj
53+
```
54+
55+
Or, in Linux:
56+
57+
```bash
58+
make test
59+
```
60+
61+
Note that the unit tests can only be run in Debug configuration. There is an `InternalsVisibleTo` directive that allows the test code to access internal members of the library, and assembly strong-naming in the Release configuration interferes with this.
62+
63+
## Documentation in code
64+
65+
All public types, methods, and properties should have documentation comments in the standard C# XML comment format. These will be automatically included in the documentation that is generated on release; this process also uses additional Markdown content from the respective packages `docs-src/` subdirectory.
66+
67+
See [`docs-src/README.md`](./docs-src/README.md) for more details.

pkgs/sdk/server-ai/LaunchDarkly.pk

160 Bytes
Binary file not shown.

pkgs/sdk/server-ai/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
build:
2+
dotnet build
3+
4+
test:
5+
dotnet test
6+
7+
clean:
8+
dotnet clean

pkgs/sdk/server-ai/README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# LaunchDarkly AI SDK (server-side) for .NET
2+
3+
The LaunchDarkly AI SDK (server-side) for .NET is designed primarily for use in multi-user systems such as web servers and applications. It follows the server-side LaunchDarkly model for multi-user contexts. It is not intended for use in desktop and embedded systems applications.
4+
5+
Currently there is no client-side AI SDK for .NET. If you're interested, please let us know by filing an issue!
6+
7+
## LaunchDarkly overview
8+
9+
[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves trillions of feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today!
10+
11+
[![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly)
12+
13+
## Supported .NET versions
14+
15+
This version of the AI SDK is built for the following targets:
16+
17+
* .NET 7.0: runs on .NET 7.0 and above (including higher major versions).
18+
* .NET Framework 4.6.2: runs on .NET Framework 4.6.2 and above.
19+
* .NET Standard 2.0: runs in any project that is targeted to .NET Standard 2.x rather than to a specific runtime platform.
20+
21+
The .NET build tools should automatically load the most appropriate build of the SDK for whatever platform your application or library is targeted to.
22+
23+
## Getting started
24+
25+
Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/server-side/dotnet#getting-started) for instructions on getting started with using the SDK.
26+
27+
## Signing
28+
29+
The published version of this assembly is digitally signed with Authenticode and [strong-named](https://docs.microsoft.com/en-us/dotnet/framework/app-domains/strong-named-assemblies). Building the code locally in the default Debug configuration does not use strong-naming and does not require a key file. The public key file is in this repository at `LaunchDarkly.pk` as well as here:
30+
31+
```
32+
Public Key:
33+
0024000004800000940000000602000000240000525341310004000001000100f121bbf427e4d7
34+
edc64131a9efeefd20978dc58c285aa6f548a4282fc6d871fbebeacc13160e88566f427497b625
35+
56bf7ff01017b0f7c9de36869cc681b236bc0df0c85927ac8a439ecb7a6a07ae4111034e03042c
36+
4b1569ebc6d3ed945878cca97e1592f864ba7cc81a56b8668a6d7bbe6e44c1279db088b0fdcc35
37+
52f746b4
38+
39+
Public Key Token: f86add69004e6885
40+
```
41+
42+
## Learn more
43+
44+
TODO(cwaldren): update reference docs links
45+
46+
Read our [documentation](https://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/server-side/dotnet).
47+
48+
The authoritative description of all types, properties, and methods is in the [generated API documentation](https://launchdarkly.github.io/dotnet-core/pkgs/sdk/server).
49+
50+
## Contributing
51+
52+
We encourage pull requests and other contributions from the community. Check out our [contributing guidelines](CONTRIBUTING.md) for instructions on how to contribute to this SDK.
53+
54+
## About LaunchDarkly
55+
56+
* LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
57+
* Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
58+
* Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
59+
* Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
60+
* Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
61+
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Read [our documentation](https://docs.launchdarkly.com/sdk) for a complete list.
62+
* Explore LaunchDarkly
63+
* [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
64+
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides
65+
* [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation
66+
* [blog.launchdarkly.com](https://blog.launchdarkly.com/ "LaunchDarkly Blog Documentation") for the latest product updates

pkgs/sdk/server-ai/docfx.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"metadata": [
3+
{
4+
"src": [
5+
{
6+
"src": "./src",
7+
"files": [
8+
"**/*.csproj",
9+
"**/bin/**/**LaunchDarkly**.dll"
10+
]
11+
}
12+
],
13+
"dest": "./api",
14+
"properties" : {
15+
"Configuration": "Debug"
16+
},
17+
}
18+
],
19+
"build": {
20+
"content": [
21+
{
22+
"files": [
23+
"**/*.{md,yml}"
24+
],
25+
"exclude": [
26+
"docs/**"
27+
]
28+
}
29+
],
30+
"resource": [
31+
{
32+
"files": [
33+
"images/**"
34+
]
35+
}
36+
],
37+
"output": "docs",
38+
"template": [
39+
"default"
40+
],
41+
"globalMetadata": {
42+
"_appName": "LaunchDarkly Dotnet Server AI SDK",
43+
"_appTitle": "LaunchDarkly Dotnet Server AI SDK",
44+
"_enableSearch": true,
45+
"pdf": false
46+
}
47+
}
48+
}

0 commit comments

Comments
 (0)