From 0c3e8f1e5067b3673d97cbae88c5e2c623fa2af7 Mon Sep 17 00:00:00 2001 From: James Dunkerley Date: Mon, 12 Feb 2024 18:15:28 +0000 Subject: [PATCH] Update ICONs as per Cass's work (#9023) Apply the Date and Time based ICON updates. --- .../Base/0.0.0-dev/src/Data/Base_64.enso | 6 ++-- .../src/Data/Enso_Cloud/Enso_File.enso | 3 ++ .../Base/0.0.0-dev/src/Data/Java_Json.enso | 14 ++++++-- .../Base/0.0.0-dev/src/Data/Json.enso | 9 ++++- .../Base/0.0.0-dev/src/Data/Numbers.enso | 1 + .../Base/0.0.0-dev/src/Data/Time/Date.enso | 4 ++- .../0.0.0-dev/src/Data/Time/Date_Time.enso | 8 +++-- .../0.0.0-dev/src/Data/Time/Day_Of_Week.enso | 1 + .../0.0.0-dev/src/Data/Time/Duration.enso | 17 +++++++-- .../Base/0.0.0-dev/src/Data/Time/Period.enso | 3 +- .../0.0.0-dev/src/Data/Time/Time_Of_Day.enso | 14 +++++++- .../0.0.0-dev/src/Data/Time/Time_Zone.enso | 11 ++++-- .../Base/0.0.0-dev/src/Network/URI.enso | 2 +- .../0.0.0-dev/src/System/File_By_Line.enso | 35 ++++++++++++++----- .../Table/0.0.0-dev/src/Data/Table.enso | 2 +- .../Internal/Filter_Condition_Helpers.enso | 6 ++-- .../src/Internal/Widget_Helpers.enso | 2 +- 17 files changed, 109 insertions(+), 29 deletions(-) diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Base_64.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Base_64.enso index 62a16690f5e4..e97b04c71233 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Base_64.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Base_64.enso @@ -7,11 +7,13 @@ polyglot java import java.util.Base64 ## A helper utility for handling base64 encoding. type Base_64 - ## Converts a string to bytes using the specified encoding, and encodes that + ## ICON convert + Converts a string to bytes using the specified encoding, and encodes that to base64. encode_text (text : Text) (encoding : Encoding = Encoding.utf_8) -> Text = Base64.getEncoder.encodeToString (text.bytes encoding) - ## Decodes a base64 encoded string, using the provided encoding. + ## ICON convert + Decodes a base64 encoded string, using the provided encoding. decode_text (encoded_text : Text) (encoding : Encoding = Encoding.utf_8) -> Text ! Encoding_Error = Text.from_bytes (Base64.getDecoder.decode encoded_text) encoding diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Enso_Cloud/Enso_File.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Enso_Cloud/Enso_File.enso index 38008153fc38..662a8fb06de1 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Enso_Cloud/Enso_File.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Enso_Cloud/Enso_File.enso @@ -233,6 +233,7 @@ type Enso_File list_assets self . filter f-> f.asset_type != Enso_Asset_Type.Secret ## UNSTABLE + GROUP Output Creates a subdirectory in a specified directory. create_directory : Text -> Enso_File create_directory self (name : Text) = if self.is_directory.not then Error.throw (Illegal_Argument.Error "Only directories can contain subdirectories.") else @@ -244,6 +245,7 @@ type Enso_File response.if_not_error <| response.decode_as_json.into Enso_File ## UNSTABLE + GROUP Output Deletes the file or directory. delete : Nothing delete self = if self.id == "" then Error.throw (Illegal_Argument.Error "The root directory cannot be deleted.") else @@ -254,6 +256,7 @@ type Enso_File response.if_not_error <| Nothing ## UNSTABLE + GROUP Operators Resolves a file or directory within this directory. / : Text -> Enso_File ! Not_Found / self (name : Text) -> Enso_File ! Not_Found = diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Java_Json.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Java_Json.enso index 9d5609edada3..67d7c0816156 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Java_Json.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Java_Json.enso @@ -32,6 +32,7 @@ polyglot java import com.fasterxml.jackson.databind.ObjectMapper type Java_Json ## ALIAS from text GROUP Conversions + ICON convert Parse a Text value into a `Jackson_Object` or an Enso primitive value (like `Text`, `Number`, `Boolean`, `Nothing`), or a `Vector` of values. @@ -83,11 +84,13 @@ type Jackson_Object Value object_node ~field_array ## GROUP Logical + ICON preparation Returns True iff the objects contains the given `key`. contains_key : Text -> Boolean contains_key self key:Text = self.object_node.has key - ## Get a value for a key of the object, or a default value if that key is not present. + ## ICON select_row + Get a value for a key of the object, or a default value if that key is not present. Arguments: - key: The key to get. @@ -100,6 +103,7 @@ type Jackson_Object read_json_node child ## GROUP Selections + ICON select_row Get a value for a key of the object. If the key is not found, throws a `No_Such_Key` error. @@ -110,6 +114,7 @@ type Jackson_Object at self key:Text = self.get key (Error.throw (No_Such_Key.Error self key)) ## GROUP Metadata + ICON metadata Get the keys of the object. field_names : Vector field_names self = self.field_array @@ -136,6 +141,7 @@ type Jackson_Object function key value ## GROUP Conversions + ICON convert Convert the object to a Vector of Pairs. to_vector : Vector to_vector self = @@ -144,16 +150,19 @@ type Jackson_Object Vector.from_polyglot_array proxy ## GROUP Metadata + ICON metadata Gets the number of keys in the object. length : Number length self = self.object_node.size ## GROUP Logical + ICON metadata Returns True iff the Map is empty, i.e., does not have any entries. is_empty : Boolean is_empty self = self.length == 0 ## GROUP Logical + ICON metadata Returns True iff the Map is not empty, i.e., has at least one entry. not_empty : Boolean not_empty self = self.is_empty.not @@ -187,7 +196,8 @@ make_field_name_selector : Jackson_Object -> Display -> Widget make_field_name_selector js_object display=Display.Always = Single_Choice display=display values=(js_object.field_names.map n->(Option n n.pretty)) -## Extension for Text to allow use. +## ICON convert + Extension for Text to allow use. Text.parse_fast_json : Nothing | Boolean | Number | Text | Vector | Jackson_Object Text.parse_fast_json self = Java_Json.parse self diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Json.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Json.enso index e3a055fa9c72..95ff3f6f6f39 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Json.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Json.enso @@ -141,7 +141,8 @@ type JS_Object contains_key : Text -> Boolean contains_key self key:Text = has_property self.js_object key - ## Get a value for a key of the object, or a default value if that key is not present. + ## ICON select_row + Get a value for a key of the object, or a default value if that key is not present. Arguments: - key: The key to get. @@ -154,6 +155,7 @@ type JS_Object make_enso value ## GROUP Selections + ICON select_row Get a value for a key of the object. If the key is not found, throws a `No_Such_Key` error. @@ -164,6 +166,7 @@ type JS_Object at self key:Text = self.get key (Error.throw (No_Such_Key.Error self key)) ## GROUP Metadata + ICON metadata Get the keys of the object. field_names : Vector field_names self = @@ -191,22 +194,26 @@ type JS_Object function key value ## GROUP Metadata + ICON metadata Gets the number of keys in the object. length : Number length self = get_property_names self.js_object . length ## GROUP Logical + ICON metadata Returns True iff the Map is empty, i.e., does not have any entries. is_empty : Boolean is_empty self = self.length == 0 ## GROUP Logical + ICON metadata Returns True iff the Map is not empty, i.e., has at least one entry. not_empty : Boolean not_empty self = self.is_empty.not ## GROUP Conversions + ICON convert Convert the object to a Vector of Key and Values. to_vector : Vector to_vector self = diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Numbers.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Numbers.enso index 34029116a253..0f4a7654a840 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Numbers.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Numbers.enso @@ -294,6 +294,7 @@ type Number log self base = self.ln / base.ln ## GROUP Conversions + ICON convert Converts a numeric value to a string, using the Java DecimalFormat formatter. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Date.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Date.enso index 94c0a214fc23..e99811974480 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Date.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Date.enso @@ -524,6 +524,7 @@ type Date ## ALIAS date range GROUP Input + ICON date_and_time Creates an increasing range of dates from `self` to `end`. Arguments: @@ -550,6 +551,7 @@ type Date ## ALIAS date range GROUP Input + ICON date_and_time Creates a decreasing range of dates from `self` to `end`. Arguments: @@ -749,7 +751,7 @@ type Date JS_Object.from_pairs [type_pair, cons_pair, ["day", self.day], ["month", self.month], ["year", self.year]] ## GROUP Conversions - ICON text + ICON convert Format this date using the provided format specifier. Arguments: diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Date_Time.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Date_Time.enso index 6d767090361a..7dc1506e1806 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Date_Time.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Date_Time.enso @@ -285,7 +285,8 @@ type Date_Time parse text:Text format:Date_Time_Formatter=Date_Time_Formatter.default_enso_zoned_date_time = format.parse_date_time text - ## Creates a new `Date_Time` from a Unix epoch timestamp in seconds (and optional nanoseconds). + ## ICON convert + Creates a new `Date_Time` from a Unix epoch timestamp in seconds (and optional nanoseconds). Arguments: - seconds: The number of seconds since the Unix epoch. @@ -301,7 +302,8 @@ type Date_Time from_unix_epoch_seconds seconds:Integer nanoseconds:Integer=0 = unix_epoch_start + Duration.new seconds=seconds nanoseconds=nanoseconds - ## Creates a new `Date_Time` from a Unix epoch timestamp in milliseconds. + ## ICON convert + Creates a new `Date_Time` from a Unix epoch timestamp in milliseconds. Arguments: - milliseconds: The number of milliseconds since the Unix epoch. @@ -835,7 +837,7 @@ type Date_Time JS_Object.from_pairs [type_pair, cons_pair, ["year", self.year], ["month", self.month], ["day", self.day], ["hour", self.hour], ["minute", self.minute], ["second", self.second], ["nanosecond", self.nanosecond include_milliseconds=True], ["zone", self.zone]] ## GROUP Conversions - ICON text + ICON convert Format this time as text using the specified format specifier. Arguments: diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Day_Of_Week.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Day_Of_Week.enso index 83f530f64c76..f3c70436eb43 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Day_Of_Week.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Day_Of_Week.enso @@ -30,6 +30,7 @@ type Day_Of_Week Saturday ## GROUP Conversions + ICON convert Convert the Day_Of_Week to an Integer. Arguments: diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Duration.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Duration.enso index 1f26baa00988..cac82c1b3fc7 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Duration.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Duration.enso @@ -65,7 +65,8 @@ ensure_duration object ~action = ## Represents the amount of time between two points in time. @Builtin_Type type Duration - ## Create an interval representing the duration between two points in time. + ## ICON date_and_time + Create an interval representing the duration between two points in time. Arguments: - start_inclusive: The start datetime of the duration, included. @@ -85,6 +86,7 @@ type Duration between_builtin start_inclusive end_exclusive timezone_aware ## GROUP DateTime + ICON date_and_time Create a duration from time units. Arguments: @@ -104,7 +106,8 @@ type Duration new hours=0 minutes=0 seconds=0 milliseconds=0 nanoseconds=0 = new_builtin hours minutes seconds milliseconds nanoseconds - ## Create a zero (empty) duration. + ## ICON date_and_time + Create a zero (empty) duration. > Example Folding a vector of durations. @@ -116,6 +119,7 @@ type Duration zero = Duration.new ## ADVANCED + ICON date_and_time Time the evaluation of a function, return a Pair of Duration and Result @@ -177,6 +181,7 @@ type Duration Error.throw (Time_Error.Error err.payload.getMessage) ## GROUP Metadata + ICON metadata Get the portion of the duration expressed in nanoseconds. > Example @@ -189,6 +194,7 @@ type Duration nanoseconds self = @Builtin_Method "Duration.nanoseconds" ## GROUP Metadata + ICON metadata Get the portion of the duration expressed in milliseconds. > Example @@ -201,6 +207,7 @@ type Duration milliseconds self = @Builtin_Method "Duration.milliseconds" ## GROUP Metadata + ICON metadata Get the portion of the duration expressed in seconds. > Example @@ -213,6 +220,7 @@ type Duration seconds self = @Builtin_Method "Duration.seconds" ## GROUP Metadata + ICON metadata Get the portion of the duration expressed in minutes. > Example @@ -225,6 +233,7 @@ type Duration minutes self = @Builtin_Method "Duration.minutes" ## GROUP Metadata + ICON metadata Get the portion of the duration expressed in hours. > Example @@ -237,6 +246,7 @@ type Duration hours self = @Builtin_Method "Duration.hours" ## GROUP DateTime + ICON convert Convert the duration to total milliseconds. total_milliseconds : Integer ! Illegal_State total_milliseconds self = @@ -244,16 +254,19 @@ type Duration Error.throw (Illegal_State.Error "The duration is too large to convert it to milliseconds") ## GROUP DateTime + ICON convert Convert the duration to total seconds. total_seconds : Float ! Illegal_State total_seconds self = self.total_milliseconds / 1000.0 ## GROUP DateTime + ICON convert Convert the duration to total minutes. total_minutes : Float ! Illegal_State total_minutes self = self.total_seconds / 60.0 ## GROUP DateTime + ICON convert Convert the duration to total minutes. total_hours : Float ! Illegal_State total_hours self = self.total_minutes / 60.0 diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Period.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Period.enso index ab375738a574..4fe3543bafd7 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Period.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Period.enso @@ -39,7 +39,8 @@ ensure_period object ~action error_msg="Cannot use Duration as a parameter" = daylight saving time. This means that a Period of 1 day does not necessarily have to be 24 hours of Duration. type Period - ## Create a Period representing the time interval between two dates. + ## ICON date_and_time + Create a Period representing the time interval between two dates. Arguments: - start_date_inclusive: The start date of the period, included. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Time_Of_Day.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Time_Of_Day.enso index 466fbafead48..d75a5b92ecfe 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Time_Of_Day.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Time_Of_Day.enso @@ -52,6 +52,7 @@ new_builtin hour minute second nanosecond = @Builtin_Method "Time_Of_Day.new_bui @Builtin_Type type Time_Of_Day ## GROUP DateTime + ICON date_and_time Obtains the current time from the system clock in the default time-zone. > Example @@ -64,6 +65,7 @@ type Time_Of_Day now = @Builtin_Method "Time_Of_Day.now" ## GROUP DateTime + ICON date_and_time Obtains an instance of `Time_Of_Day` from an hour, minute, second and nanosecond. @@ -97,6 +99,7 @@ type Time_Of_Day Error.throw (Time_Error.Error caught_panic.payload.getMessage) ## GROUP Conversions + ICON convert Obtains an instance of `Time_Of_Day` from a text such as "10:15". Arguments: @@ -175,6 +178,7 @@ type Time_Of_Day format.parse_time text ## GROUP Metadata + ICON metadata Get the hour portion of the time of day. > Example @@ -187,7 +191,7 @@ type Time_Of_Day hour self = @Builtin_Method "Time_Of_Day.hour" ## GROUP Metadata - ICON date_and_time + ICON metadata Get the minute portion of the time of day. > Example @@ -200,6 +204,7 @@ type Time_Of_Day minute self = @Builtin_Method "Time_Of_Day.minute" ## GROUP Metadata + ICON metadata Get the second portion of the time of day. > Example @@ -212,6 +217,7 @@ type Time_Of_Day second self = @Builtin_Method "Time_Of_Day.second" ## GROUP Metadata + ICON metadata Get the millisecond portion of the time of day. > Example @@ -224,6 +230,7 @@ type Time_Of_Day millisecond self = @Builtin_Method "Time_Of_Day.millisecond" ## GROUP Metadata + ICON metadata Get the microsecond portion of the time of day. > Example @@ -236,6 +243,7 @@ type Time_Of_Day microsecond self = @Builtin_Method "Time_Of_Day.microsecond" ## GROUP Metadata + ICON metadata Get the nanosecond portion of the time of day. Arguments: @@ -254,6 +262,7 @@ type Time_Of_Day self.nanosecond_builtin include_milliseconds ## GROUP DateTime + ICON date_and_time Returns the first time within the `Time_Period` containing self. start_of : Time_Period -> Time_Of_Day start_of self period=Time_Period.Day = period.adjust_start self @@ -265,6 +274,7 @@ type Time_Of_Day end_of self period=Time_Period.Day = period.adjust_end self ## GROUP Conversions + ICON convert Extracts the time as the number of seconds, from 0 to 24 * 60 * 60 - 1. > Example @@ -277,6 +287,7 @@ type Time_Of_Day to_seconds self = @Builtin_Method "Time_Of_Day.to_seconds" ## GROUP Conversions + ICON convert Combine this time of day with a date to create a point in time. Arguments: @@ -421,6 +432,7 @@ type Time_Of_Day self.format "HH:mm:ss.ffffff" ## GROUP Conversions + ICON convert Format this time of day using the provided formatter pattern. Arguments: diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Time_Zone.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Time_Zone.enso index 007740dfa03b..5efce2dcb02d 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Time_Zone.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Time_Zone.enso @@ -50,7 +50,8 @@ parse_builtin text = @Builtin_Method "Time_Zone.parse_builtin" "Europe/Paris". @Builtin_Type type Time_Zone - ## The system default timezone. + ## ICON date_and_time + The system default timezone. > Example Get the system default timezone. @@ -62,6 +63,7 @@ type Time_Zone system = @Builtin_Method "Time_Zone.system" ## ALIAS current time zone + ICON date_and_time The system's local timezone. @@ -75,6 +77,7 @@ type Time_Zone local = Time_Zone.system ## ALIAS utc time zone + ICON date_and_time The UTC timezone. @@ -87,7 +90,8 @@ type Time_Zone utc : Time_Zone utc = Time_Zone.parse "UTC" - ## Obtains an instance of `Time_Zone` using an offset in hours, minutes and seconds + ## ICON date_and_time + Obtains an instance of `Time_Zone` using an offset in hours, minutes and seconds from the UTC zone. Arguments: @@ -109,6 +113,7 @@ type Time_Zone ## ALIAS time zone from text GROUP Conversions + ICON convert This method parses the ID producing a `Time_Zone`. @@ -148,6 +153,7 @@ type Time_Zone parse_builtin id ## GROUP DateTime + ICON metadata Get the unique timezone ID. > Example @@ -160,6 +166,7 @@ type Time_Zone zone_id self = @Builtin_Method "Time_Zone.zone_id" ## GROUP DateTime + ICON metadata Get the offset in seconds at given date time. Arguments: - at: The date to compute offset at. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/URI.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/URI.enso index 9f00245157f4..6a349037b902 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/URI.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/URI.enso @@ -131,7 +131,7 @@ type URI path self = handle_resolve_errors <| self.to_java_representation.getPath - ## GROUP Calculations + ## GROUP Operators Extends the path of this URI with an additional segment. Arguments: diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/System/File_By_Line.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/System/File_By_Line.enso index 8d1768dba64f..df1271f0e7c4 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/System/File_By_Line.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/System/File_By_Line.enso @@ -21,7 +21,8 @@ polyglot java import org.enso.base.arrays.LongArrayList polyglot java import org.enso.base.FileLineReader type File_By_Line - ## Creates a new File_By_Line object. + ## ICON data_input + Creates a new File_By_Line object. Arguments - file: The file to read. @@ -48,7 +49,9 @@ type File_By_Line - file_end: The end of the file in bytes. Reader file:File encoding:Encoding limit_lines:(Integer|Nothing) filter_func row_map file_end=file.size - ## Reads a specific line from the file. + ## GROUP Selections + ICON select_row + Reads a specific line from the file. Arguments - line: The line to read (0 indexed). @@ -56,15 +59,21 @@ type File_By_Line get self line:Integer = if self.limit_lines.is_nothing.not && line>self.limit_lines then Error.throw (Index_Out_Of_Bounds.Error line self.limit_lines) else read_line self line - ## Reads the first line + ## GROUP Selections + ICON select_row + Reads the first line first : Text first self = self.get 0 - ## Reads the first line + ## GROUP Selections + ICON select_row + Reads the first line second : Text second self = self.get 1 - ## Counts the number of lines in the file. + ## GROUP Metadata + ICON metadata + Counts the number of lines in the file. count : Integer count self = end_at = if self.limit_lines.is_nothing then -1 else self.limit_lines @@ -73,7 +82,9 @@ type File_By_Line As row_map can be shared if we have a limit return that. if end_at == -1 then self.row_map.getSize-1 else end_at.min self.row_map.getSize-1 - ## Returns the lines in the file as a vector. + ## GROUP Conversions + ICON convert + Returns the lines in the file as a vector. to_vector : Vector Text to_vector self = File_Error.handle_java_exceptions self.file <| end_at = if self.limit_lines.is_nothing then Nothing else self.limit_lines-1 @@ -122,7 +133,9 @@ type File_By_Line self.each_with_index wrapped_action builder.to_vector - ## Skips the specified number of lines. + ## GROUP Selections + ICON select_row + Skips the specified number of lines. Arguments - lines: The number of lines to skip. @@ -140,7 +153,9 @@ type File_By_Line new_limit = if self.limit_lines.is_nothing then lines else lines.min self.limit_lines File_By_Line.Reader self.file self.encoding new_limit self.filter_func (create_row_map self lines) self.file_end - ## Limits a file to a specific number of lines. + ## GROUP Selections + ICON select_row + Limits a file to a specific number of lines. Arguments - lines: The number of lines to limit the file to. @@ -148,7 +163,9 @@ type File_By_Line limit self lines:Integer = File_By_Line.Reader self.file self.encoding lines self.filter_func self.row_map self.file_end - ## Filters the file by a predicate. + ## GROUP Selections + ICON preparation + Filters the file by a predicate. Arguments - predicate: The predicate to filter by. diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Table.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Table.enso index 5a7a6e037cca..c4dadc296c15 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Table.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Table.enso @@ -2618,7 +2618,7 @@ type Table ## Creates a text representation of the table using the CSV format. to_csv : Text to_csv self = Text.from self (Delimited_Format.Delimited delimiter=",") - + ## GROUP Standard.Base.Conversions Returns a string containing an XML representation of the table. Arguments: diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Filter_Condition_Helpers.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Filter_Condition_Helpers.enso index f5262c84c14a..335da95b8792 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Filter_Condition_Helpers.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Filter_Condition_Helpers.enso @@ -81,14 +81,16 @@ make_filter_column source_column filter_condition on_problems = ## We need to fill in the Nothing values and then negate the result. (base_column.fill_nothing False).not -## Attach a warning if the provided value is `Nothing`. +## PRIVATE + Attach a warning if the provided value is `Nothing`. warn_on_nothing_in_comparison : Filter_Condition -> Any -> Any -> Any warn_on_nothing_in_comparison filter_condition value ~action = case value of Nothing -> Warning.attach (Nothing_Value_In_Filter_Condition.Error filter_condition) action _ -> action -## Attach a warning if the provided value is a `Vector` that contains `Nothing`. +## PRIVATE + Attach a warning if the provided value is a `Vector` that contains `Nothing`. warn_on_nothing_in_comparison_vector : Filter_Condition -> Vector Any -> Any -> Any warn_on_nothing_in_comparison_vector filter_condition values ~action = case values of diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Widget_Helpers.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Widget_Helpers.enso index b0d4bccf81d8..8c45c32a0418 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Widget_Helpers.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Widget_Helpers.enso @@ -2,7 +2,7 @@ from Standard.Base import all import Standard.Base.Metadata.Display import Standard.Base.Metadata.Widget from Standard.Base.Metadata.Choice import Option -from Standard.Base.Metadata.Widget import Single_Choice, Vector_Editor, Numeric_Input +from Standard.Base.Metadata.Widget import Numeric_Input, Single_Choice, Vector_Editor from Standard.Base.System.File_Format import format_types import project.Data.Aggregate_Column.Aggregate_Column