-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an entry method for build content description models (functional templates). Split TemplateManifest apart from FunctionalTemplate. Left pseudo-code for various improvments. In particular the content description signatures can be calculated in Analyze (i.e. the parallel stage) which will speed up computation.
- Loading branch information
Showing
7 changed files
with
171 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace AnalysisPrograms.ContentDescription | ||
{ | ||
using System.ComponentModel.DataAnnotations; | ||
using System.IO; | ||
using AnalysisBase; | ||
using AnalysisPrograms.Production; | ||
using AnalysisPrograms.Production.Arguments; | ||
using AnalysisPrograms.Production.Validation; | ||
using AudioAnalysisTools.ContentDescriptionTools; | ||
using McMaster.Extensions.CommandLineUtils; | ||
|
||
public partial class BuildModel | ||
{ | ||
public const string CommandName = "BuildContentDescriptionModel"; | ||
|
||
[Command( | ||
CommandName, | ||
Description = "TODO")] | ||
public class Arguments: SubCommandBase | ||
{ | ||
[Argument( | ||
0, | ||
Description = "TODO")] | ||
[Required] | ||
[FileExists] | ||
[LegalFilePath] | ||
public FileInfo TemplateManifest { get; set; } | ||
|
||
[Argument( | ||
1, | ||
Description = "TODO")] | ||
[Required] | ||
[FileExists] | ||
[LegalFilePath] | ||
public FileInfo TemplateDefinitions { get; set; } | ||
|
||
[Argument( | ||
2, | ||
Description = "A directory to write output to")] | ||
[Required] | ||
[DirectoryExistsOrCreate(createIfNotExists: true)] | ||
[LegalFilePath] | ||
public virtual DirectoryInfo Output { get; set; } | ||
|
||
public override Task<int> Execute(CommandLineApplication app) | ||
{ | ||
BuildModel.Execute(this); | ||
|
||
return this.Ok(); | ||
} | ||
} | ||
|
||
public static void Execute(Arguments arguments) | ||
{ | ||
// TODO: inline CreateNewFileOfTemplateDefinitions to this method. | ||
TemplateManifest.CreateNewFileOfTemplateDefinitions(arguments.TemplateManifest, | ||
arguments.TemplateDefinitions); | ||
|
||
LoggedConsole.WriteSuccessLine("Completed"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.