Skip to content

Commit

Permalink
[WIP] Repairs solution from reorg
Browse files Browse the repository at this point in the history
The changes to reorganize the code a275d0b and to remove obsolete code 8f412f5 breaks the build.

Additionally the filtering done to this repo between a275d0b and 3c917a7 removes the ExtraAssemblies folder - which was a bad practice lump of binary files that should not have been committed.

This commit is the first in a series that will repair the solution build, replace antiquated DLLs with newer packages (if possible) , and if needed will add binaries as git-lfs objects (so as not to blaot repo size).

Specific changes:
- Removed build configurations we never use
- Renamed solution to AudioAnalysis.sln
- Reintroduced the MQUTeR.FSharp.Shared.fsproj as Acoustics.Shared.FSharp.proj
- Removed dynamic yaml DLL. Aim is to remove dependency completely but if not the DLL will be replaced in a later commit
- Factored out unsafe code to a dedicated project (as is considered best practice)
- Removed hard dependence on MathNet.Iridium and replaced various FFT function calls with updated calls from MathNet
- Generally recreated all FSharp projects to remove legacy references to build tools that sometimes give us problems
- Removed MEF plugin helper code since we don't use it (and it was a hardcoded library)
- Updated various MathNet SVD calls to newer API
- Updated FsCheck generators to new API
  • Loading branch information
atruskie committed Feb 2, 2018
1 parent 8f412f5 commit 864f7a4
Show file tree
Hide file tree
Showing 71 changed files with 3,348 additions and 2,611 deletions.
566 changes: 566 additions & 0 deletions AudioAnalysis.sln

Large diffs are not rendered by default.

819 changes: 0 additions & 819 deletions AudioAnalysis2012.sln

This file was deleted.

147 changes: 56 additions & 91 deletions src/AED/AED.fsproj
Original file line number Diff line number Diff line change
@@ -1,96 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\FSharp.Compiler.Tools.4.1.17\build\FSharp.Compiler.Tools.props" Condition="Exists('..\..\packages\FSharp.Compiler.Tools.4.1.17\build\FSharp.Compiler.Tools.props')" />
<Import Project="..\..\packages\FSharp.Compiler.Tools.4.1.29\build\FSharp.Compiler.Tools.props" Condition="Exists('..\..\packages\FSharp.Compiler.Tools.4.1.29\build\FSharp.Compiler.Tools.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{993980a0-8d06-4635-8296-40e9fff9c301}</ProjectGuid>
<ProjectGuid>d5dfd3d5-ef64-4f5b-867f-192daa7594fc</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>SensorImages</RootNamespace>
<RootNamespace>AED.New</RootNamespace>
<AssemblyName>AED</AssemblyName>
<UseStandardResourceNames>true</UseStandardResourceNames>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Name>SensorImages</Name>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\EcoSounds\</SolutionDir>
<RestorePackages>true</RestorePackages>
<TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
<TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Name>AED</Name>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<Tailcalls>false</Tailcalls>
<OutputPath>bin\$(Configuration)\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\Debug\AED.XML</DocumentationFile>
<Tailcalls>false</Tailcalls>
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<Tailcalls>true</Tailcalls>
<OutputPath>bin\$(Configuration)\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>3</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>true</Optimize>
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'SilverlightOnly' ">
<Optimize>true</Optimize>
<OutputPath>bin\SilverlightOnly\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AudioAnalysis|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\Debug\AED.XML</DocumentationFile>
<OutputPath>bin\AudioAnalysis\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Core|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\Debug\AED.XML</DocumentationFile>
<OutputPath>bin\Core\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">10</MinimumVisualStudioVersion>
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<FSharpTargetsPath>$(FscToolPath)\Microsoft.FSharp.Targets</FSharpTargetsPath>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
</PropertyGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '11.0'">
<PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets') ">
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets') ">
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</Otherwise>
</Choose>
<Import Project="$(FSharpTargetsPath)" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
<Error Condition="!Exists('..\..\packages\FSharp.Compiler.Tools.4.1.29\build\FSharp.Compiler.Tools.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\FSharp.Compiler.Tools.4.1.29\build\FSharp.Compiler.Tools.props'))" />
</Target>
<ItemGroup>
<Compile Include="AssemblyInfo.fs" />
<Compile Include="Util.fs" />
<Compile Include="Matlab.fs" />
<Compile Include="GetAcousticEvents.fs" />
<Compile Include="Default.fs" />
<Compile Include="AcousticEventDetection.fs" />
<Compile Include="EventPatternRecog.fs" />
<Compile Include="SpectralPeakTrack.fs" />
<None Include="packages.config" />
<None Include="app.config" />
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\TowseyLibrary\TowseyLibrary.csproj">
<ProjectReference Include="..\Acoustics.Shared.FSharp\Acoustics.Shared.FSharp.fsproj">
<Name>Acoustics.Shared.FSharp</Name>
<Project>{0a247cb0-779d-4e71-bd86-d3f1d233b7e9}</Project>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\TowseyLibrary\TowseyLibrary.csproj">
<Name>TowseyLibrary</Name>
<Project>{7c6831fd-f60c-4f7b-8e6a-35e850174411}</Project>
<Private>True</Private>
Expand All @@ -99,20 +87,16 @@
<HintPath>..\..\packages\FSharp.Core.4.2.3\lib\net45\FSharp.Core.dll</HintPath>
</Reference>
<Reference Include="FSharp.PowerPack">
<HintPath>..\..\packages\FSPowerPack.Core.Community.3.0.0.0\Lib\Net40\FSharp.PowerPack.dll</HintPath>
<Private>True</Private>
<HintPath>..\..\packages\FSPowerPack.Core.Community.3.0.0.0\lib\Net40\FSharp.PowerPack.dll</HintPath>
</Reference>
<Reference Include="FSharp.PowerPack.Linq">
<HintPath>..\..\packages\FSPowerPack.Linq.Community.3.0.0.0\Lib\Net40\FSharp.PowerPack.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FSharp.PowerPack.Metadata">
<HintPath>..\..\packages\FSPowerPack.Metadata.Community.3.0.0.0\Lib\Net40\FSharp.PowerPack.Metadata.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FSharp.PowerPack.Parallel.Seq">
<HintPath>..\..\packages\FSPowerPack.Parallel.Seq.Community.3.0.0.0\Lib\Net40\FSharp.PowerPack.Parallel.Seq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Threading.Tasks">
<HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
Expand All @@ -125,43 +109,24 @@
</Reference>
<Reference Include="mscorlib" />
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
<HintPath>..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<ProjectReference Include="..\..\FELT\Shared\MQUTeR.FSharp.Shared.fsproj">
<Name>MQUTeR.FSharp.Shared</Name>
<Project>{9a0fbe53-07fd-4dcf-97ec-7812badd89d4}</Project>
<Private>True</Private>
</ProjectReference>
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO">
<HintPath>..\..\packages\Microsoft.Bcl.1.1.10\lib\net40\System.IO.dll</HintPath>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime">
<HintPath>..\..\packages\Microsoft.Bcl.1.1.10\lib\net40\System.Runtime.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks">
<HintPath>..\..\packages\Microsoft.Bcl.1.1.10\lib\net40\System.Threading.Tasks.dll</HintPath>
<Reference Include="System.ValueTuple">
<HintPath>..\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\FSharp.Compiler.Tools.4.1.17\build\FSharp.Compiler.Tools.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\FSharp.Compiler.Tools.4.1.17\build\FSharp.Compiler.Tools.props'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
</Target>
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
41 changes: 41 additions & 0 deletions src/AED/AssemblyInfo.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
namespace AED.New.AssemblyInfo

open System.Reflection
open System.Runtime.CompilerServices
open System.Runtime.InteropServices

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[<assembly: AssemblyTitle("AED.New")>]
[<assembly: AssemblyDescription("")>]
[<assembly: AssemblyConfiguration("")>]
[<assembly: AssemblyCompany("")>]
[<assembly: AssemblyProduct("AED.New")>]
[<assembly: AssemblyCopyright("Copyright © 2018")>]
[<assembly: AssemblyTrademark("")>]
[<assembly: AssemblyCulture("")>]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[<assembly: ComVisible(false)>]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[<assembly: Guid("d5dfd3d5-ef64-4f5b-867f-192daa7594fc")>]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [<assembly: AssemblyVersion("1.0.*")>]
[<assembly: AssemblyVersion("1.0.0.0")>]
[<assembly: AssemblyFileVersion("1.0.0.0")>]

do
()
2 changes: 1 addition & 1 deletion src/AED/EventPatternRecog.fs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ module EprInternals =
let (cs, bls) = centroidsBottomLefts st sf ttd tfr xl yl rs // pixels
let g candidateCentroid candidateBottomLeft=
let indexOfTemplate = indexMinMap (euclidianDist candidateCentroid) tcs
overlap (Seq.nth indexOfTemplate tbls) (Seq.nth indexOfTemplate tcs) candidateBottomLeft candidateCentroid
overlap (Seq.item indexOfTemplate tbls) (Seq.item indexOfTemplate tcs) candidateBottomLeft candidateCentroid
Seq.map2 g cs bls |> Seq.sum

let (saes, cs) = candidates tb ttd tfr aes // cs are the groups of acoustic events that are candiates for template matching
Expand Down
46 changes: 0 additions & 46 deletions src/AED/app.config

This file was deleted.

24 changes: 12 additions & 12 deletions src/AED/packages.config
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FSharp.Compiler.Tools" version="4.1.17" targetFramework="net40" />
<package id="FSharp.Core" version="4.2.3" targetFramework="net452" />
<package id="FSPowerPack.Community" version="3.0.0.0" targetFramework="net40" />
<package id="FSPowerPack.Core.Community" version="3.0.0.0" targetFramework="net40" />
<package id="FSPowerPack.Linq.Community" version="3.0.0.0" targetFramework="net40" />
<package id="FSPowerPack.Metadata.Community" version="3.0.0.0" targetFramework="net40" />
<package id="FSPowerPack.Parallel.Seq.Community" version="3.0.0.0" targetFramework="net40" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net40" requireReinstallation="true" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net40" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net40" requireReinstallation="true" />
<package id="StyleCop.Analyzers" version="1.1.0-beta004" targetFramework="net40" developmentDependency="true" />
<package id="FSharp.Compiler.Tools" version="4.1.29" targetFramework="net462" />
<package id="FSharp.Core" version="4.2.3" targetFramework="net461" />
<package id="FSPowerPack.Community" version="3.0.0.0" targetFramework="net461" />
<package id="FSPowerPack.Core.Community" version="3.0.0.0" targetFramework="net461" />
<package id="FSPowerPack.Linq.Community" version="3.0.0.0" targetFramework="net461" />
<package id="FSPowerPack.Metadata.Community" version="3.0.0.0" targetFramework="net461" />
<package id="FSPowerPack.Parallel.Seq.Community" version="3.0.0.0" targetFramework="net461" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net461" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net461" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net461" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net461" />
<package id="StyleCop.Analyzers" version="1.1.0-beta004" targetFramework="net461" developmentDependency="true" />
</packages>
Loading

0 comments on commit 864f7a4

Please sign in to comment.