Skip to content

Commit

Permalink
Fix typed clone methods and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
k-ujihara committed Feb 4, 2021
1 parent f1e9572 commit 77761b5
Show file tree
Hide file tree
Showing 152 changed files with 1,070 additions and 923 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,5 @@ ModelManifest.xml
!NCDK/x86/libinchi.dll
!NCDK/x64/libinchi.dll
!BuildAll.bat
Test.sln
Test/
41 changes: 30 additions & 11 deletions BuildAll.bat
Original file line number Diff line number Diff line change
@@ -1,56 +1,75 @@
pushd NCDK
call :BuildProject NCDK
if errorlevel 1 goto :ERROREND
popd
pushd NCDK.Math
dotnet add package MathNet.Numerics.Signed
dotnet restore
call :BuildProject NCDK yes
call :BuildProject NCDK.Math
if errorlevel 1 goto :ERROREND
popd
pushd NCDK.Tests
call :BuildNeGet NCDK
if errorlevel 1 goto :ERROREND
pushd NCDKTests
call :BuildProject NCDKTests
if errorlevel 1 goto :ERROREND
popd

pushd NCDK.RDF
dotnet add package dotNetRDF
dotnet restore
call :BuildProject NCDK.RDF
if errorlevel 1 goto :ERROREND
popd
pushd NCDK.RDFTests
call :BuildProject NCDK.RDFTests
if errorlevel 1 goto :ERROREND
popd

pushd NCDK.Legacy
call :BuildProject NCDK.Legacy
if errorlevel 1 goto :ERROREND
popd
pushd NCDK.LegacyTests
call :BuildProject NCDK.LegacyTests
if errorlevel 1 goto :ERROREND
popd

pushd NCDK.Display
call :BuildProject NCDK.Display yes
call :BuildProject NCDK.Display
if errorlevel 1 goto :ERROREND
popd
call :BuildNeGet NCDK.Display
if errorlevel 1 goto :ERROREND
pushd NCDK.DisplayTests
call :BuildProject NCDK.DisplayTests
if errorlevel 1 goto :ERROREND
popd

goto END
goto :END

:BuildProject

set ProjectName=%1
set NuGetOption=%2
if "%ProjectName%" == "" exit 1
if "%NuGetOption%" == "yes" set NuGetOption=%1
MSBuild "%ProjectName%.csproj" /t:Build /p:Configuration=Release
if errorlevel 1 exit /b 1
set ProjectName=
exit /b

:BuildNeGet
set NuGetOption=%1
if "%NuGetOption%" == "" goto SkipNuGet
nuget pack "%NuGetOption%.nuspec" -Prop Configuration=Release -IncludeReferencedProjects
if errorlevel 1 exit /b 1
if "%MyNuGetDir%" neq "" (
xcopy /D /Y "*.nupkg" "%MyNuGetDir%"
del /Q "*.nupkg"
)
:SkipNuGet

set ProjectName=
set NuGetOption=

exit /b

:ERROREND

exit /b 1

:END
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void Main()

double minMass = 133.003;
double maxMass = 133.005;
MolecularFormulaGenerator mfg = new MolecularFormulaGenerator(builder, minMass, maxMass, mfRange);
MolecularFormulaGenerator mfg = new MolecularFormulaGenerator(minMass, maxMass, mfRange);
IMolecularFormulaSet mfSet = mfg.GetAllFormulas();
#endregion
}
Expand Down
3 changes: 1 addition & 2 deletions ExampleCodes/Formula/MolecularFormulaGenerator_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ public void Main()
mfRange.AddIsotope(p, 0, 10);
mfRange.AddIsotope(s, 0, 10);

var builder = Silent.ChemObjectBuilder.Instance;
double minMass = 133.003;
double maxMass = 133.005;
MolecularFormulaGenerator mfg = new MolecularFormulaGenerator(builder, minMass, maxMass, mfRange);
MolecularFormulaGenerator mfg = new MolecularFormulaGenerator(minMass, maxMass, mfRange);
IMolecularFormulaSet mfSet = mfg.GetAllFormulas();
#endregion
}
Expand Down
20 changes: 10 additions & 10 deletions MolViewer/MolViewer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand All @@ -27,7 +28,6 @@
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
Expand Down Expand Up @@ -62,24 +62,24 @@
<StartupObject>NCDK.MolViewer.App</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="CommonServiceLocator, Version=2.0.5.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.2.0.5\lib\net46\CommonServiceLocator.dll</HintPath>
<Reference Include="CommonServiceLocator, Version=2.0.6.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.2.0.6\lib\net46\CommonServiceLocator.dll</HintPath>
</Reference>
<Reference Include="Prism, Version=7.2.0.1422, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
<HintPath>..\packages\Prism.Core.7.2.0.1422\lib\net45\Prism.dll</HintPath>
<Reference Include="Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Xaml.Behaviors.Wpf.1.1.31\lib\net45\Microsoft.Xaml.Behaviors.dll</HintPath>
</Reference>
<Reference Include="Prism.Wpf, Version=7.2.0.1422, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
<HintPath>..\packages\Prism.Wpf.7.2.0.1422\lib\net45\Prism.Wpf.dll</HintPath>
<Reference Include="Prism, Version=8.0.0.1909, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
<HintPath>..\packages\Prism.Core.8.0.0.1909\lib\net45\Prism.dll</HintPath>
</Reference>
<Reference Include="Prism.Wpf, Version=8.0.0.1909, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
<HintPath>..\packages\Prism.Wpf.8.0.0.1909\lib\net461\Prism.Wpf.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Prism.Wpf.7.2.0.1422\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Presentation" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
Expand Down
6 changes: 3 additions & 3 deletions MolViewer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[assembly: AssemblyMetadata("ProjectUrl", "https://github.com/kazuyaujihara/NCDK")]
[assembly: AssemblyMetadata("LicenseUrl", "https://github.com/kazuyaujihara/NCDK/blob/master/LICENSE")]
[assembly: AssemblyCompany("Kazuya Ujihara")]
[assembly: AssemblyCopyright("Copyright © 2016-2019 Kazuya Ujihara")]
[assembly: AssemblyCopyright("Copyright © 2016-2021 Kazuya Ujihara")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("1.5.6.0")]
[assembly: AssemblyFileVersion("1.5.6.0")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
7 changes: 4 additions & 3 deletions MolViewer/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonServiceLocator" version="2.0.5" targetFramework="net461" />
<package id="Prism.Core" version="7.2.0.1422" targetFramework="net461" />
<package id="Prism.Wpf" version="7.2.0.1422" targetFramework="net461" />
<package id="CommonServiceLocator" version="2.0.6" targetFramework="net461" />
<package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.31" targetFramework="net461" />
<package id="Prism.Core" version="8.0.0.1909" targetFramework="net461" />
<package id="Prism.Wpf" version="8.0.0.1909" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
</packages>
12 changes: 6 additions & 6 deletions NCDK.Display/NCDK.Display.nuspec → NCDK.Display.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>NCDK.Display</id>
<version>1.5.6</version>
<version>1.6.0</version>
<title>NCDK.Display: Depiction module of NCDK</title>
<authors>Kazuya Ujihara</authors>
<owners>kazuya</owners>
<licenseUrl>https://github.com/kazuyaujihara/NCDK/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/kazuyaujihara/NCDK</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Depiction module of NCDK</description>
<releaseNotes>This release is based on https://github.com/cdk/cdk/tree/c76443e0a69a4110c6a0fe65704abccce8a435ff snapshot.</releaseNotes>
<copyright>Copyright © 2016-2019 Kazuya Ujihara</copyright>
<releaseNotes>This release is based on https://github.com/cdk/cdk/tree/a027f6689a34d9ede3bb9befad2d0f1c5b2bb711 snapshot.</releaseNotes>
<copyright>Copyright © 2016-2021 Kazuya Ujihara</copyright>
<tags>cdk cheminformatics chemistry toolkit</tags>
<frameworkAssemblies>
<frameworkAssembly assemblyName="PresentationCore" />
Expand All @@ -20,11 +20,11 @@
<frameworkAssembly assemblyName="WindowsBase" />
</frameworkAssemblies>
<dependencies>
<dependency id="NCDK" version="1.5.6" />
<dependency id="NCDK" version="1.6.0" />
</dependencies>
</metadata>
<files>
<file src="bin/Release/net461/NCDK.Display.dll" target="lib/net461" />
<file src="bin/Release/net461/NCDK.Display.xml" target="lib/net461" />
<file src="NCDK.Display/bin/Release/net461/NCDK.Display.dll" target="lib/net461" />
<file src="NCDK.Display/bin/Release/net461/NCDK.Display.xml" target="lib/net461" />
</files>
</package>
8 changes: 6 additions & 2 deletions NCDK.Display.sln
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2024
# Visual Studio Version 16
VisualStudioVersion = 16.0.30907.101
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3ED0556C-42B8-4FEF-9606-B0474A2E69D2}"
ProjectSection(SolutionItems) = preProject
BuildAll.bat = BuildAll.bat
ChemObjectConfig.ttinclude = ChemObjectConfig.ttinclude
Config.ttinclude = Config.ttinclude
IncludeExamples.ttinclude = IncludeExamples.ttinclude
NCDK.Display.nuspec = NCDK.Display.nuspec
NCDK.nuspec = NCDK.nuspec
NCDK.targets = NCDK.targets
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NCDK", "NCDK\NCDK.csproj", "{B0B5EACF-5F39-42D0-BACD-1FF559CCC8B2}"
Expand Down
8 changes: 4 additions & 4 deletions NCDK.DisplayTests/NCDK.DisplayTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="Moq" Version="4.13.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="Moq" Version="4.16.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 7 additions & 8 deletions NCDK.Legacy/NCDK.Legacy.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
<Version>1.5.7</Version>
<TargetFrameworks>netcoreapp3.1;netstandard2.0</TargetFrameworks>
<Version>1.6.0</Version>
<Authors>Kazuya Ujihara</Authors>
<Product>NCDK</Product>
<Description>The legacy classes of NCDK.</Description>
<Copyright>Copyright © 2019 Kazuya Ujihara</Copyright>
<PackageLicenseUrl>https://github.com/kazuyaujihara/NCDK/blob/master/LICENSE</PackageLicenseUrl>
<Copyright>Copyright © 2019-2021 Kazuya Ujihara</Copyright>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageProjectUrl>https://github.com/kazuyaujihara/NCDK</PackageProjectUrl>
<RepositoryUrl>https://github.com/kazuyaujihara/NCDK</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>ncdk.snk</AssemblyOriginatorKeyFile>
<RootNamespace>NCDK</RootNamespace>
<AssemblyVersion>1.5.6.0</AssemblyVersion>
<FileVersion>1.5.6.0</FileVersion>
<PackageReleaseNotes>This release is based on [cdk 2019-11-27](https://github.com/cdk/cdk/tree/c76443e0a69a4110c6a0fe65704abccce8a435ff) snapshot.</PackageReleaseNotes>
<PackageReleaseNotes>This release is based on [cdk 2021-01-31](https://github.com/cdk/cdk/tree/a027f6689a34d9ede3bb9befad2d0f1c5b2bb711f) snapshot.</PackageReleaseNotes>
<PackageLicenseExpression>LGPL 2.1</PackageLicenseExpression>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702;0612;1573;1591</NoWarn>
<DocumentationFile>bin\Release\net461\NCDK.Legacy.xml</DocumentationFile>
<DocumentationFile>bin\Release\$(TargetFramework)\NCDK.Legacy.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
18 changes: 14 additions & 4 deletions NCDK.Math/NCDK.Math.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;netstandard2.0</TargetFrameworks>
<RootNamespace>NCDK</RootNamespace>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>ncdk.snk</AssemblyOriginatorKeyFile>
<Version>1.6.0</Version>
<Copyright>Copyright © 2016-2021 Kazuya Ujihara</Copyright>
<PackageProjectUrl></PackageProjectUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>cdk cheminformatics chemistry toolkit</PackageTags>
<RepositoryUrl>https://github.com/kazuyaujihara/NCDK</RepositoryUrl>
<Product>NCDK.Math: Math functions of NCDK</Product>
<PackageLicenseExpression>LPGL 2.1</PackageLicenseExpression>
<Description>Math package for NCDK.</Description>
<PackageReleaseNotes>This release is based on [cdk 2021-01-31](https://github.com/cdk/cdk/tree/a027f6689a34d9ede3bb9befad2d0f1c5b2bb711f) snapshot.</PackageReleaseNotes>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand All @@ -15,12 +25,12 @@
<NoWarn>1701;1702;0162,0164,0219,0612,0618,0672,0809,1591,3021,1573</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net461|AnyCPU'">
<DocumentationFile>bin\Release\net461\NCDK.Math.xml</DocumentationFile>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\Release\$(TargetFramework)\NCDK.Math.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MathNet.Numerics.Signed" Version="4.9.0" />
<PackageReference Include="MathNet.Numerics.Signed" Version="4.15.0" />
</ItemGroup>

<ItemGroup>
Expand Down
25 changes: 10 additions & 15 deletions NCDK.RDF/NCDK.RDF.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>

<AssemblyVersion>1.5.6.0</AssemblyVersion>
<FileVersion>1.5.6.0</FileVersion>
<Version>1.5.7</Version>
<Copyright>Copyright © 2019 Kazuya Ujihara</Copyright>
<Version>1.6.0</Version>
<Copyright>Copyright © 2019-2021 Kazuya Ujihara</Copyright>

<PackageId>NCDK.RDF</PackageId>
<Product>NCDK.RDF: RDF package for NCDK</Product>
<Description>RDF package for NCDK.</Description>

<PackageTags>cdk cheminformatics chemistry toolkit</PackageTags>
<PackageReleaseNotes>This release is based on [cdk 2019-11-27](https://github.com/cdk/cdk/tree/c76443e0a69a4110c6a0fe65704abccce8a435ff) snapshot.</PackageReleaseNotes>
<PackageReleaseNotes>This release is based on [cdk 2021-01-31](https://github.com/cdk/cdk/tree/a027f6689a34d9ede3bb9befad2d0f1c5b2bb711f) snapshot.</PackageReleaseNotes>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>

<Authors>Kazuya Ujihara</Authors>
Expand All @@ -24,7 +22,8 @@
<AssemblyOriginatorKeyFile>ncdk.snk</AssemblyOriginatorKeyFile>
<RootNamespace>NCDK</RootNamespace>
<PackageProjectUrl>https://github.com/kazuyaujihara/NCDK</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/kazuyaujihara/NCDK/blob/master/LICENSE</PackageLicenseUrl>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageLicenseExpression>LPGL 2.1</PackageLicenseExpression>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand All @@ -37,20 +36,16 @@
<NoWarn>1701;1702;0162,0164,0219,0612,0618,0672,0809,1591,3021,1573</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net461|AnyCPU'">
<DocumentationFile>bin\Release\net461\NCDK.RDF.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard2.0|AnyCPU'">
<DocumentationFile>bin\Release\netstandard2.0\NCDK.RDF.xml</DocumentationFile>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\Release\$(TargetFramework)\NCDK.RDF.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\NCDK\Properties\InternalVisibles..cs" Link="Properties\InternalVisibles..cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="dotNetRDF" Version="2.2.0" />
<PackageReference Include="dotNetRDF" Version="2.6.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 77761b5

Please sign in to comment.