Skip to content

Commit 6c5d761

Browse files
committed
Merge branch 'dev'
2 parents edc54b4 + f716002 commit 6c5d761

File tree

173 files changed

+14059
-10586
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+14059
-10586
lines changed

Build/build.cake

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
#tool "nuget:?package=xunit.runner.console"
2-
#tool "docfx.msbuild"
31
#addin "Newtonsoft.Json"
42
#addin "Cake.DocFx"
3+
#tool "nuget:?package=docfx.console&version=2.16.0"
4+
#tool "nuget:?package=xunit.runner.console"
5+
56

67
//////////////////////////////////////////////////////////////////////
78
// ARGUMENTS
89
//////////////////////////////////////////////////////////////////////
9-
var release = "0.9.12";
10-
var suffix = "-beta";
10+
var release = "0.9.16";
11+
var suffix = "beta";
1112
var testFailOk = true;
1213
var copyright = string.Format("©{0}, Seth Juarez", DateTime.Now.Year);
1314
var target = Argument("target", "Default");
@@ -48,6 +49,8 @@ public static void UpdateProjectJsonVersion(string version, FilePath projectPath
4849
//////////////////////////////////////////////////////////////////////
4950
// TASKS
5051
//////////////////////////////////////////////////////////////////////
52+
53+
/// CLEAN
5154
Task("Clean")
5255
.Does(() =>
5356
{
@@ -60,43 +63,30 @@ Task("Version")
6063
.IsDependentOn("Clean")
6164
.Does(() =>
6265
{
63-
var assemblyInfo = new AssemblyInfoSettings
64-
{
65-
Product = "numl",
66-
Description = "numl is a machine learning library intended to ease the use of using standard modeling techniques for both prediction and clustering",
67-
Guid = "554363c6-5979-4c9a-90e6-e70af2d5cc09",
68-
Version = release,
69-
FileVersion = release,
70-
ComVisible = false,
71-
Copyright = copyright
72-
};
73-
// update assembly version
74-
Information("Updating AssembyInfo");
75-
CreateAssemblyInfo("../Src/numl/Properties/AssemblyInfo.cs", assemblyInfo);
76-
// update project.json build
77-
Information("Updating numl project.json to " + release+suffix);
78-
UpdateProjectJsonVersion(release + suffix, "../Src/numl/project.json", "version");
79-
// update test assembly project.json to match new version
80-
Information("Updating numl.Tests reference to numl in project.json to " + release+suffix);
81-
UpdateProjectJsonVersion(release + suffix, "../Src/numl.Tests/project.json", "dependencies+numl");
66+
// update csproj build
67+
Information("Updating numl project file");
68+
XmlPoke(File("../Src/numl/numl.csproj"), "//PropertyGroup/VersionPrefix", release);
69+
XmlPoke(File("../Src/numl/numl.csproj"), "//PropertyGroup/VersionSuffix", suffix);
70+
XmlPoke(File("../Src/numl/numl.csproj"), "//PropertyGroup/Copyright", copyright);
8271
});
8372

8473
Task("Restore")
8574
.IsDependentOn("Version")
8675
.Does(() =>
8776
{
88-
DotNetCoreRestore("../Src");
77+
DotNetCoreRestore("../src/numl/numl.csproj");
78+
DotNetCoreRestore("../src/numl.Tests/numl.Tests.csproj");
8979
});
9080

9181
Task("Test")
9282
.IsDependentOn("Restore")
9383
.Does(() =>
9484
{
95-
DotNetCoreTest("../Src/numl.Tests", new DotNetCoreTestSettings {
85+
DotNetCoreTest("../Src/numl.Tests/numl.Tests.csproj", new DotNetCoreTestSettings {
9686
Configuration = configuration,
97-
Framework = "netcoreapp1.0",
87+
Framework = "netcoreapp1.1",
9888
OutputDirectory = buildDir,
99-
Verbose = true
89+
Verbose = false
10090
});
10191
})
10292
.OnError(exception =>
@@ -115,15 +105,23 @@ Task("Package")
115105
OutputDirectory = packageDir
116106
};
117107

118-
DotNetCorePack("../Src/numl", settings);
108+
DotNetCorePack("../Src/numl/numl.csproj", settings);
119109
});
120110

121111
Task("Docs")
122112
.IsDependentOn("Package")
123113
.Does(() =>
124114
{
125115
// write out version in prep for doc gen
126-
UpdateProjectJsonVersion(release + suffix, "../Docs/version.json", "_appId");
116+
if(suffix.Length > 0)
117+
UpdateProjectJsonVersion(release + "-" + suffix, "../Docs/version.json", "_appId");
118+
else
119+
UpdateProjectJsonVersion(release, "../Docs/version.json", "_appId");
120+
121+
UpdateProjectJsonVersion(DateTime.Now.Year.ToString(), "../Docs/version.json", "_year");
122+
123+
124+
//DocFxMetadata("../Docs/docfx.json");
127125

128126
DocFx("../Docs/docfx.json", new DocFxSettings()
129127
{

Docs/docfx.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"src": [
55
{
66
"files": [
7-
"project.json"
7+
"numl.csproj"
88
],
99
"exclude": [
1010
"**/obj/**",
@@ -67,17 +67,6 @@
6767
]
6868
}
6969
],
70-
"overwrite": [
71-
{
72-
"files": [
73-
"apidoc/**.md"
74-
],
75-
"exclude": [
76-
"obj/**",
77-
"_site/**"
78-
]
79-
}
80-
],
8170
"dest": "_site",
8271
"globalMetadataFiles": [ "version.json" ],
8372
"fileMetadataFiles": [],

Docs/getting-started/descriptors.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,6 @@ var d = Descriptor.New()
8282
.With("PetalWidth").As(typeof(int))
8383
.Learn("Class").As(typeof(string));
8484
```
85-
86-
This style of declaration creates an empty descriptor [New( )] and adds 4 features and
87-
a label. The general style of this fluent interface is the use of the With or Learn
88-
method (which describes the name of the property that will be accessed) and the
89-
As_ method (which describes the property type along with any additional information).
90-
The With method adds a Feature to the descriptor while the Learn method overwrites the
91-
Label of the descriptor.
92-
9385
This style of declaration creates an empty descriptor [New( )] and adds 4 features and a label. The general style of this fluent interface is the use of the With or Learn method (which describes the name of the property that will be accessed) and the As_ method (which describes the property type along with any additional information). The With method adds a Feature to the descriptor while the Learn method overwrites the Label of the descriptor.
9486

9587
There are sevaral As methods available:
@@ -103,7 +95,7 @@ There are sevaral As methods available:
10395

10496
Utlimately the process of creating descriptors boils down to creating a collection
10597
of features as well as an optional label that describes the types that will participate
106-
in the learning algorithms. These all impement a conversion between the respective
98+
in the learning algorithms. These all implement a conversion between the respective
10799
types to a double. Some of these properties when expanded also could potential become
108100
multivalued as in the case of Strings, Enumerables, and DateTimes. Here is a list of
109101
available properties:

Docs/getting-started/index.md

Lines changed: 26 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,49 +14,33 @@ There are several links for installing the bits depending on your OS.
1414
## Initializing a Project
1515

1616
1. Create a folder for your project
17-
2. cd into it and `dotnet new` - this will create a basic
17+
2. cd into it and `dotnet new console` - this will create a basic
1818
console application
19-
3. Next we will edit the `project.json` file
20-
in order to get `numl` (and its dependencies) referenced
21-
in the project. Here is the what the file should look like:
22-
23-
```json
24-
{
25-
"version": "1.0.0-*",
26-
"compilationOptions": {
27-
"emitEntryPoint": true
28-
},
29-
30-
"dependencies": {
31-
"Microsoft.NETCore.Runtime": "1.0.1-beta-*",
32-
"System.IO": "4.0.11-beta-*",
33-
"System.Console": "4.0.0-*",
34-
"System.Runtime": "4.0.21-beta-*",
35-
"System.Reflection.TypeExtensions": "4.1.0-*",
36-
"System.Linq": "4.0.1-*",
37-
"System.Collections.Concurrent": "4.0.11-*",
38-
"System.Linq.Expressions": "4.0.11-*",
39-
"numl": "0.9.9-*"
40-
},
41-
42-
"frameworks": {
43-
"dnxcore50": { }
44-
}
45-
}
46-
```
47-
48-
These were lines added:
49-
50-
```json
51-
"System.Reflection.TypeExtensions": "4.1.0-*",
52-
"System.Linq": "4.0.1-*",
53-
"System.Collections.Concurrent": "4.0.11-*",
54-
"System.Linq.Expressions": "4.0.11-*",
55-
"numl": "0.9.9-*"
19+
3. Next we will add `numl` (and its dependencies) to the project
20+
via NuGet. Run `dotnet add package numl -v 0.9.9-*`. This modifies
21+
the `.csproj` project file as follows:
22+
23+
```xml
24+
<Project Sdk="Microsoft.NET.Sdk">
25+
<PropertyGroup>
26+
<OutputType>Exe</OutputType>
27+
<TargetFramework>netcoreapp1.1</TargetFramework>
28+
</PropertyGroup>
29+
<ItemGroup>
30+
<PackageReference Include="numl" Version="0.9.9-*" />
31+
</ItemGroup>
32+
</Project>```
33+
34+
These were the lines added:
35+
36+
```xml
37+
<ItemGroup>
38+
   <PackageReference Include="numl" Version="0.9.9-*">
39+
 </ItemGroup>
5640
```
5741

58-
If you are using Visual Studio Code, as soon as you make the changes to the
59-
`project.json` file it will ask you to update the dependencies.
42+
If you are using Visual Studio Code and edit the project file manually,
43+
it will ask you to update the dependencies.
6044

6145
# Writing Some Code
6246

@@ -89,8 +73,8 @@ namespace ConsoleApplication
8973

9074
# Running the code
9175

92-
1. From the comand line run `dotnet restore`
93-
2. Once the process is complete run `dotnet run`
76+
1. Run `dotnet restore` if you've made further changes to the `.csproj` file
77+
2. Run `dotnet run`
9478

9579
![numl running](..\images\firstrun.png)
9680

Docs/numl/partials/footer.tmpl.partial

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{{^_appFooter}}
99
<div class="row inner-footer">
1010
<div class="col-md-10">
11-
&copy;2016 — <a href="http://sethjuarez.com">Seth Juarez</a><br>
11+
&copy;{{_year}} — <a href="http://sethjuarez.com">Seth Juarez</a><br>
1212
<a href="https://www.nuget.org/packages/numl/">numl v{{_appId}}</a>
1313
</div>
1414
<div class="col-md-2">

Docs/version.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"_appId": "0.9.12-beta"
2+
"_appId": "0.9.16-beta",
3+
"_year": "2017"
34
}

0 commit comments

Comments
 (0)