Skip to content

Commit fb61eef

Browse files
committed
feat: 升级版本至0.3.2并移除Full包
- 将所有包版本从0.3.1升级到0.3.2 - 移除DeepSeek.OCR2.Full.win-x64包,更新文档说明其与DeepSeek.OCR2等价且不再发布 - 更新构建脚本和CI配置以排除Full包 - 优化DeepSeekOcr2Client,使用字节数组直接序列化并改进错误处理 - 添加客户端契约测试项目以验证HTTP通信 - 简化NuGet发布流程,移除Full包相关选项
1 parent 0af6ee6 commit fb61eef

17 files changed

Lines changed: 128 additions & 50 deletions

File tree

‎dotnet/DeepSeek.OCR2.ci.slnf‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"src\\DeepSeek.OCR2.Assets.Python.win-x64\\DeepSeek.OCR2.Assets.Python.win-x64.csproj",
99
"src\\DeepSeek.OCR2.Assets.Wheels.win-x64\\DeepSeek.OCR2.Assets.Wheels.win-x64.csproj",
1010
"src\\DeepSeek.OCR2.Assets.Model.DeepSeekOCR2\\DeepSeek.OCR2.Assets.Model.DeepSeekOCR2.csproj",
11-
"src\\DeepSeek.OCR2.Full.win-x64\\DeepSeek.OCR2.Full.win-x64.csproj",
1211
"samples\\DeepSeek.OCR2.SampleConsole\\DeepSeek.OCR2.SampleConsole.csproj"
1312
]
1413
}

‎dotnet/DeepSeek.OCR2.sln‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSeek.OCR2.Assets.Wheels
1717
EndProject
1818
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSeek.OCR2.Assets.Model.DeepSeekOCR2", "src\DeepSeek.OCR2.Assets.Model.DeepSeekOCR2\DeepSeek.OCR2.Assets.Model.DeepSeekOCR2.csproj", "{B1330356-1972-4B4B-AC43-0CCB43158491}"
1919
EndProject
20-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSeek.OCR2.Full.win-x64", "src\DeepSeek.OCR2.Full.win-x64\DeepSeek.OCR2.Full.win-x64.csproj", "{42AC4C91-1387-47A9-A118-6AEE8AB3FE46}"
21-
EndProject
2220
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{5D20AA90-6969-D8BD-9DCD-8634F4692FDA}"
2321
EndProject
2422
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSeek.OCR2.SampleConsole", "samples\DeepSeek.OCR2.SampleConsole\DeepSeek.OCR2.SampleConsole.csproj", "{9D9B700C-F80D-493C-B567-F431B9504996}"
@@ -27,6 +25,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2B59A5F8
2725
EndProject
2826
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSeek.OCR2.NuGetSmokeTest", "tests\DeepSeek.OCR2.NuGetSmokeTest\DeepSeek.OCR2.NuGetSmokeTest.csproj", "{E3B8B584-0C6F-4F0E-AC56-8ED3177BBF76}"
2927
EndProject
28+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSeek.OCR2.ClientContractTest", "tests\DeepSeek.OCR2.ClientContractTest\DeepSeek.OCR2.ClientContractTest.csproj", "{6F9D2B52-2D0B-4B7C-8C8C-6F22F686B669}"
29+
EndProject
3030
Global
3131
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3232
Debug|Any CPU = Debug|Any CPU
@@ -109,18 +109,6 @@ Global
109109
{B1330356-1972-4B4B-AC43-0CCB43158491}.Release|x64.Build.0 = Release|Any CPU
110110
{B1330356-1972-4B4B-AC43-0CCB43158491}.Release|x86.ActiveCfg = Release|Any CPU
111111
{B1330356-1972-4B4B-AC43-0CCB43158491}.Release|x86.Build.0 = Release|Any CPU
112-
{42AC4C91-1387-47A9-A118-6AEE8AB3FE46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
113-
{42AC4C91-1387-47A9-A118-6AEE8AB3FE46}.Debug|Any CPU.Build.0 = Debug|Any CPU
114-
{42AC4C91-1387-47A9-A118-6AEE8AB3FE46}.Debug|x64.ActiveCfg = Debug|Any CPU
115-
{42AC4C91-1387-47A9-A118-6AEE8AB3FE46}.Debug|x64.Build.0 = Debug|Any CPU
116-
{42AC4C91-1387-47A9-A118-6AEE8AB3FE46}.Debug|x86.ActiveCfg = Debug|Any CPU
117-
{42AC4C91-1387-47A9-A118-6AEE8AB3FE46}.Debug|x86.Build.0 = Debug|Any CPU
118-
{42AC4C91-1387-47A9-A118-6AEE8AB3FE46}.Release|Any CPU.ActiveCfg = Release|Any CPU
119-
{42AC4C91-1387-47A9-A118-6AEE8AB3FE46}.Release|Any CPU.Build.0 = Release|Any CPU
120-
{42AC4C91-1387-47A9-A118-6AEE8AB3FE46}.Release|x64.ActiveCfg = Release|Any CPU
121-
{42AC4C91-1387-47A9-A118-6AEE8AB3FE46}.Release|x64.Build.0 = Release|Any CPU
122-
{42AC4C91-1387-47A9-A118-6AEE8AB3FE46}.Release|x86.ActiveCfg = Release|Any CPU
123-
{42AC4C91-1387-47A9-A118-6AEE8AB3FE46}.Release|x86.Build.0 = Release|Any CPU
124112
{9D9B700C-F80D-493C-B567-F431B9504996}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
125113
{9D9B700C-F80D-493C-B567-F431B9504996}.Debug|Any CPU.Build.0 = Debug|Any CPU
126114
{9D9B700C-F80D-493C-B567-F431B9504996}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -145,6 +133,18 @@ Global
145133
{E3B8B584-0C6F-4F0E-AC56-8ED3177BBF76}.Release|x64.Build.0 = Release|Any CPU
146134
{E3B8B584-0C6F-4F0E-AC56-8ED3177BBF76}.Release|x86.ActiveCfg = Release|Any CPU
147135
{E3B8B584-0C6F-4F0E-AC56-8ED3177BBF76}.Release|x86.Build.0 = Release|Any CPU
136+
{6F9D2B52-2D0B-4B7C-8C8C-6F22F686B669}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
137+
{6F9D2B52-2D0B-4B7C-8C8C-6F22F686B669}.Debug|Any CPU.Build.0 = Debug|Any CPU
138+
{6F9D2B52-2D0B-4B7C-8C8C-6F22F686B669}.Debug|x64.ActiveCfg = Debug|Any CPU
139+
{6F9D2B52-2D0B-4B7C-8C8C-6F22F686B669}.Debug|x64.Build.0 = Debug|Any CPU
140+
{6F9D2B52-2D0B-4B7C-8C8C-6F22F686B669}.Debug|x86.ActiveCfg = Debug|Any CPU
141+
{6F9D2B52-2D0B-4B7C-8C8C-6F22F686B669}.Debug|x86.Build.0 = Debug|Any CPU
142+
{6F9D2B52-2D0B-4B7C-8C8C-6F22F686B669}.Release|Any CPU.ActiveCfg = Release|Any CPU
143+
{6F9D2B52-2D0B-4B7C-8C8C-6F22F686B669}.Release|Any CPU.Build.0 = Release|Any CPU
144+
{6F9D2B52-2D0B-4B7C-8C8C-6F22F686B669}.Release|x64.ActiveCfg = Release|Any CPU
145+
{6F9D2B52-2D0B-4B7C-8C8C-6F22F686B669}.Release|x64.Build.0 = Release|Any CPU
146+
{6F9D2B52-2D0B-4B7C-8C8C-6F22F686B669}.Release|x86.ActiveCfg = Release|Any CPU
147+
{6F9D2B52-2D0B-4B7C-8C8C-6F22F686B669}.Release|x86.Build.0 = Release|Any CPU
148148
EndGlobalSection
149149
GlobalSection(SolutionProperties) = preSolution
150150
HideSolutionNode = FALSE
@@ -156,8 +156,8 @@ Global
156156
{E3234114-F79D-47B8-8596-89022E0E7E0D} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
157157
{B2667C39-8C4B-4D0F-9E1E-7470ACB2C62D} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
158158
{B1330356-1972-4B4B-AC43-0CCB43158491} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
159-
{42AC4C91-1387-47A9-A118-6AEE8AB3FE46} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
160159
{9D9B700C-F80D-493C-B567-F431B9504996} = {5D20AA90-6969-D8BD-9DCD-8634F4692FDA}
161160
{E3B8B584-0C6F-4F0E-AC56-8ED3177BBF76} = {2B59A5F8-0E6B-4F52-A9F6-47D6D2EC5C1C}
161+
{6F9D2B52-2D0B-4B7C-8C8C-6F22F686B669} = {2B59A5F8-0E6B-4F52-A9F6-47D6D2EC5C1C}
162162
EndGlobalSection
163163
EndGlobal

‎dotnet/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ pwsh .\publish-nuget.ps1 -Version 0.3.0
109109
推荐引用方式(win-x64 / 分包资产,C1):
110110

111111
- 只引用一个包:`DeepSeek.OCR2`(meta 包,会自动拉起 `DeepSeek.OCR2.Core` + Python/wheels/模型资源包)
112+
- `DeepSeek.OCR2.Full.win-x64` 与 `DeepSeek.OCR2` 等价,已不再发布新版本
112113
- 如只要在线安装(不带离线资产):引用 `DeepSeek.OCR2.Core`
113114
- 如要手动组合:直接引用 `DeepSeek.OCR2.Core` + `DeepSeek.OCR2.Assets.*`(按需选平台/模型包)
114115

‎dotnet/pack.ps1‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ param(
33
[string]$Output = "artifacts",
44
[switch]$PrepareBundledAssets,
55
[switch]$PackBundled,
6-
[switch]$PackFull,
76
[string]$PythonVersion = "3.10.11",
87
[ValidateSet("cpu","cu118")]
98
[string]$TorchPreset = "cpu",
@@ -31,10 +30,6 @@ dotnet pack .\src\DeepSeek.OCR2.Assets.Wheels.win-x64\DeepSeek.OCR2.Assets.Wheel
3130
dotnet pack .\src\DeepSeek.OCR2.Assets.Model.DeepSeekOCR2\DeepSeek.OCR2.Assets.Model.DeepSeekOCR2.csproj -c $Configuration -o .\$Output
3231
dotnet pack .\src\DeepSeek.OCR2.Meta\DeepSeek.OCR2.Meta.csproj -c $Configuration -o .\$Output
3332

34-
if ($PackFull) {
35-
dotnet pack .\src\DeepSeek.OCR2.Full.win-x64\DeepSeek.OCR2.Full.win-x64.csproj -c $Configuration -o .\$Output
36-
}
37-
3833
}
3934
finally {
4035
Pop-Location

‎dotnet/publish-nuget.ps1‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ param(
44
[string]$ApiKey = $env:NUGET_API_KEY,
55
[switch]$UnlistInternal = $true,
66
[bool]$IncludeBundled = $true,
7-
[bool]$IncludeFull = $false,
87
[switch]$DryRun
98
)
109

@@ -31,23 +30,17 @@ if (-not $DryRun -and [string]::IsNullOrWhiteSpace($ApiKey)) {
3130
throw "ApiKey is required. Pass -ApiKey or set NUGET_API_KEY environment variable."
3231
}
3332

34-
if ($IncludeBundled -and $IncludeFull) {
35-
& .\pack.ps1 -Configuration Release -Output artifacts -PackBundled -PackFull
36-
}
37-
elseif ($IncludeBundled) {
33+
if ($IncludeBundled) {
3834
& .\pack.ps1 -Configuration Release -Output artifacts -PackBundled
3935
}
40-
elseif ($IncludeFull) {
41-
& .\pack.ps1 -Configuration Release -Output artifacts -PackFull
42-
}
4336
else {
4437
& .\pack.ps1 -Configuration Release -Output artifacts
4538
}
4639

4740
$packages = Get-ChildItem -Path ".\\artifacts\\DeepSeek.OCR2*.nupkg" | Where-Object {
4841
$_.Name -like "*.$Version.nupkg" -and
4942
($IncludeBundled -or $_.Name -notlike "DeepSeek.OCR2.Bundled.*") -and
50-
($IncludeFull -or $_.Name -notlike "DeepSeek.OCR2.Full.*")
43+
$_.Name -notlike "DeepSeek.OCR2.Full.*"
5144
}
5245

5346
foreach ($pkg in $packages) {

‎dotnet/push.ps1‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ param(
33
[string]$ApiKey,
44
[string]$Source = "https://api.nuget.org/v3/index.json",
55
[string]$PackageGlob = ".\\artifacts\\DeepSeek.OCR2*.nupkg",
6-
[bool]$IncludeBundled = $true,
7-
[bool]$IncludeFull = $true
6+
[bool]$IncludeBundled = $true
87
)
98

109
$packages = Get-ChildItem -Path $PackageGlob -ErrorAction SilentlyContinue | Where-Object {
1110
($IncludeBundled -or $_.Name -notlike "DeepSeek.OCR2.Bundled.*") -and
12-
($IncludeFull -or $_.Name -notlike "DeepSeek.OCR2.Full.*")
11+
$_.Name -notlike "DeepSeek.OCR2.Full.*"
1312
}
1413

1514
foreach ($pkg in $packages) {

‎dotnet/src/DeepSeek.OCR2.Assets.Model.DeepSeekOCR2/DeepSeek.OCR2.Assets.Model.DeepSeekOCR2.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<NoWarn>$(NoWarn);NU5128</NoWarn>
1111

1212
<PackageId>DeepSeek.OCR2.Assets.Model.DeepSeekOCR2</PackageId>
13-
<Version>0.3.1</Version>
13+
<Version>0.3.2</Version>
1414
<Title>DeepSeek OCR2 Model Snapshot</Title>
1515
<Description>Bundled DeepSeek-OCR-2 model snapshot for DeepSeek.OCR2. Copy-to-output via buildTransitive.</Description>
1616
<PackageTags>deepseek;ocr;model;offline;huggingface</PackageTags>

‎dotnet/src/DeepSeek.OCR2.Assets.Python.win-x64/DeepSeek.OCR2.Assets.Python.win-x64.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<NoWarn>$(NoWarn);NU5128</NoWarn>
1111

1212
<PackageId>DeepSeek.OCR2.Assets.Python.win-x64</PackageId>
13-
<Version>0.3.1</Version>
13+
<Version>0.3.2</Version>
1414
<Title>DeepSeek OCR2 Bundled Python Runtime (win-x64)</Title>
1515
<Description>Bundled Python runtime for DeepSeek.OCR2 (win-x64). Copy-to-output via buildTransitive.</Description>
1616
<PackageTags>deepseek;ocr;python;runtime;offline;win-x64</PackageTags>

‎dotnet/src/DeepSeek.OCR2.Assets.Wheels.win-x64/DeepSeek.OCR2.Assets.Wheels.win-x64.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<NoWarn>$(NoWarn);NU5128</NoWarn>
1111

1212
<PackageId>DeepSeek.OCR2.Assets.Wheels.win-x64</PackageId>
13-
<Version>0.3.1</Version>
13+
<Version>0.3.2</Version>
1414
<Title>DeepSeek OCR2 Bundled Wheels (win-x64)</Title>
1515
<Description>Bundled offline wheels/torch for DeepSeek.OCR2 (win-x64). Copy-to-output via buildTransitive.</Description>
1616
<PackageTags>deepseek;ocr;python;torch;wheels;offline;win-x64</PackageTags>

‎dotnet/src/DeepSeek.OCR2.Bundled/DeepSeek.OCR2.Bundled.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<NoWarn>$(NoWarn);NU5128</NoWarn>
1111

1212
<PackageId>DeepSeek.OCR2.Bundled</PackageId>
13-
<Version>0.3.1</Version>
13+
<Version>0.3.2</Version>
1414
<Title>DeepSeek OCR2 Bundled Assets</Title>
1515
<Description>Bundled python runtime + wheels/torch + model snapshot for DeepSeek.OCR2 (offline distribution).</Description>
1616
<PackageTags>deepseek;ocr;python;torch;offline;model;bundled</PackageTags>

0 commit comments

Comments
 (0)