Skip to content

Commit 730f57b

Browse files
authored
Merge pull request #16 from tableau/release/3.0.0
Release 3.0.0
2 parents 91aa62b + e6c9947 commit 730f57b

File tree

1,291 files changed

+6635
-3831
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,291 files changed

+6635
-3831
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[*.{cs,vb}]
33
# File header
44

5-
file_header_template = Copyright (c) 2023, Salesforce, Inc.\n SPDX-License-Identifier: Apache-2\n \n Licensed under the Apache License, Version 2.0 (the ""License"") \n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an ""AS IS"" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n
5+
file_header_template = \n Copyright (c) 2024, Salesforce, Inc.\n SPDX-License-Identifier: Apache-2\n \n Licensed under the Apache License, Version 2.0 (the "License") \n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n
66

77
#### Naming styles ####
88

Directory.Build.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<Nullable>enable</Nullable>
55
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
66
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
7-
<Version>2.1.1</Version>
8-
<Authors>Tableau Software, LLC</Authors>
9-
<Company>Tableau Software, LLC</Company>
10-
<Copyright>Copyright (c) 2024, Tableau Software, LLC and its licensors</Copyright>
7+
<Version>3.0.0</Version>
8+
<Authors>Salesforce, Inc.</Authors>
9+
<Company>Salesforce, Inc.</Company>
10+
<Copyright>Copyright (c) 2024, Salesforce, Inc. and its licensors</Copyright>
1111
</PropertyGroup>
1212
</Project>

examples/Csharp.ExampleApplication/Csharp.ExampleApplication.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
55
<!-- Don't warn on ConfigureAwait on console application, Don't require license headers for sample code -->
66
<NoWarn>CA2007,IDE0073</NoWarn>
77
<UserSecretsId>7d7631f1-dc4a-49de-89d5-a194544705c1</UserSecretsId>

examples/DependencyInjection.ExampleApplication/DependencyInjection.ExampleApplication.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
5+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
66
<!-- Don't warn on ConfigureAwait on console application, Don't require license headers for sample code -->
77
<NoWarn>CA2007,IDE0073</NoWarn>
88
</PropertyGroup>

scripts/generate-docs.ps1

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<#
2-
Copyright (c) 2023, Salesforce, Inc.
2+
Copyright (c) 2024, Salesforce, Inc.
33
SPDX-License-Identifier: Apache-2
44
5-
Licensed under the Apache License, Version 2.0 (the ""License"")
5+
Licensed under the Apache License, Version 2.0 (the "License")
66
you may not use this file except in compliance with the License.
77
You may obtain a copy of the License at
88
99
http://www.apache.org/licenses/LICENSE-2.0
1010
1111
Unless required by applicable law or agreed to in writing, software
12-
distributed under the License is distributed on an ""AS IS"" BASIS,
12+
distributed under the License is distributed on an "AS IS" BASIS,
1313
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
@@ -43,6 +43,14 @@ $main_docs_dir = Join-Path $root_dir "src/Documentation"
4343
# Directory that sphinx generates automatic documentation to.
4444
$sphinx_output_dir = Join-Path $python_dir "Documentation/generated"
4545

46+
# Directory for Python wrapper files. Includes an index file and a directory for autogenerated files.
47+
$python_wrapper_dir = Join-Path $main_docs_dir "python_wrapper";
48+
49+
$python_reference_dir_name = "reference";
50+
51+
# Directory where DocFX looks for markdown files to render into our 'Python Wrapper' section.
52+
$python_md_destination = Join-Path $python_wrapper_dir $python_reference_dir_name;
53+
4654
function Run-Command {
4755
param([string]$Cmd)
4856
Write-Host "Executing command";
@@ -149,10 +157,7 @@ function Copy-Python-Docs {
149157
#>
150158
# Directory to which sphinx write generated markdown files.
151159
$sphinx_generated_files_dir = Join-Path $sphinx_output_dir "markdown/generated/*";
152-
153-
# Directory where DocFX looks for markdown files to render into our 'Python Wrapper' section.
154-
$python_md_destination = Join-Path $main_docs_dir "python_wrapper";
155-
160+
156161
Write-Host-With-Timestamp "Copying python docs to final destination.";
157162
Run-Command ("Clear-Directory -Path $python_md_destination");
158163
Run-Command ("Copy-Item -Force -Recurse $sphinx_generated_files_dir -Destination $python_md_destination");
@@ -166,7 +171,6 @@ function Write-Python-Docs-Toc {
166171
.SYNOPSIS
167172
Generate a toc.yml file (table of contents for DocFX) from the python doc markdown files.
168173
#>
169-
$python_md_destination = Join-Path $main_docs_dir "python_wrapper";
170174
Write-Host-With-Timestamp "Generating toc.yml for Python auto-generated doc files ($python_md_destination).";
171175

172176
class DocFileInfo {
@@ -212,14 +216,15 @@ function Write-Python-Docs-Toc {
212216

213217
# Build the yaml file from DocFileInfo list
214218
$fileContent = New-Object Collections.Generic.List[string];
219+
$fileContent.Add("### YamlMime:TableOfContent");
215220
$fileContent.Add("items:");
216221
$packages = $docFiles | Where-Object { $_.Category -eq "Package" }
217222
if ($packages.Length -eq 0) {
218223
return;
219224
}
220225
foreach ($package in $packages) {
221226
$fileContent.Add("- name: $($package.Package)");
222-
$fileContent.Add(" href: $($package.FileName)");
227+
$fileContent.Add(" href: $($python_reference_dir_name)/$($package.FileName)");
223228
$moduleGroups = $docFiles | Where-Object { $_.Category -ne "Package" -and $_.Package -eq $package.Package } | Group-Object -Property Package, Module;
224229
if ($moduleGroups.Length -eq 0) {
225230
continue;
@@ -229,7 +234,7 @@ function Write-Python-Docs-Toc {
229234
foreach ($moduleGroup in $moduleGroups) {
230235
$module = $moduleGroup.Group | Where-Object { $_.Category -eq "Module" };
231236
$fileContent.Add(" - name: $($module.Module)");
232-
$fileContent.Add(" href: $($module.FileName)");
237+
$fileContent.Add(" href: $($python_reference_dir_name)/$($module.FileName)");
233238

234239
$members = $moduleGroup.Group | Where-Object { $_.Category -eq "Member" };
235240
if ($members.Length -eq 0) {
@@ -242,17 +247,17 @@ function Write-Python-Docs-Toc {
242247

243248
foreach ($member in $functions) {
244249
$fileContent.Add(" - name: $($member.Member)");
245-
$fileContent.Add(" href: $($member.FileName)");
250+
$fileContent.Add(" href: $($python_reference_dir_name)/$($member.FileName)");
246251
}
247252
foreach ($member in $classes) {
248253
$fileContent.Add(" - name: $($member.Member)");
249-
$fileContent.Add(" href: $($member.FileName)");
254+
$fileContent.Add(" href: $($python_reference_dir_name)/$($member.FileName)");
250255
}
251256

252257
}
253258
}
254259

255-
$tocPath = Join-Path -Path $python_md_destination -ChildPath toc.yml;
260+
$tocPath = Join-Path -Path $python_wrapper_dir -ChildPath toc.yml;
256261

257262
Run-Command ("Out-File -FilePath '$tocPath' -InputObject '$($fileContent | Out-String)'");
258263

scripts/generate-license-header-python.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<#
2-
Copyright (c) 2023, Salesforce, Inc.
2+
Copyright (c) 2024, Salesforce, Inc.
33
SPDX-License-Identifier: Apache-2
44
55
Licensed under the Apache License, Version 2.0 (the ""License"")
@@ -23,7 +23,7 @@ limitations under the License.
2323
#>
2424
param([string[]]$Target)
2525

26-
$license_header_python = "# Copyright (c) 2023, Salesforce, Inc.
26+
$license_header_python = "# Copyright (c) 2024, Salesforce, Inc.
2727
# SPDX-License-Identifier: Apache-2
2828
#
2929
# Licensed under the Apache License, Version 2.0 (the ""License"");

src/Documentation/api/index.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,45 @@
11
# Introduction
22

3-
This is the API Reference for the Migration SDK.
3+
Welcome to the C# API Reference for the Migration SDK.
4+
5+
## Examples to get started
6+
7+
The following code samples are for writing a simple migration app using the Migration SDK. For details on configuring and customizing the Migration SDK to your specific needs, see [Articles](~/articles/intro.md) and [Code Samples](~/samples/intro.md).
8+
9+
### [Program.cs](#tab/program-cs)
10+
11+
[!code-csharp[CS](../../../examples/Csharp.ExampleApplication/Program.cs#namespace)]
12+
13+
### [Startup code](#tab/startup-cde)
14+
15+
[!code-csharp[CS](../../../examples/Csharp.ExampleApplication/MyMigrationApplication.cs#namespace)]
16+
17+
### [Config classes](#tab/config-classes)
18+
19+
[!code-csharp[CS](../../../examples/Csharp.ExampleApplication/Config/MyMigrationApplicationOptions.cs#namespace)]
20+
21+
[!code-csharp[CS](../../../examples/Csharp.ExampleApplication/Config/EndpointOptions.cs#namespace)]
22+
23+
### [Config file](#tab/appsettings)
24+
25+
```json
26+
{
27+
"source": {
28+
"serverUrl": "http://server",
29+
"siteContentUrl": "",
30+
"accessTokenName": "my server token name",
31+
"accessToken": "my-secret-server-pat"
32+
},
33+
"destination": {
34+
"serverUrl": "https://pod.online.tableau.com",
35+
"siteContentUrl": "site-name",
36+
"accessTokenName": "my cloud token name",
37+
"accessToken": "my-secret-cloud-pat"
38+
}
39+
}
40+
```
41+
42+
---
443

544
## Suggested Reading
645

0 commit comments

Comments
 (0)