Skip to content

Commit 4424f59

Browse files
mnoman09mikechu-optimizely
authored andcommitted
[FSSDK-8955] Refac: Replaced all instances of full stack except from changelog file and code files (#331)
* Replaced all instances of full stack except from changelog file and code files Co-authored-by: Griffin Cox <[email protected]> * [FSSDK-8955] Do not lint markdown for now * [FSSDK-8955] Remove VALIDATE_MARKDOWN --------- Co-authored-by: mnoman09 <[email protected]> Co-authored-by: Griffin Cox <[email protected]> Co-authored-by: Mike Chu <[email protected]> (cherry picked from commit 5f16357)
1 parent 38c7617 commit 4424f59

File tree

6 files changed

+91
-59
lines changed

6 files changed

+91
-59
lines changed

.github/workflows/csharp.yml

Lines changed: 45 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,38 @@ on:
66
branches: [master]
77
pull_request:
88
branches: [master]
9-
9+
1010
env:
1111
RELEASE_BRANCH: "master"
12+
WINDOWS_2019_SN_PATH: C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\sn.exe
1213

1314
jobs:
1415
lint_code_base:
1516
runs-on: ubuntu-latest
16-
name: Lint Code Base
17+
name: Lint Codebase
1718
steps:
18-
- name: Checkout Code
19+
- name: Checkout code
1920
uses: actions/checkout@v3
2021
with:
2122
# Full git history is needed to get a proper list of changed files
2223
fetch-depth: 0
23-
- name: Lint Code Base
24+
- name: Lint codebase
2425
uses: github/super-linter@v4
2526
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2628
VALIDATE_ALL_CODEBASE: false
2729
DEFAULT_BRANCH: master
2830
VALIDATE_CSHARP: true
29-
VALIDATE_MARKDOWN: true
3031

3132
integration_tests:
33+
name: Run Integration Tests
3234
uses: optimizely/csharp-sdk/.github/workflows/integration_test.yml@master
3335
secrets:
3436
CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }}
3537
TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }}
36-
38+
3739
fullstack_production_suite:
40+
name: Run Optimizely Feature Experimentation Compatibility Suite
3841
uses: optimizely/csharp-sdk/.github/workflows/integration_test.yml@master
3942
with:
4043
FULLSTACK_TEST_REPO: ProdTesting
@@ -43,7 +46,8 @@ jobs:
4346
TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }}
4447

4548
unit_test:
46-
runs-on: ubuntu-latest
49+
name: Build and Run Unit Tests
50+
runs-on: windows-2019 # required version for Framework 4.0
4751
env:
4852
REPO_SLUG: ${{ github.repository }}
4953
BUILD_NUMBER: ${{ github.run_id }}
@@ -52,35 +56,40 @@ jobs:
5256
EVENT_TYPE: ${{ github.event_name }}
5357
CURRENT_BRANCH: ${{ github.head_ref || github.ref_name }}
5458
steps:
55-
- uses: actions/checkout@v3
56-
- name: Setup .NET
57-
uses: actions/setup-dotnet@v1
58-
with:
59-
dotnet-version: 5.0.x
60-
- name: Restore nuget packages
61-
run: |
62-
nuget restore OptimizelySDK.Travis.sln
63-
nuget install ./OptimizelySDK.Tests/packages.config -OutputDirectory ./packages
64-
nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory ./testrunner
65-
- name: script
66-
run: |
67-
./install_mono.sh
68-
xbuild /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$(pwd)/keypair.snk /p:Configuration=Release ./OptimizelySDK.Travis.sln
69-
mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe ./OptimizelySDK.Tests/bin/Release/OptimizelySDK.Tests.dll
70-
- name: find and sign dll
59+
- name: Checkout code
60+
uses: actions/checkout@v3
61+
- name: Add msbuild to PATH
62+
uses: microsoft/setup-msbuild@v1
63+
- name: Setup NuGet
64+
uses: NuGet/setup-nuget@v1
65+
- name: Restore NuGet packages
66+
run: nuget restore ./OptimizelySDK.Travis.sln
67+
- name: Build solution
68+
run: msbuild /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$(pwd)/keypair.snk /p:Configuration=Release ./OptimizelySDK.Travis.sln
69+
- name: Install NUnit Console
70+
run: nuget install NUnit.Console -Version 3.15.2 -DirectDownload -OutputDirectory .
71+
- name: Run NUnit tests
72+
# https://docs.nunit.org/articles/nunit/running-tests/Console-Command-Line.html
73+
run: ./NUnit.ConsoleRunner.3.15.2\tools\nunit3-console.exe /timeout 10000 /process Separate ./OptimizelySDK.Tests/bin/Release/OptimizelySDK.Tests.dll
74+
- name: Find and sign all DLLs
7175
id: unit_tests
7276
run: |
73-
sudo find . -path './OptimizelySDK*bin/Release/OptimizelySDK*.dll' -not -regex '.*Tests.*' -print0 | while IFS= read -r -d '' file; do sn -R $file ./keypair.snk; done
74-
- name: Check on success
77+
Get-ChildItem -Recurse -Exclude '.*Tests.*' -Include 'OptimizelySDK*.dll' |
78+
Where-Object { $_.DirectoryName -match '\\bin\\Release' } |
79+
Foreach-Object { & $env:WINDOWS_2019_SN_PATH -R $_.FullName ./keypair.snk }
80+
- name: Install AWS CLI, deploy to S3 on successful tests & for release
7581
if: steps.unit_tests.outcome == 'success' && env.CURRENT_BRANCH == env.RELEASE_BRANCH && env.EVENT_TYPE == 'push'
7682
env:
7783
AWS_ACCESS_KEY_ID: ${{ secrets.OFTA_KEY }}
7884
AWS_SECRET_ACCESS_KEY: ${{ secrets.OFTA_SECRET }}
7985
AWS_DEFAULT_REGION: ${{ secrets.OFTA_REGION }}
8086
run: |
81-
find . -path './OptimizelySDK*bin/Release/OptimizelySDK*.dll' -not -regex '.*Tests.*' -print0 | while IFS= read -r -d '' file; do (aws s3 cp $file s3://optly-fs-travisci-artifacts/${{ env.REPO_SLUG }}/${{ env.BUILD_NUMBER }}/${{ env.RUN_NUMBER }}/${{ env.ATTEMPT_NUM }}/$(basename $file)-unsigned); done
82-
87+
Install-Module -Name AWS.Tools.Installer -Force;
88+
Install-AWSToolsModule AWS.Tools.S3 -Force -CleanUp;
89+
Get-ChildItem -Recurse -Exclude '.*Tests.*' -include 'OptimizelySDK*.dll' | Where-Object { $_.DirectoryName -match '\\bin\\Release' } | Foreach-Object { aws s3 cp $_.FullName s3://optly-fs-travisci-artifacts/${{ env.REPO_SLUG }}/${{ env.BUILD_NUMBER }}/${{ env.RUN_NUMBER }}/${{ env.ATTEMPT_NUM }}/$(basename $file)-unsigned }
90+
8391
netStandard16:
92+
name: Build For .NET Standard 1.6
8493
runs-on: windows-2022
8594
env:
8695
REPO_SLUG: ${{ github.repository }}
@@ -90,19 +99,17 @@ jobs:
9099
EVENT_TYPE: ${{ github.event_name }}
91100
CURRENT_BRANCH: ${{ github.head_ref || github.ref_name }}
92101
steps:
93-
- uses: actions/checkout@v3
102+
- name: Checkout code
103+
uses: actions/checkout@v3
94104
- name: Setup .NET
95105
uses: actions/setup-dotnet@v2
96106
with:
97107
dotnet-version: 3.1.x
98108
- name: Restore dependencies
99109
run: dotnet restore OptimizelySDK.NetStandard16/OptimizelySDK.NetStandard16.csproj
100-
- name: Build
110+
- name: Build and sign Standard 1.6 project
101111
id: netStandard16_build
102-
run: |
103-
# strongname signing is taken care of in build step
104-
dotnet build OptimizelySDK.NetStandard16/OptimizelySDK.NetStandard16.csproj /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=D:\a\csharp-sdk\csharp-sdk\keypair.snk -c Release
105-
# TODO: no dotnet test yet for NetStandard16
112+
run: dotnet build OptimizelySDK.NetStandard16/OptimizelySDK.NetStandard16.csproj /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=D:\a\csharp-sdk\csharp-sdk\keypair.snk -c Release
106113
- name: Check on success
107114
if: steps.netStandard16_build.outcome == 'success' && env.CURRENT_BRANCH == env.RELEASE_BRANCH && env.EVENT_TYPE == 'push'
108115
env:
@@ -113,6 +120,7 @@ jobs:
113120
(aws s3 cp ./OptimizelySDK.NetStandard16/bin/Release/netstandard1.6/OptimizelySDK.NetStandard16.dll s3://optly-fs-travisci-artifacts/${{ env.REPO_SLUG }}/${{ env.BUILD_NUMBER }}/${{ env.RUN_NUMBER }}/${{ env.ATTEMPT_NUM }}/OptimizelySDK.NetStandard16.dll-unsigned)
114121
115122
netStandard20:
123+
name: Build For .NET Standard 2.0
116124
runs-on: windows-2022
117125
env:
118126
REPO_SLUG: ${{ github.repository }}
@@ -122,19 +130,17 @@ jobs:
122130
EVENT_TYPE: ${{ github.event_name }}
123131
CURRENT_BRANCH: ${{ github.head_ref || github.ref_name }}
124132
steps:
125-
- uses: actions/checkout@v3
133+
- name: Checkout code
134+
uses: actions/checkout@v3
126135
- name: Setup .NET
127136
uses: actions/setup-dotnet@v2
128137
with:
129138
dotnet-version: 3.1.x
130139
- name: Restore dependencies
131140
run: dotnet restore OptimizelySDK.NetStandard20/OptimizelySDK.NetStandard20.csproj
132-
- name: Build
141+
- name: Build and sign Standard 2.0 project
133142
id: netStandard20_build
134-
run: |
135-
# strongname signing is taken care of in build step
136-
dotnet build OptimizelySDK.NetStandard20/OptimizelySDK.NetStandard20.csproj /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=D:\a\csharp-sdk\csharp-sdk\keypair.snk -c Release
137-
# TODO: no dotnet test yet for NetStandard20
143+
run: dotnet build OptimizelySDK.NetStandard20/OptimizelySDK.NetStandard20.csproj /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=D:\a\csharp-sdk\csharp-sdk\keypair.snk -c Release
138144
- name: Check on success
139145
if: steps.netStandard20_build.outcome == 'success' && env.CURRENT_BRANCH == env.RELEASE_BRANCH && env.EVENT_TYPE == 'push'
140146
env:

OptimizelySDK.DemoApp/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# C# SDK Demo App
22

3-
This demo uses the C# SDK, a part of Optimizely's Full Stack solution. It will walk you through:
3+
This demo uses the C# SDK, a part of Optimizely's Feature Experimentation and Optimizely Full Stack (legacy) solution. It will walk you through:
44

55
1. How to bucket users into experiment's variation(s)
66
2. How to track conversion events
@@ -40,7 +40,7 @@ Using the instructions below, you can run the app locally and mimic bucketing we
4040

4141
To better understand this experiment, we recommend that you select a few different visitors on the "Select Visitor" page and bucket them into variations and simulate a conversion event by clicking the "Buy Now" button on the "Shop" page. Within a few seconds, you should see the results populate on the Optimizely results page.
4242

43-
The crux of this Full Stack experiment is bucketing users into variations and exposing them to different sorting functions. The SDK’s `Activate()` function will bucket users into a variation based on a user ID (internal id, user cookie, etc…).
43+
The crux of this Optimizely Feature Experimentation experiment is bucketing users into variations and exposing them to different sorting functions. The SDK’s `Decide()` function will bucket users into a variation based on a user ID (internal id, user cookie, etc…).
4444

4545
To actually test which sorting algorithm influences increased sales, we need to track the number of clicks on the Buy Now button. We can leverage the SDK's `Track()` function for that, passing it the event key which, in our case, is "add_to_cart" and the user ID.
4646

README.md

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44
[![NuGet](https://img.shields.io/nuget/v/Optimizely.SDK.svg?style=plastic)](https://www.nuget.org/packages/Optimizely.SDK/)
55
[![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-extra-configurations-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0)
66

7-
This repository houses the .Net based C# SDK for use with Optimizely Full Stack and Optimizely Rollouts.
7+
This repository houses the .Net based C# SDK for use with Optimizely Feature Experimentation and Optimizely Full Stack (legacy).
88

9-
Optimizely Full Stack is A/B testing and feature flag management for product development teams. Experiment in any application. Make every feature on your roadmap an opportunity to learn. Learn more at https://www.optimizely.com/platform/full-stack/, or see the [documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome).
9+
Optimizely Feature Experimentation is an A/B testing and feature management tool for product development teams, letting you experiment at every step. Using Optimizely Feature Experimentation allows for every feature on your roadmap to be an opportunity to discover hidden insights. Learn more at [Optimizely.com](https://www.optimizely.com/products/experiment/feature-experimentation/), or see the [developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome).
1010

11-
Optimizely Rollouts is free feature flags for development teams. Easily roll out and roll back features in any application without code deploys. Mitigate risk for every feature on your roadmap. Learn more at https://www.optimizely.com/rollouts/, or see the [documentation](https://docs.developers.optimizely.com/experimentation/v3.1.0-full-stack/docs/introduction-to-rollouts).
11+
Optimizely Rollouts is [free feature flags](https://www.optimizely.com/free-feature-flagging/) for development teams. You can easily roll out and roll back features in any application without code deploys, mitigating risk for every feature on your roadmap.
1212

13-
## Getting Started
1413

15-
### Installing the SDK
14+
## Get Started
15+
16+
Refer to the [C# SDK's developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/csharp-sdk) for detailed instructions on getting started with using the SDK.
17+
18+
### Install the C# SDK
1619

1720
The SDK can be installed through [NuGet](https://www.nuget.org):
1821

@@ -30,13 +33,16 @@ Simply compile and run the Sample application to see it in use.
3033
Note that the way the Demo App stores data in memory is not recommended for production use
3134
and is merely illustrates how to use the SDK.
3235

33-
### Using the SDK
3436

35-
#### Documentation
37+
### Feature Management Access
38+
39+
To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely customer success manager.
3640

37-
See the Optimizely Full Stack C# SDK [developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/csharp-sdk) to learn how to set up your first Full Stack project and use the SDK.
41+
## Use the C# SDK
3842

39-
#### Initialization
43+
See the Optimizely Feature Experimentation [developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0-full-stack/docs/csharp-sdk) to learn how to set up your first C# project and use the SDK.
44+
45+
### Initialization
4046

4147
Create the Optimizely Client, for example:
4248

@@ -210,19 +216,39 @@ This option is used to specify whether to start the config manager on initializa
210216

211217
This option is used to provide token for datafile belonging to a secure environment.
212218

213-
## Development
214-
215-
### Unit tests
216-
217-
The sample project contains unit tests as well which can be run from the built-in Visual Studio Test Runner.
219+
## SDK Development
218220

219221
### Contributing
220222

221223
Please see [CONTRIBUTING](CONTRIBUTING.md).
222224

223-
## Third Party Licenses
225+
### Third Party Licenses
224226

225227
Optimizely SDK uses third party software:
226228
[murmurhash-signed](https://www.nuget.org/packages/murmurhash-signed/),
227229
[Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/), and
228230
[NJsonSchema](https://www.nuget.org/packages/NJsonSchema/).
231+
232+
### Other Optimzely SDKs
233+
234+
- Agent - https://github.com/optimizely/agent
235+
236+
- Android - https://github.com/optimizely/android-sdk
237+
238+
- Flutter - https://github.com/optimizely/optimizely-flutter-sdk
239+
240+
- Go - https://github.com/optimizely/go-sdk
241+
242+
- Java - https://github.com/optimizely/java-sdk
243+
244+
- JavaScript - https://github.com/optimizely/javascript-sdk
245+
246+
- PHP - https://github.com/optimizely/php-sdk
247+
248+
- Python - https://github.com/optimizely/python-sdk
249+
250+
- React - https://github.com/optimizely/react-sdk
251+
252+
- Ruby - https://github.com/optimizely/ruby-sdk
253+
254+
- Swift - https://github.com/optimizely/swift-sdk

docs/readme-sync/sdk-reference-guides/csharp-sdk/040 - optimizelyconfig-csharp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ updatedAt: "2020-01-28T21:53:11.290Z"
1010
"title": "Overview"
1111
}
1212
[/block]
13-
Full Stack SDKs open a well-defined set of public APIs, hiding all implementation details. However, some clients may need access to project configuration data within the "datafile".
13+
Optimizely Feature Experimentation SDKs open a well-defined set of public APIs, hiding all implementation details. However, some clients may need access to project configuration data within the "datafile".
1414

1515
In this document, we extend our public APIs to define data models and access methods, which clients can use to access project configuration data.
1616

docs/readme-sync/sdk-reference-guides/csharp-sdk/070 - event-batching-csharp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ hidden: false
55
createdAt: "2019-09-12T13:44:04.059Z"
66
updatedAt: "2019-12-13T00:25:39.892Z"
77
---
8-
The [Optimizely Full Stack C# SDK](https://github.com/optimizely/csharp-sdk) now batches impression and conversion events into a single payload before sending it to Optimizely. This is achieved through a new SDK component called the event processor.
8+
The [Optimizely Feature Experimentation C# SDK](https://github.com/optimizely/csharp-sdk) now batches impression and conversion events into a single payload before sending it to Optimizely. This is achieved through a new SDK component called the event processor.
99

1010
Event batching has the advantage of reducing the number of outbound requests to Optimizely depending on how you define, configure, and use the event processor. It means less network traffic for the same number of Impression and conversion events tracked.
1111

docs/readme-sync/sdk-reference-guides/csharp-sdk/190 - track-csharp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ The table lists other other Optimizely functionality that may be triggered by us
9191
"h-0": "Functionality",
9292
"h-1": "Description",
9393
"0-0": "Conversions",
94-
"0-1": "Calling this method records a conversion and attributes it to the variations that the user has seen.\n \nFull Stack 3.x supports retroactive metrics calculation. You can create [metrics](doc:choose-metrics) on this conversion event and add metrics to experiments even after the conversion has been tracked.\n\nFor more information, see the paragraph **Events are always on** in the introduction of [Events: Tracking clicks, pageviews, and other visitor actions](https://help.optimizely.com/Measure_success%3A_Track_visitor_behaviors/Events%3A_Tracking_clicks%2C_pageviews%2C_and_other_visitor_actions).\n\n**Important!** \n - This method won't track events when the specified event key is invalid.\n - Changing the traffic allocation of running experiments affects how conversions are recorded and variations are attributed to users.",
94+
"0-1": "Calling this method records a conversion and attributes it to the variations that the user has seen.\n \nOptimizely Feature Experimentation 3.x supports retroactive metrics calculation. You can create [metrics](doc:choose-metrics) on this conversion event and add metrics to experiments even after the conversion has been tracked.\n\nFor more information, see the paragraph **Events are always on** in the introduction of [Events: Tracking clicks, pageviews, and other visitor actions](https://help.optimizely.com/Measure_success%3A_Track_visitor_behaviors/Events%3A_Tracking_clicks%2C_pageviews%2C_and_other_visitor_actions).\n\n**Important!** \n - This method won't track events when the specified event key is invalid.\n - Changing the traffic allocation of running experiments affects how conversions are recorded and variations are attributed to users.",
9595
"1-0": "Impressions",
9696
"1-1": "Track doesn't trigger impressions.",
9797
"2-0": "Notification Listeners",

0 commit comments

Comments
 (0)