Skip to content

Commit dc07d37

Browse files
author
flip phillips
committed
typos and optimizing Property stuff
1 parent 9f82633 commit dc07d37

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

FPTools/Introspection.wl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ Spelunk[s_String] := CellPrint[fancydefinition[#] &@ToExpression[s, InputForm, U
5757
SetAttributes[{defboxes, fancydefinition, Spelunk}, HoldFirst]
5858

5959

60-
(* smart property display *)
6160
PropertiesInfo[thing_] := Module[{props,not},
6261
(* not = Pick[thing["Properties"],
6362
Quiet@Check[thing[#], Missing[#]] & /@
@@ -66,7 +65,8 @@ PropertiesInfo[thing_] := Module[{props,not},
6665
*)
6766
props = thing["Properties"];
6867
not = Pick[props,
69-
MissingQ//@Check[thing[#], Missing[#]] & /@ props];
68+
Quiet[(MissingQ[#]||Head[#]==thing)&
69+
//@Check[thing[#], Missing[#]] & /@ props]];
7070

7171
<|"Available"->Complement[props, not],"Missing"->not|>]
7272

FPTools/PacletInfo.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
(* { "Documentation", MainPage -> "Guides/FPTools", Language -> "English"}, *)
1212
{ "Kernel",
1313
Symbols -> {
14-
"FPTools`Spelunk","FPTools`ProptertiesInfo","FPTools`PropertiesDataset",
14+
"FPTools`Spelunk","FPTools`PropertiesInfo","FPTools`PropertiesDataset",
1515

1616
"FPTools`EntityPropertiesDataset","FPTools`ConceptBroaden","FPTools`ConceptDistance",
1717

FPTools/Usage.wl

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
1+
(* ::Package:: *)
2+
13
(* Introspection *)
24
Spelunk::usage = "Spelunk[symbol] will discover the definition of symbol. Underlined symbols in the output are clickable.";
35
PropertiesInfo::usage = "PropertiesInfo[symbol] returns the {available, unavailable} properties for symbol.";
46
PropertiesDataset::usage = "PropertiesDataset[symbol] returns a TableForm of the available properties for symbol.";
57

8+
69
(* Entity *)
710
EntityPropertiesDataset::usage = "EntityPropertiesDataset[entity] does its best to list all the properties associated with the entity object supplied.";
811
ConceptBroaden::usage = "ConceptBroaden[entity,depth] recursively climbs the Concept hierarchy until it hits the terminal Concept 'Entity' or after depth dives. Returns a list of Broader Concepts at each level.";
9-
ConceptDistance::usage = "ConceptDistance[entitya,entityb] determines the distance in 'concept steps' between concept a and b."
12+
ConceptDistance::usage = "ConceptDistance[entitya,entityb] determines the distance in 'concept steps' between concept a and b.";
13+
14+
1015
(* Image *)
1116
FPImageIdentify::usage = "FPImageIdentify[image,n] does the standard image identify returnig n (default 5) items and its probabilities.";
1217

13-
(* Internet *)
14-
$MachineAddressesExternal::usage = "$MachineAddressesExternal gives the IP address of this machine as seen by the outside world."
1518

16-
(* Sugar *)
17-
ApplyIf::usage = "ApplyIf[f,g,x] applies g to x if f[x] is True."
19+
(* Internet *)
20+
$MachineAddressesExternal::usage = "$MachineAddressesExternal gives the IP address of this machine as seen by the outside world.";
1821

19-
(* Versioning *)
20-
FPVersionInfo::usage = "FPVersionInfo[path] gives an association with my primitive home grown versioning system."
2122

22-
FPVersionString::usage = "FPVersionString[path] returns the current build as a string. the option \"Build->True\" adds the build number to the end of the string."
23+
(* Sugar *)
24+
ApplyIf::usage = "ApplyIf[f,g,x] applies g to x if f[x] is True.";
2325

24-
FPWriteVersionInfo::usage = "FPWriteVersionInfo[path,vi] takes a version information structure and writes it out. At this point it doesn't validate its structure."
2526

26-
FPVersionBumpBuild::usage = "FPVersionBumpBuild[path] updates the build number in the version json file."
27+
(* Versioning *)
28+
FPVersionInfo::usage = "FPVersionInfo[path] gives an association with my primitive home grown versioning system.";
29+
FPVersionString::usage = "FPVersionString[path] returns the current build as a string. the option \"Build->True\" adds the build number to the end of the string.";
30+
FPWriteVersionInfo::usage = "FPWriteVersionInfo[path,vi] takes a version information structure and writes it out. At this point it doesn't validate its structure.";
31+
FPVersionBumpBuild::usage = "FPVersionBumpBuild[path] updates the build number in the version json file.";

version.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"major_version": 0,
44
"minor_version": 1,
55
"revision_number": 4,
6-
"build_number": 15,
7-
"date": "Sun Mar 11 19:55:47 EDT 2018"
6+
"build_number": 20,
7+
"date": "Sun Mar 11 22:24:06 EDT 2018"
88
}

0 commit comments

Comments
 (0)