Skip to content

Commit

Permalink
Node consistency 81 90 (#11141)
Browse files Browse the repository at this point in the history
* Nodes Range and Sequence Update

**NODE: Sequence**
-CHANGES:
Input description: Amount of numbers or letters in the sequence
Output seq to sequence

**NODE: Range**
-CHANGES:
Output seq to sequence

* TimeSpan Annotation Update

**NODE: TimeSpan.Components**
-CHANGES:
Output description:
days: Amount of days on TimeSpan
hours: Amount of hours on TimeSpan
minutes: Amount of minutes on TimeSpan
seconds: Amount of seconds on TimeSpan
milliseconds: Amount of milliseconds on TimeSpan

* Object.IsNull Annotation Update

**NODE: Object.IsNull**
-CHANGES:
Description: Determines if the given object is null.
Input: obj to object
Output : bool to boolean

* Object.Identity Annotation Update

**NODE: Object.Identity**
-CHANGES:
Input: obj to object
Output : var[]..[] to object

* DateTime.TimeOfDay Annotation Update

**NODE: DateTime.TimeOfDay**
-CHANGES:
Output: var to TimeSpan
Output Description: TimeSpan since midnight

* DateTime.Date Annotation Update

**NODE: DateTime.Date**
-CHANGES:
Output: var to date
Output Description: date from DateTime
new search options: Date, DataTime.Date

* Update Map input

f(x) to function

* Revert "Nodes Range and Sequence Update"

This reverts commit 77b8156.

* Range and Sequence Updated

Range:
Output: seq to sequence
Description: Amount of numbers or letters in the sequence

Sequence:
Output: seq to sequence

* DateTime.Date search updated

Node name erased from search, Node name is not required for search

* TimeSpan.Components outputs descriptions updated

outputs descriptions updated to include datatype

* Object.IsNull output name update

boolean to -> bool

* Sequence and range nodes output name and output description updated

Sequence and Range:
output name: list
output list description : type: var[]..[] (New list)

* List.Map output name updated

output name mapped -> list
output description: type: var[]..[] (mapped list)

* List.Deconstruct output descriptions updated

output first description: type: var[]..[] (first item in the list)
output rest description: type: var[]..[] (rest of the list)

* Description type of output is placed after description of output
  • Loading branch information
martinstacey authored Oct 6, 2020
1 parent 1721b22 commit fddfe07
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 25 deletions.
4 changes: 2 additions & 2 deletions src/DynamoCore/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/DynamoCore/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,15 @@
<value>Composed function: g(f(x))</value>
</data>
<data name="RangePortDataAmountToolTip" xml:space="preserve">
<value>Amount of numbers in the sequence
<value>Amount of numbers or letters in the sequence
Default value: 10</value>
</data>
<data name="RangePortDataEndToolTip" xml:space="preserve">
<value>Number or letter to end the sequence at
Default value: 9</value>
</data>
<data name="RangePortDataSeqToolTip" xml:space="preserve">
<value>New sequence</value>
<value>New list of type: var[]..[]</value>
</data>
<data name="RangePortDataStartToolTip" xml:space="preserve">
<value>Number or letter to start the sequence at
Expand Down
4 changes: 2 additions & 2 deletions src/DynamoCore/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,15 @@
<value>Composed function: g(f(x))</value>
</data>
<data name="RangePortDataAmountToolTip" xml:space="preserve">
<value>Amount of numbers in the sequence
<value>Amount of numbers or letters in the sequence
Default value: 10</value>
</data>
<data name="RangePortDataEndToolTip" xml:space="preserve">
<value>Number or letter to end the sequence at
Default value: 9</value>
</data>
<data name="RangePortDataSeqToolTip" xml:space="preserve">
<value>New sequence</value>
<value>New list of type: var[]..[]</value>
</data>
<data name="RangePortDataStartToolTip" xml:space="preserve">
<value>Number or letter to start the sequence at
Expand Down
4 changes: 2 additions & 2 deletions src/Libraries/CoreNodeModels/HigherOrder/MapCombineLacing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ private Map(IEnumerable<PortModel> inPorts, IEnumerable<PortModel> outPorts) : b
public Map()
{
InPorts.Add(new PortModel(PortType.Input, this, new PortData("list", Resources.MapPortDataListToolTip)));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("f(x)", Resources.MapPortDataFxToolTip)));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("function", Resources.MapPortDataFxToolTip)));

OutPorts.Add(new PortModel(PortType.Output, this, new PortData("mapped", Resources.MapPortDataResultToolTip)));
OutPorts.Add(new PortModel(PortType.Output, this, new PortData("list", Resources.MapPortDataResultToolTip)));

RegisterAllPorts();
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@
<value>The list to map over.</value>
</data>
<data name="MapPortDataResultToolTip" xml:space="preserve">
<value>Mapped list</value>
<value>Mapped list of type: var[]..[]</value>
</data>
<data name="RangeDescription" xml:space="preserve">
<value>Creates a sequence of numbers or letters in the specified range.</value>
Expand Down
2 changes: 1 addition & 1 deletion src/Libraries/CoreNodeModels/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@
<value>The list to map over.</value>
</data>
<data name="MapPortDataResultToolTip" xml:space="preserve">
<value>Mapped list</value>
<value>Mapped list of type: var[]..[]</value>
</data>
<data name="RangeDescription" xml:space="preserve">
<value>Creates a sequence of numbers or letters in the specified range.</value>
Expand Down
8 changes: 4 additions & 4 deletions src/Libraries/CoreNodeModels/Range.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private Range(IEnumerable<PortModel> inPorts, IEnumerable<PortModel> outPorts) :
InPorts.Add(new PortModel(PortType.Input, this, new PortData("end", Resources.RangePortDataEndToolTip, endPortDefaultValue)));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("step", Resources.RangePortDataStepToolTip, stepPortDefaultValue)));
}
if(outPorts.Count() == 0) OutPorts.Add(new PortModel(PortType.Output, this, new PortData("seq", Resources.RangePortDataSeqToolTip)));
if(outPorts.Count() == 0) OutPorts.Add(new PortModel(PortType.Output, this, new PortData("list", Resources.RangePortDataSeqToolTip)));
ArgumentLacing = LacingStrategy.Auto;
SetNodeStateBasedOnConnectionAndDefaults();
}
Expand All @@ -55,7 +55,7 @@ public Range()
InPorts.Add(new PortModel(PortType.Input, this, new PortData("start", Resources.RangePortDataStartToolTip, startPortDefaultValue)));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("end", Resources.RangePortDataEndToolTip, endPortDefaultValue)));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("step", Resources.RangePortDataStepToolTip, stepPortDefaultValue)));
OutPorts.Add(new PortModel(PortType.Output, this, new PortData("seq", Resources.RangePortDataSeqToolTip)));
OutPorts.Add(new PortModel(PortType.Output, this, new PortData("list", Resources.RangePortDataSeqToolTip)));

RegisterAllPorts();

Expand Down Expand Up @@ -140,7 +140,7 @@ private Sequence(IEnumerable<PortModel> inPorts, IEnumerable<PortModel> outPorts
InPorts.Add(new PortModel(PortType.Input, this, new PortData("amount", Resources.RangePortDataAmountToolTip, amountPortDefaultValue)));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("step", Resources.RangePortDataStepToolTip, stepPortDefaultValue)));
}
if (outPorts.Count() == 0) OutPorts.Add(new PortModel(PortType.Output, this, new PortData("seq", Resources.RangePortDataSeqToolTip)));
if (outPorts.Count() == 0) OutPorts.Add(new PortModel(PortType.Output, this, new PortData("list", Resources.RangePortDataSeqToolTip)));
ArgumentLacing = LacingStrategy.Auto;
SetNodeStateBasedOnConnectionAndDefaults();
}
Expand All @@ -150,7 +150,7 @@ public Sequence()
InPorts.Add(new PortModel(PortType.Input, this, new PortData("start", Resources.RangePortDataStartToolTip, startPortDefaultValue)));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("amount", Resources.RangePortDataAmountToolTip, amountPortDefaultValue)));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("step", Resources.RangePortDataStepToolTip, stepPortDefaultValue)));
OutPorts.Add(new PortModel(PortType.Output, this, new PortData("seq", Resources.RangePortDataSeqToolTip)));
OutPorts.Add(new PortModel(PortType.Output, this, new PortData("list", Resources.RangePortDataSeqToolTip)));

RegisterAllPorts();

Expand Down
8 changes: 8 additions & 0 deletions src/Libraries/CoreNodes/DateTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ public static System.DateTime FromString(string str)
/// Extracts only the date from a DateTime. Time components are set to 0.
/// </summary>
/// <param name="dateTime">A DateTime.</param>
/// <returns name="date">date from DateTime</returns>
/// <search>Date</search>
public static System.DateTime Date(System.DateTime dateTime)
{
return dateTime.Date;
Expand Down Expand Up @@ -223,6 +225,7 @@ public static int DayOfYear(System.DateTime dateTime)
/// given DateTime.
/// </summary>
/// <param name="dateTime">A DateTime.</param>
/// <returns name="timeSpan">TimeSpan since midnight</returns>
public static System.TimeSpan TimeOfDay(System.DateTime dateTime)
{
return dateTime.TimeOfDay;
Expand Down Expand Up @@ -358,6 +361,11 @@ public static System.TimeSpan FromString(string str)
/// Extracts the individual components of a TimeSpan.
/// </summary>
/// <param name="timeSpan">A TimeSpan.</param>
/// <returns name="days">Amount of days (type int)</returns>
/// <returns name="hours">Amount of hours (type int)</returns>
/// <returns name="minutes">Amount of minutes (type int)</returns>
/// <returns name="seconds">Amount of seconds (type int)</returns>
/// <returns name="milliseconds">Amount of milliseconds (type int)</returns>
[MultiReturn("days", "hours", "minutes", "seconds", "milliseconds")]
public static Dictionary<string, int> Components(System.TimeSpan timeSpan)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Libraries/CoreNodes/List.cs
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ public static Dictionary<string, object> FilterByBoolMask(IList list, IList mask
/// except the first.
/// </summary>
/// <param name="list">List to be split.</param>
/// <returns name="first">First item in the list.</returns>
/// <returns name="rest">Rest of the list.</returns>
/// <returns name="first">First item in the list (type: var[]..[]) </returns>
/// <returns name="rest">Rest of the list (type: var[]..[]) </returns>
/// <search>first,rest,list split,listcontains</search>
[MultiReturn(new[] { "first", "rest" })]
[IsVisibleInDynamoLibrary(true)]
Expand Down Expand Up @@ -1161,7 +1161,7 @@ public static IList OfRepeatedItem([ArbitraryDimensionArrayImport] object item,
/// </summary>
/// <param name="list">List to repeat.</param>
/// <param name="amount">Number of times to repeat.</param>
/// <returns name="list">List of repeated lists.</returns>
/// <returns name="list">List of repeated lists of type: var[]..[]</returns>
/// <search>repeat,repeated,duplicate,repeated list,concat list</search>
[IsVisibleInDynamoLibrary(true)]
public static IList Cycle(IList list, int amount)
Expand Down
15 changes: 8 additions & 7 deletions src/Libraries/CoreNodes/Object.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,24 @@ namespace DSCore
public static class Object
{
/// <summary>
/// Determines the if the given object is null.
/// Determines if the given object is null.
/// </summary>
/// <param name="obj">Object to test.</param>
/// <param name="object">Object to test.</param>
/// <returns name="bool">Whether object is null.</returns>
/// <search>is null</search>
public static bool IsNull(object obj)
public static bool IsNull(object @object)
{
return obj == null;
return @object == null;
}

/// <summary>
/// Returns what is passed in, doing nothing.
/// </summary>
/// <param name="obj">An object.</param>
public static object Identity(object obj)
/// <param name="object">An object.</param>
/// <returns name="object">Same object</returns>
public static object Identity(object @object)
{
return obj;
return @object;
}

/// <summary>
Expand Down

0 comments on commit fddfe07

Please sign in to comment.