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

Release 3.0.0 #16

Merged
merged 4 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[*.{cs,vb}]
# File header

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
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

#### Naming styles ####

Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,4 @@ UpgradeLog.htm
/src/Documentation/_python
/src/Python/Documentation/generated
/tests/Python.TestApplication/manifest.json
/.git2gus
/src/Python/scripts/publish-package.ps1

# Public repo ignores
.github/pull_request_template.md
5 changes: 3 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Comment line immediately above ownership line is reserved for related other information. Please be careful while editing.
#ECCN:Open Source 5D002
#GUSINFO: gus_team_id,product_tag_id
#GUSINFO: a00EE00000glzJCYAY,a1aEE000000JtTpYAK
* @tableau/migration
8 changes: 4 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<Version>2.1.1</Version>
<Authors>Tableau Software, LLC</Authors>
<Company>Tableau Software, LLC</Company>
<Copyright>Copyright (c) 2024, Tableau Software, LLC and its licensors</Copyright>
<Version>3.0.0</Version>
<Authors>Salesforce, Inc.</Authors>
<Company>Salesforce, Inc.</Company>
<Copyright>Copyright (c) 2024, Salesforce, Inc. and its licensors</Copyright>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<!-- Don't warn on ConfigureAwait on console application, Don't require license headers for sample code -->
<NoWarn>CA2007,IDE0073</NoWarn>
<UserSecretsId>7d7631f1-dc4a-49de-89d5-a194544705c1</UserSecretsId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<!-- Don't warn on ConfigureAwait on console application, Don't require license headers for sample code -->
<NoWarn>CA2007,IDE0073</NoWarn>
</PropertyGroup>
Expand Down
31 changes: 18 additions & 13 deletions scripts/generate-docs.ps1
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<#
Copyright (c) 2023, Salesforce, Inc.
Copyright (c) 2024, Salesforce, Inc.
SPDX-License-Identifier: Apache-2

Licensed under the Apache License, Version 2.0 (the ""License"")
Licensed 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,
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.
Expand Down Expand Up @@ -43,6 +43,14 @@ $main_docs_dir = Join-Path $root_dir "src/Documentation"
# Directory that sphinx generates automatic documentation to.
$sphinx_output_dir = Join-Path $python_dir "Documentation/generated"

# Directory for Python wrapper files. Includes an index file and a directory for autogenerated files.
$python_wrapper_dir = Join-Path $main_docs_dir "python_wrapper";

$python_reference_dir_name = "reference";

# Directory where DocFX looks for markdown files to render into our 'Python Wrapper' section.
$python_md_destination = Join-Path $python_wrapper_dir $python_reference_dir_name;

function Run-Command {
param([string]$Cmd)
Write-Host "Executing command";
Expand Down Expand Up @@ -149,10 +157,7 @@ function Copy-Python-Docs {
#>
# Directory to which sphinx write generated markdown files.
$sphinx_generated_files_dir = Join-Path $sphinx_output_dir "markdown/generated/*";

# Directory where DocFX looks for markdown files to render into our 'Python Wrapper' section.
$python_md_destination = Join-Path $main_docs_dir "python_wrapper";


Write-Host-With-Timestamp "Copying python docs to final destination.";
Run-Command ("Clear-Directory -Path $python_md_destination");
Run-Command ("Copy-Item -Force -Recurse $sphinx_generated_files_dir -Destination $python_md_destination");
Expand All @@ -166,7 +171,6 @@ function Write-Python-Docs-Toc {
.SYNOPSIS
Generate a toc.yml file (table of contents for DocFX) from the python doc markdown files.
#>
$python_md_destination = Join-Path $main_docs_dir "python_wrapper";
Write-Host-With-Timestamp "Generating toc.yml for Python auto-generated doc files ($python_md_destination).";

class DocFileInfo {
Expand Down Expand Up @@ -212,14 +216,15 @@ function Write-Python-Docs-Toc {

# Build the yaml file from DocFileInfo list
$fileContent = New-Object Collections.Generic.List[string];
$fileContent.Add("### YamlMime:TableOfContent");
$fileContent.Add("items:");
$packages = $docFiles | Where-Object { $_.Category -eq "Package" }
if ($packages.Length -eq 0) {
return;
}
foreach ($package in $packages) {
$fileContent.Add("- name: $($package.Package)");
$fileContent.Add(" href: $($package.FileName)");
$fileContent.Add(" href: $($python_reference_dir_name)/$($package.FileName)");
$moduleGroups = $docFiles | Where-Object { $_.Category -ne "Package" -and $_.Package -eq $package.Package } | Group-Object -Property Package, Module;
if ($moduleGroups.Length -eq 0) {
continue;
Expand All @@ -229,7 +234,7 @@ function Write-Python-Docs-Toc {
foreach ($moduleGroup in $moduleGroups) {
$module = $moduleGroup.Group | Where-Object { $_.Category -eq "Module" };
$fileContent.Add(" - name: $($module.Module)");
$fileContent.Add(" href: $($module.FileName)");
$fileContent.Add(" href: $($python_reference_dir_name)/$($module.FileName)");

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

foreach ($member in $functions) {
$fileContent.Add(" - name: $($member.Member)");
$fileContent.Add(" href: $($member.FileName)");
$fileContent.Add(" href: $($python_reference_dir_name)/$($member.FileName)");
}
foreach ($member in $classes) {
$fileContent.Add(" - name: $($member.Member)");
$fileContent.Add(" href: $($member.FileName)");
$fileContent.Add(" href: $($python_reference_dir_name)/$($member.FileName)");
}

}
}

$tocPath = Join-Path -Path $python_md_destination -ChildPath toc.yml;
$tocPath = Join-Path -Path $python_wrapper_dir -ChildPath toc.yml;

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

Expand Down
4 changes: 2 additions & 2 deletions scripts/generate-license-header-python.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<#
Copyright (c) 2023, Salesforce, Inc.
Copyright (c) 2024, Salesforce, Inc.
SPDX-License-Identifier: Apache-2

Licensed under the Apache License, Version 2.0 (the ""License"")
Expand All @@ -23,7 +23,7 @@ limitations under the License.
#>
param([string[]]$Target)

$license_header_python = "# Copyright (c) 2023, Salesforce, Inc.
$license_header_python = "# Copyright (c) 2024, Salesforce, Inc.
# SPDX-License-Identifier: Apache-2
#
# Licensed under the Apache License, Version 2.0 (the ""License"");
Expand Down
41 changes: 40 additions & 1 deletion src/Documentation/api/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,45 @@
# Introduction

This is the API Reference for the Migration SDK.
Welcome to the C# API Reference for the Migration SDK.

## Examples to get started

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).

### [Program.cs](#tab/program-cs)

[!code-csharp[CS](../../../examples/Csharp.ExampleApplication/Program.cs#namespace)]

### [Startup code](#tab/startup-cde)

[!code-csharp[CS](../../../examples/Csharp.ExampleApplication/MyMigrationApplication.cs#namespace)]

### [Config classes](#tab/config-classes)

[!code-csharp[CS](../../../examples/Csharp.ExampleApplication/Config/MyMigrationApplicationOptions.cs#namespace)]

[!code-csharp[CS](../../../examples/Csharp.ExampleApplication/Config/EndpointOptions.cs#namespace)]

### [Config file](#tab/appsettings)

```json
{
"source": {
"serverUrl": "http://server",
"siteContentUrl": "",
"accessTokenName": "my server token name",
"accessToken": "my-secret-server-pat"
},
"destination": {
"serverUrl": "https://pod.online.tableau.com",
"siteContentUrl": "site-name",
"accessTokenName": "my cloud token name",
"accessToken": "my-secret-cloud-pat"
}
}
```

---

## Suggested Reading

Expand Down
Loading
Loading