diff --git a/distribution/lib/Standard/AWS/0.0.0-dev/src/S3/S3.enso b/distribution/lib/Standard/AWS/0.0.0-dev/src/S3/S3.enso index 281f83bc60f4..8a7a02e4d8e9 100644 --- a/distribution/lib/Standard/AWS/0.0.0-dev/src/S3/S3.enso +++ b/distribution/lib/Standard/AWS/0.0.0-dev/src/S3/S3.enso @@ -27,7 +27,8 @@ polyglot java import software.amazon.awssdk.services.s3.model.PutObjectRequest polyglot java import software.amazon.awssdk.services.s3.model.S3Exception polyglot java import software.amazon.awssdk.services.s3.S3Client -## Gets the list of the S3 bucket names. +## ICON data_input + Gets the list of the S3 bucket names. Arguments: - credentials: AWS credentials. If not provided, the default credentials will @@ -39,6 +40,7 @@ list_buckets credentials:AWS_Credential=AWS_Credential.Default = handle_s3_error buckets.map b->b.name ## GROUP Standard.Base.Input + ICON data_input Gets the list of the items inside a bucket. Arguments: diff --git a/distribution/lib/Standard/AWS/0.0.0-dev/src/S3/S3_File.enso b/distribution/lib/Standard/AWS/0.0.0-dev/src/S3/S3_File.enso index 49ab9ca11d25..821efd9347e6 100644 --- a/distribution/lib/Standard/AWS/0.0.0-dev/src/S3/S3_File.enso +++ b/distribution/lib/Standard/AWS/0.0.0-dev/src/S3/S3_File.enso @@ -62,6 +62,7 @@ type S3_File is_directory self = self.s3_path.is_directory ## GROUP Standard.Base.Metadata + ICON metadata Checks if this is a regular file. is_regular_file : Boolean is_regular_file self = self.is_directory.not @@ -179,19 +180,22 @@ type S3_File read_text self (encoding=Encoding.utf_8) (on_problems=Problem_Behavior.Report_Warning) = self.read (Plain_Text encoding) on_problems - ## Deletes the object. + ## ICON data_output + Deletes the object. delete : Nothing delete self = if self.is_directory then Error.throw (S3_Error.Error "Deleting S3 folders is currently not implemented." self.uri) else if self.exists.not then Error.throw (File_Error.Not_Found self) else self.delete_if_exists - ## Deletes the file if it had existed. + ## ICON data_output + Deletes the file if it had existed. delete_if_exists : Nothing delete_if_exists self = if self.is_directory then Error.throw (S3_Error.Error "Deleting S3 folders is currently not implemented." self.uri) else Context.Output.if_enabled disabled_message="Deleting an S3_File is forbidden as the Output context is disabled." panic=False <| translate_file_errors self <| S3.delete_object self.s3_path.bucket self.s3_path.key self.credentials . if_not_error Nothing - ## Copies the file to the specified destination. + ## ICON data_output + Copies the file to the specified destination. Arguments: - destination: the destination to move the file to. @@ -209,7 +213,8 @@ type S3_File translate_file_errors self <| S3.copy_object self.s3_path.bucket self.s3_path.key destination_path.bucket destination_path.key self.credentials . if_not_error <| s3_destination _ -> generic_copy self destination.file replace_existing - ## Moves the file to the specified destination. + ## ICON data_output + Moves the file to the specified destination. ! S3 Move is a Copy and Delete @@ -270,6 +275,7 @@ type S3_File S3_File.Value (self.s3_path.join vec_as_texts) self.credentials ## GROUP Standard.Base.Metadata + ICON metadata Resolves the parent of this file. parent : S3_File | Nothing parent self = @@ -278,11 +284,13 @@ type S3_File S3_File.Value parent_path self.credentials ## GROUP Standard.Base.Metadata + ICON metadata Checks if `self` is a descendant of `other`. is_descendant_of : S3_File -> Boolean is_descendant_of self other = self.s3_path.is_descendant_of other.s3_path ## GROUP Standard.Base.Metadata + ICON metadata Returns the path of this file. path : Text path self = self.s3_path.to_text @@ -301,12 +309,14 @@ type S3_File find_extension_from_name self.name ## GROUP Standard.Base.Metadata + ICON metadata Gets the creation time of a file. creation_time : Date_Time ! File_Error creation_time self = Error.throw (S3_Error.Error "Creation time is not available for S3 files, consider using `last_modified_time` instead." self.uri) ## GROUP Standard.Base.Metadata + ICON metadata Gets the last modified time of a file. last_modified_time : Date_Time ! File_Error last_modified_time self = diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Any.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Any.enso index 4cba225a6fa3..3c5e2f69fc42 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Any.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Any.enso @@ -66,6 +66,7 @@ type Any to self target_type = target_type.from self ... ## GROUP Conversions + ICON text Generic conversion of an arbitrary Enso value to a corresponding textual representation. @@ -307,6 +308,7 @@ type Any is_nothing self = False ## GROUP Logical + ICON operators If `self` is Nothing then returns `other`. > Example @@ -318,6 +320,7 @@ type Any const self other ## GROUP Logical + ICON operators If `self` is Nothing then returns Nothing, otherwise returns the result of running the provided `action`. @@ -467,6 +470,7 @@ type Any |> self ~function = function self ## GROUP Errors + ICON metadata Checks if any warnings (either all or of a specified type) are attached to the value. Arguments: diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data.enso index 31eeaac86c73..0d490b186415 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data.enso @@ -321,7 +321,7 @@ post (uri:(URI | Text)) (body:Request_Body=Request_Body.Empty) (method:HTTP_Meth Data_Read_Helpers.decode_http_response_following_data_links response (Data_Read_Helpers.handle_legacy_format "post" "response_format" response_format) ## GROUP Input - ICON data_download + ICON select_column Fetches from the provided URI and if successful writes to the file. Returns an error if the status code does not represent a successful response. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Array.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Array.enso index d830cd26c85c..87bde04944d7 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Array.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Array.enso @@ -149,7 +149,7 @@ type Array sort self (order = Sort_Direction.Ascending) on=Nothing by=Nothing on_incomparable=Problem_Behavior.Ignore = Array_Like_Helpers.sort self order on by on_incomparable - ## ALIAS first, last, sample, slice, top, head, tail, limit + ## ALIAS first, head, last, limit, sample, slice, tail, top GROUP Selections ICON select_row Creates a new `Vector` with only the specified range of elements from the @@ -181,7 +181,7 @@ type Array Array_Like_Helpers.drop self range ## GROUP Calculations - ICON add_row + ICON row_add Inserts the given item into the array at the given index. Arguments: @@ -202,7 +202,7 @@ type Array Array_Like_Helpers.insert self at item ## GROUP Selections - ICON select_column + ICON table_clean Removes the item at the given index from the array. Arguments: @@ -380,7 +380,8 @@ type Array map self function on_problems=Problem_Behavior.Report_Error = Array_Like_Helpers.map self function on_problems - ## Applies a function to each element of the array, returning the `Vector` + ## ICON dataframes_union + Applies a function to each element of the array, returning the `Vector` that contains all results concatenated. Arguments: @@ -586,6 +587,7 @@ type Array Array_Like_Helpers.partition_with_index self predicate ## GROUP Selections + ICON dataframe_map_row Swaps the rows and columns of a matrix represented by an array of arrays. ! Error Conditions diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Boolean.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Boolean.enso index 34836dbc70a7..97daf13a604f 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Boolean.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Boolean.enso @@ -66,6 +66,7 @@ type Boolean not self = @Builtin_Method "Boolean.not" ## GROUP Logical + ICON operators The if-then-else control flow operator that executes one of two branches based on a conditional. @@ -84,6 +85,7 @@ type Boolean if_then_else self ~on_true ~on_false = @Builtin_Method "Boolean.if_then_else" ## GROUP Logical + ICON operators The if-then control flow operator that executes a branch if the condition is true, and otherwise returns Nothing. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Decimal.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Decimal.enso index 1e69ccd69212..dbc730635740 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Decimal.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Decimal.enso @@ -10,7 +10,7 @@ import project.Nothing.Nothing import project.Panic.Panic import project.Warning.Warning from project.Data.Boolean import Boolean, False, True -from project.Data.Numbers import Integer, Float, Number, Number_Parse_Error +from project.Data.Numbers import Float, Integer, Number, Number_Parse_Error from project.Data.Numeric.Internal.Decimal_Internal import Decimal_Comparator from project.Data.Ordering import Comparable, Ordering from project.Errors.Common import Loss_Of_Numeric_Precision @@ -79,9 +79,11 @@ polyglot java import org.enso.base.numeric.Decimal_Utils `Arithmetic_Error` will be thrown. In this case, the solution is to specify an explicit precision using a `Math_Context`. type Decimal + ## PRIVATE Value (big_decimal : BigDecimal) - ## Construct a `Decimal` from a string or integer. + ## ICON number_input + Construct a `Decimal` from a string or integer. Arguments: - x: The `Text`, `Integer`, or `Float` to construct a `Decimal` from. @@ -106,8 +108,8 @@ type Decimal Create a `Decimal` from a string. c = Decimal.new "12.345" - new : Text | Integer | Float -> Math_Context -> Decimal ! Arithmetic_Error | Number_Parse_Error - new (x : Text | Integer | Float) (mc : Math_Context | Nothing = Nothing) -> Decimal | Number_Parse_Error = + new : Text | Integer | Float -> Math_Context | Nothing -> Decimal ! Arithmetic_Error | Number_Parse_Error + new (x : Text | Integer | Float) (mc : Math_Context | Nothing = Nothing) -> Decimal ! Arithmetic_Error | Number_Parse_Error = handle_java_exception <| case x of _ : Text -> Decimal.parse x mc @@ -115,6 +117,7 @@ type Decimal _ : Float -> Decimal.from_float x mc ## GROUP conversions + ICON convert Construct a `Decimal` from a `Text`. Arguments: @@ -139,14 +142,15 @@ type Decimal Create a `Decimal` from a string. d = Decimal.parse "12.345" - parse : Text -> Math_Context -> Decimal ! Arithmetic_Error | Number_Parse_Error - parse (s : Text) (mc : Math_Context | Nothing = Nothing) -> Decimal | Number_Parse_Error = + parse : Text -> Math_Context | Nothing -> Decimal ! Arithmetic_Error | Number_Parse_Error + parse (s : Text) (mc : Math_Context | Nothing = Nothing) -> Decimal ! Arithmetic_Error | Number_Parse_Error = handle_java_exception <| handle_number_format_exception <| case mc of _ : Math_Context -> Decimal.Value <| handle_precision_loss s <| Decimal_Utils.fromString s mc.math_context _ : Nothing -> Decimal.Value (Decimal_Utils.fromString s) ## GROUP conversions + ICON convert Construct a `Decimal` from an `Integer`. Arguments: @@ -165,7 +169,7 @@ type Decimal Create a `Decimal` from an integer. d = Decimal.from_integer 12 - from_integer : Integer -> Math_Context -> Decimal ! Arithmetic_Error + from_integer : Integer -> Math_Context | Nothing -> Decimal ! Arithmetic_Error from_integer (i : Integer) (mc : Math_Context | Nothing = Nothing) -> Decimal ! Arithmetic_Error = handle_java_exception <| case mc of @@ -173,6 +177,7 @@ type Decimal _ : Nothing -> Decimal.Value (Decimal_Utils.fromInteger i) ## GROUP conversions + ICON convert Construct a `Decimal` from a `Float`. Arguments: @@ -199,8 +204,8 @@ type Decimal Create a `Decimal` from a float. d = Decimal.from_integer 12.345 - from_float : Float -> Math_Context -> Decimal ! Arithmetic_Error ! Illegal_Argument - from_float (f : Float) (mc : Math_Context | Nothing = Nothing) -> Decimal ! Arithmetic_Error ! Illegal_Argument = + from_float : Float -> Math_Context | Nothing -> Decimal ! Arithmetic_Error | Illegal_Argument + from_float (f : Float) (mc : Math_Context | Nothing = Nothing) -> Decimal ! Arithmetic_Error | Illegal_Argument = is_exceptional = f.is_nan || f.is_infinite if is_exceptional then Error.throw (Illegal_Argument.Error "Cannot convert "+f.to_text+" to a Decimal") else handle_java_exception <| attach_loss_of_numeric_precision f <| @@ -306,7 +311,7 @@ type Decimal b = Decimal.new "20.33" a.add b (Math_Context.new 3) # => Decimal.new 30.5 - add : Decimal -> Decimal -> Math_Context | Nothing -> Decimal ! Arithmetic_Error + add : Decimal -> Math_Context | Nothing -> Decimal ! Arithmetic_Error add self (that : Decimal) (math_context : Math_Context | Nothing = Nothing) -> Decimal ! Arithmetic_Error = handle_java_exception <| case math_context of @@ -331,7 +336,7 @@ type Decimal b = Decimal.new "20.33" c = a + b # => Decimal.new 30.55 - + : Decimal -> Decimal -> Decimal + + : Decimal -> Decimal + self (that : Decimal) = self.add that ## ALIAS minus @@ -364,7 +369,7 @@ type Decimal b = Decimal.new "10.22" c = a.subtract b (Math_Context.new 3) # => Decimal.new 10.1 - subtract : Decimal -> Decimal -> Math_Context | Nothing -> Decimal ! Arithmetic_Error + subtract : Decimal -> Math_Context | Nothing -> Decimal ! Arithmetic_Error subtract self (that : Decimal) (math_context : Math_Context | Nothing = Nothing) -> Decimal ! Arithmetic_Error = handle_java_exception <| case math_context of @@ -390,7 +395,7 @@ type Decimal b = Decimal.new "10.22" c = a - b # => Decimal.new 10.11 - - : Decimal -> Decimal -> Decimal + - : Decimal -> Decimal - self (that : Decimal) = self.subtract that ## ALIAS times @@ -423,7 +428,7 @@ type Decimal b = Decimal.new "20.33" c = a.multiply b (Math_Context.new 4) # => Decimal.new 207.8 - multiply : Decimal -> Decimal -> Math_Context | Nothing -> Decimal ! Arithmetic_Error + multiply : Decimal -> Math_Context | Nothing -> Decimal ! Arithmetic_Error multiply self (that : Decimal) (math_context : Math_Context | Nothing = Nothing) -> Decimal ! Arithmetic_Error = handle_java_exception <| case math_context of @@ -448,7 +453,7 @@ type Decimal b = Decimal.new "20.33" c = a * b # => Decimal.new 207.7726 - * : Decimal -> Decimal -> Decimal + * : Decimal -> Decimal * self (that : Decimal) = self.multiply that ## GROUP Operators @@ -486,7 +491,7 @@ type Decimal b = Decimal.new "23.34" c = a.divide b (Math_Context.new 3) # => Decimal.new 45.7 - divide : Decimal -> Decimal -> Math_Context | Nothing -> Decimal | Arithmetic_Error + divide : Decimal -> Math_Context | Nothing -> Decimal ! Arithmetic_Error divide self (that : Decimal) (math_context : Math_Context | Nothing = Nothing) -> Decimal ! Arithmetic_Error = handle_java_exception <| case math_context of @@ -511,10 +516,11 @@ type Decimal b = Decimal.new "23.34" c = a / b # => Decimal.new 45.67 - / : Decimal -> Decimal -> Decimal + / : Decimal -> Decimal / self (that : Decimal) = self.divide that ## GROUP Operators + ICON operators Compute the negation of this. > Example @@ -567,6 +573,7 @@ attach_loss_of_numeric_precision : Float -> Any -> Any attach_loss_of_numeric_precision f value = Warning.attach (Loss_Of_Numeric_Precision.Warning f f) value +## PRIVATE handle_java_exception ~action = Panic.catch ArithmeticException action caught_panic-> Error.throw (Arithmetic_Error.Error caught_panic.payload.getMessage) diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Filter_Condition.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Filter_Condition.enso index aceaaeeb1751..846e3d9401c9 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Filter_Condition.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Filter_Condition.enso @@ -142,7 +142,8 @@ type Filter_Condition will likely be faster than using the vector directly. Is_In values:Vector|Any action:Filter_Action=Filter_Action.Keep - ## Converts a `Filter_Condition` condition into a predicate taking an + ## ICON convert + Converts a `Filter_Condition` condition into a predicate taking an element and returning a value indicating whether the element should be accepted by the filter. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Interval.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Interval.enso index d6fc63410248..61e2d36ef6c1 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Interval.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Interval.enso @@ -49,6 +49,7 @@ type Interval_Type ## A type representing an interval over real numbers. type Interval ## GROUP DateTime + ICON date_and_time Creates an interval. Arguments: 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 c7059bfe17fa..f9cadc7f483e 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 @@ -33,6 +33,7 @@ from project.Metadata.Widget import Single_Choice type Json ## ALIAS from text GROUP Conversions + ICON convert Parse a Text value into a `JS_Object` or an Enso primitive value (like `Text`, `Number`, `Boolean`, `Nothing`), or a `Vector` of values. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Json/Extensions.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Json/Extensions.enso index 8cd9da5413b7..a4e1f678f1e4 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Json/Extensions.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Json/Extensions.enso @@ -20,6 +20,7 @@ from project.Data.Range.Extensions import all from project.Data.Text.Extensions import all ## GROUP Conversions + ICON convert Converts the given value to a JSON serialized value. Any.to_json : Text Any.to_json self = Json.stringify self diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Locale.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Locale.enso index b35394fe6333..52b5bf0acf66 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Locale.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Locale.enso @@ -14,9 +14,9 @@ from project.Metadata.Choice import Option polyglot java import java.util.Locale as JavaLocale -# Constants -# These are chosen as the union of the top 10 countries by population, and the -# top ten countries by total (nominal, not per-capita) GDP. +## Constants +## These are chosen as the union of the top 10 countries by population, and the +## top ten countries by total (nominal, not per-capita) GDP. ## A type representing a locale. @@ -25,7 +25,8 @@ polyglot java import java.util.Locale as JavaLocale - A country code, which is optional. - A variant, which is optional. type Locale - ## Construct a new locale. + ## ICON text_input + Construct a new locale. Arguments: - language: The language tag for the locale. @@ -54,7 +55,8 @@ type Locale from_java : JavaLocale -> Locale from_java java = Locale.Value java - ## Returns the locale specified by the provided IETF BCP47 language tag string. + ## ICON convert + Returns the locale specified by the provided IETF BCP47 language tag string. ? Language Tag Syntax If the specified language tag contains any ill-formed subtags, the first @@ -90,7 +92,8 @@ type Locale java_locale = JavaLocale.forLanguageTag tag Locale.Value java_locale - ## The default locale. + ## ICON text + The default locale. The default locale is a locale that does not specify any language, country, or variant and is used as the language/country-neutral setting for locale @@ -98,7 +101,8 @@ type Locale default : Locale default = Locale.Value JavaLocale.ROOT - ## A locale representing Bangladesh. + ## ICON text + A locale representing Bangladesh. > Example Get the Bangladeshi locale. @@ -109,7 +113,8 @@ type Locale bangladesh : Locale bangladesh = Locale.from_language_tag "bn-BD" - ## A locale representing Brazil. + ## ICON text + A locale representing Brazil. > Example Get the Brazilian locale. @@ -120,7 +125,8 @@ type Locale brazil : Locale brazil = Locale.from_language_tag "pt-BR" - ## A locale representing Canada with language English. + ## ICON text + A locale representing Canada with language English. > Example Get the Canadian english locale. @@ -131,7 +137,8 @@ type Locale canada_english : Locale canada_english = Locale.from_language_tag "en-CA" - ## A locale representing Canada with language French. + ## ICON text + A locale representing Canada with language French. > Example Get the Canadian french locale. @@ -142,7 +149,8 @@ type Locale canada_french : Locale canada_french = Locale.from_language_tag "fr-CA" - ## A locale representing the PRC. + ## ICON text + A locale representing the PRC. > Example Get the PRC locale. @@ -153,7 +161,8 @@ type Locale china : Locale china = Locale.from_language_tag "zh-CN" - ## A locale representing France. + ## ICON text + A locale representing France. > Example Get the French locale. @@ -164,7 +173,8 @@ type Locale france : Locale france = Locale.from_language_tag "fr-FR" - ## A locale representing Germany. + ## ICON text + A locale representing Germany. > Example Get the German locale. @@ -175,7 +185,8 @@ type Locale germany : Locale germany = Locale.from_language_tag "de-DE" - ## A locale representing India with language Hindi. + ## ICON text + A locale representing India with language Hindi. > Example Get the Indian hindi locale. @@ -186,7 +197,8 @@ type Locale india_hindi : Locale india_hindi = Locale.from_language_tag "hi-IN" - ## A locale representing India with language English. + ## ICON text + A locale representing India with language English. > Example Get the Indian english locale. @@ -197,7 +209,8 @@ type Locale india_english : Locale india_english = Locale.from_language_tag "en-IN" - ## A locale representing Indonesia. + ## ICON text + A locale representing Indonesia. > Example Get the Indonesian locale. @@ -208,7 +221,8 @@ type Locale indonesia : Locale indonesia = Locale.from_language_tag "id-ID" - ## A locale representing Italy. + ## ICON text + A locale representing Italy. > Example Get the Italian locale. @@ -219,7 +233,8 @@ type Locale italy : Locale italy = Locale.from_language_tag "it-IT" - ## A locale representing Japan. + ## ICON text + A locale representing Japan. > Example Get the Japanese locale. @@ -230,7 +245,8 @@ type Locale japan : Locale japan = Locale.from_language_tag "jp-JP" - ## A locale representing Mexico. + ## ICON text + A locale representing Mexico. > Example Get the Mexican locale. @@ -241,7 +257,8 @@ type Locale mexico : Locale mexico = Locale.from_language_tag "es-MX" - ## A locale representing Nigeria. + ## ICON text + A locale representing Nigeria. > Example Get the Nigerian locale. @@ -252,7 +269,8 @@ type Locale nigeria : Locale nigeria = Locale.from_language_tag "en-NG" - ## A locale representing paksitan with language Urdu. + ## ICON text + A locale representing paksitan with language Urdu. > Example Get the Pakistani urdu locale. @@ -263,7 +281,8 @@ type Locale pakistan_urdu : Locale pakistan_urdu = Locale.from_language_tag "ur-PK" - ## A locale representing paksitan with language English. + ## ICON text + A locale representing paksitan with language English. > Example Get the Pakistani english locale. @@ -274,7 +293,8 @@ type Locale pakistan_english : Locale pakistan_english = Locale.from_language_tag "en-PK" - ## A locale representing Poland. + ## ICON text + A locale representing Poland. > Example Get the Poland locale. @@ -285,7 +305,8 @@ type Locale poland : Locale poland = Locale.from_language_tag "pl-PL" - ## A locale representing Russia. + ## ICON text + A locale representing Russia. > Example Get the Russian locale. @@ -296,7 +317,8 @@ type Locale russia : Locale russia = Locale.from_language_tag "ru-RU" - ## A locale representing South Korea. + ## ICON text + A locale representing South Korea. > Example Get the South Korean locale. @@ -307,7 +329,8 @@ type Locale south_korea : Locale south_korea = Locale.from_language_tag "ko-KR" - ## A locale representing the UK. + ## ICON text + A locale representing the UK. > Example Get the british locale. @@ -318,7 +341,8 @@ type Locale uk : Locale uk = Locale.from_language_tag "en-GB" - ## A locale representing the United States. + ## ICON text + A locale representing the United States. > Example Get the US locale. @@ -336,7 +360,8 @@ type Locale - java_locale: The Java locale representation used internally. Value java_locale - ## Gets the language from the locale. + ## ICON text + Gets the language from the locale. > Example Get the language tag from the default locale. @@ -349,7 +374,8 @@ type Locale lang = self.java_locale.getLanguage if lang.is_empty then Nothing else lang - ## Gets the country from the locale. + ## ICON text + Gets the country from the locale. > Example Get the country tag from the default locale. @@ -362,7 +388,8 @@ type Locale place = self.java_locale.getCountry if place.is_empty then Nothing else place - ## Gets the variant from the locale. + ## ICON metadata + Gets the variant from the locale. > Example Get the variant tag from the default locale. @@ -375,7 +402,8 @@ type Locale var = self.java_locale.getVariant if var.is_empty then Nothing else var - ## Gets a representation of the language in the locale that can be shown to + ## ICON metadata + Gets a representation of the language in the locale that can be shown to the user. > Example @@ -389,7 +417,8 @@ type Locale disp = self.java_locale.getDisplayLanguage if disp.is_empty then Nothing else disp - ## Gets a representation of the country in the locale that can be shown to + ## ICON metadata + Gets a representation of the country in the locale that can be shown to the user. > Example @@ -403,7 +432,8 @@ type Locale disp = self.java_locale.getDisplayCountry if disp.is_empty then Nothing else disp - ## Gets a representation of the variant in the locale that can be shown to + ## ICON metadata + Gets a representation of the variant in the locale that can be shown to the user. > Example diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Map.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Map.enso index 7d530426d188..29f3a96bd071 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Map.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Map.enso @@ -125,7 +125,7 @@ type Map key value size self = @Builtin_Method "Map.size" ## GROUP Calculations - ICON add_row + ICON row_add Inserts a key-value mapping into this map, overriding any existing instance of `key` with the new `value`. @@ -152,7 +152,7 @@ type Map key value insert self key value = @Builtin_Method "Map.insert" ## GROUP Selections - ICON select_column + ICON table_clean Removes an entry specified by the given key from this map, and returns a new map without this entry. Throw `No_Such_Key.Error` if `key` is not present. @@ -291,7 +291,8 @@ type Map key value trans_function = k -> v -> [function k, v] self.transform trans_function - ## Transforms the map's keys and values to create a new map. + ## ICON dataframe_map_column + Transforms the map's keys and values to create a new map. Arguments: - function: The function used to transform the map, taking a key and a diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Maybe.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Maybe.enso index e739c320c961..24a8a450207e 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Maybe.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Maybe.enso @@ -43,6 +43,7 @@ type Maybe Maybe.Some val -> function val ## GROUP Metadata + ICON metadata Check if the maybe value is `Some`. > Example @@ -57,6 +58,7 @@ type Maybe Maybe.Some _ -> True ## GROUP Metadata + ICON metadata Check if the maybe value is `None`. is_none : Boolean is_none self = self.is_some.not 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 c8756329d652..3adaafc65f61 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 @@ -117,6 +117,7 @@ type Number ## ALIAS inverse sine GROUP Trigonometry + ICON math Computes the inverse of the sine function @@ -146,6 +147,7 @@ type Number ## ALIAS inverse tangent GROUP Trigonometry + ICON math Computes the inverse of the tangent function. @@ -159,6 +161,7 @@ type Number atan self = Math.atan self.to_float ## GROUP Trigonometry + ICON math Computes the argument (angle) in the conversion from cartesian to polar coordinates, taking `self` as the x coordinate. @@ -176,6 +179,7 @@ type Number ## ALIAS sine GROUP Trigonometry + ICON math Computes the sine function. @@ -201,6 +205,7 @@ type Number ## ALIAS tangent GROUP Trigonometry + ICON math Computes the tangent function. @@ -212,6 +217,7 @@ type Number tan self = Math.tan self.to_float ## GROUP Trigonometry + ICON math Computes the hyperbolic sine function. > Example @@ -233,6 +239,7 @@ type Number cosh self = Math.cosh self.to_float ## GROUP Trigonometry + ICON math Computes the hyperbolic tangent function. > Example @@ -257,6 +264,7 @@ type Number ## ALIAS natural logarithm GROUP Math + ICON math Computes the natural logarithm function. @@ -269,6 +277,7 @@ type Number ## ALIAS square root GROUP Math + ICON math Computes the square root of `self`. @@ -281,6 +290,7 @@ type Number ## ALIAS logarithm GROUP Math + ICON math Computes the `base`-log of `self`. @@ -353,6 +363,7 @@ type Number min self that = if self < that then self else that ## GROUP Math + ICON math Returns the larger value of `self` and `that`. Arguments: @@ -370,19 +381,23 @@ type Number max : Number -> Number max self that = if self > that then self else that - ## A constant holding the floating-point positive infinity. + ## ICON math + A constant holding the floating-point positive infinity. positive_infinity : Float positive_infinity = Double.POSITIVE_INFINITY - ## A constant holding the floating-point negative infinity. + ## ICON math + A constant holding the floating-point negative infinity. negative_infinity : Float negative_infinity = Double.NEGATIVE_INFINITY - ## A constant holding the floating-point Not-a-Number value. + ## ICON math + A constant holding the floating-point Not-a-Number value. nan : Float nan = Double.NaN ## GROUP Math + ICON metadata Checks if the given number is the floating-point Not-a-Number value. This is needed, because the NaN value will return `False` even when being @@ -393,6 +408,7 @@ type Number _ -> False ## GROUP Math + ICON metadata Checks if the given number is infinite. is_infinite : Boolean is_infinite self = case self of @@ -400,6 +416,7 @@ type Number _ -> False ## GROUP Math + ICON metadata Checks if the given number is finite, i.e. not infinite nor NaN. is_finite : Boolean is_finite self = case self of @@ -407,6 +424,7 @@ type Number _ -> True ## GROUP Math + ICON math Returns the sign of the number. signum : Integer signum self = @@ -604,6 +622,7 @@ type Float ceil self -> Integer = float_ceil self ## GROUP Rounding + ICON math Computes the nearest integer below this float. This method provides a means of converting a Float to an Integer. @@ -616,12 +635,14 @@ type Float ## ALIAS int GROUP Rounding + ICON math Truncate a floating-point number to an integer by dropping the fractional part. This is equivalent to "round-toward-zero". truncate self -> Integer = float_truncate_builtin self ## GROUP Rounding + ICON math Round to a specified number of decimal places. By default, rounding uses "asymmetric round-half-up", also known as @@ -679,6 +700,7 @@ type Float round_float_builtin self decimal_places use_bankers ## GROUP Operators + ICON operators Compute the negation of this. > Example @@ -687,7 +709,8 @@ type Float 5.1.negate negate self -> Float = float_negate self - ## Convert this to a float. + ## ICON convert + Convert this to a float. This is a no-op on floats, but is provided for completeness of the Enso Number API. @@ -700,6 +723,7 @@ type Float ## ALIAS from text GROUP Conversions + ICON convert Parses a textual representation of a float into a float number, returning a `Number_Parse_Error` if the text does not represent a valid float. @@ -932,6 +956,7 @@ type Integer div self that:Integer -> Integer ! Arithmetic_Error = integer_div self that ## GROUP Rounding + ICON math Computes the nearest integer below this integer. This is a no-op on integers but is provided for completeness of the Enso @@ -1012,7 +1037,8 @@ type Integer 5.negate negate self -> Integer = integer_negate self - ## Convert this to a float. + ## ICON convert + Convert this to a float. > Example Convert 5 to a float to get 5.0. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Numeric/Math_Context.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Numeric/Math_Context.enso index 5485dfd27a2d..aa9b64b3b441 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Numeric/Math_Context.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Numeric/Math_Context.enso @@ -34,13 +34,14 @@ type Math_Context ## PRIVATE Value (math_context:MathContext) - ## Construct a `Math_Context` value. + ## ICON math + Construct a `Math_Context` value. Arguments: - precision: The non-negative int precision setting. A value of `0` specifies exact operations. - rounding_mode: The rounding mode to use. - new : Integer -> Rounding_Mode -> Math_Context + new : Integer | Unlimited -> Rounding_Mode -> Math_Context new (precision : Integer | Unlimited) (rounding_mode : Rounding_Mode = Rounding_Mode.half_up) = case precision of _ : Integer -> Math_Context.Value (MathContext.new precision rounding_mode.rounding_mode) diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Numeric/Rounding_Mode.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Numeric/Rounding_Mode.enso index 9279c3ddb8d0..fb670b8c1056 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Numeric/Rounding_Mode.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Numeric/Rounding_Mode.enso @@ -7,14 +7,17 @@ polyglot java import java.math.RoundingMode `Rounding_Mode` is used to specify the method to use for rounding a value in operations on `Decimal`s.` See `Decimal` for more details. type Rounding_Mode + ## PRIVATE Value (rounding_mode : RoundingMode) - # Round towards positive infinity for positive numbers, and negative - # infinity for negative numbers. (This is the default.) + ## ICON math + Round towards positive infinity for positive numbers, and negative + infinity for negative numbers. (This is the default.) half_up : Rounding_Mode half_up = Rounding_Mode.Value RoundingMode.HALF_UP - ## Rownd towards the nearest neighbor, with ties broken by rounding towards + ## ICON math + Rownd towards the nearest neighbor, with ties broken by rounding towards the nearest even neighbor. bankers : Rounding_Mode bankers = Rounding_Mode.Value RoundingMode.HALF_EVEN diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Ordering.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Ordering.enso index ff2c033eb6ae..90275bc249b8 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Ordering.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Ordering.enso @@ -174,6 +174,7 @@ type Ordering Error.throw (Incomparable_Values.Error x y) ## GROUP Conversions + ICON convert Converts the ordering to the signed notion of ordering based on integers. > Example diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Range/Extensions.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Range/Extensions.enso index fc3e6df0fa32..0acb6d05dada 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Range/Extensions.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Range/Extensions.enso @@ -6,6 +6,7 @@ from project.Data.Boolean import Boolean, False, True ## ALIAS range GROUP Input + ICON number_input Creates an increasing range of integers from `self` to `n`. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Regression.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Regression.enso index 278d2fcd863f..3e865a3d198d 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Regression.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Regression.enso @@ -104,6 +104,7 @@ type Fitted_Model Fitted_Model.Power a b _ -> a.to_text + " * X ^ " + b.to_text ## GROUP Calculations + ICON machine_learning Use the model to predict a value. predict : Number -> Number predict self x = case self of diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Set.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Set.enso index 77f4fb550473..a6fa4256a41e 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Set.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Set.enso @@ -42,11 +42,13 @@ type Set empty = Set.Value Map.empty ## GROUP Conversions + ICON convert Returns a vector containing all elements of this set. to_vector : Vector to_vector self = self.underlying_map.keys ## GROUP Metadata + ICON metadata Returns the number of elements in this set. size : Integer size self = self.underlying_map.size @@ -70,6 +72,7 @@ type Set contains self value = self.underlying_map.contains_key value ## GROUP Logical + ICON preparation Checks if this set contains a given value, treating Nothing as a relational NULL. @@ -92,6 +95,7 @@ type Set ## ALIAS add GROUP Calculations + ICON row_add Adds a value to this set. insert : Any -> Set insert self value = @@ -99,6 +103,7 @@ type Set Set.Value new_map ## GROUP Calculations + ICON dataframes_union Creates a union of the two sets. union : Set -> Set union self (other : Set) = diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Statistics.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Statistics.enso index 6539c59112a4..3bd734ae1726 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Statistics.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Statistics.enso @@ -220,7 +220,8 @@ type Statistic output.to_vector - ## Calculate a variance-covariance matrix between the input series. + ## ICON math + Calculate a variance-covariance matrix between the input series. Arguments: - data: The input data sets @@ -229,7 +230,8 @@ type Statistic stats_vectors = calculate_correlation_statistics_matrix data stats_vectors.map v->(v.map .covariance) - ## Calculate a Pearson correlation matrix between the input series. + ## ICON math + Calculate a Pearson correlation matrix between the input series. Arguments: - data: The input data sets @@ -238,7 +240,8 @@ type Statistic stats_vectors = calculate_correlation_statistics_matrix data stats_vectors.map v->(v.map .pearsonCorrelation) - ## Calculate a Spearman Rank correlation matrix between the input series. + ## ICON math + Calculate a Spearman Rank correlation matrix between the input series. Arguments: - data: The input data sets @@ -305,7 +308,7 @@ Vector.compute : Statistic -> Any Vector.compute self statistic=Statistic.Count = self.compute_bulk [statistic] . first -## ICON add_column +## ICON dataframe_map_column Compute statistics on the vector (ignoring Nothing and NaN values). Arguments: @@ -336,7 +339,7 @@ Vector.running_bulk self statistics=[Statistic.Count, Statistic.Sum] = Statistic.running_bulk self statistics ## GROUP Statistics - ICON add_column + ICON dataframe_map_column Assigns a rank to each value of data, dealing with equal values according to the method. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text.enso index 19c86e167d2f..6839708bb32d 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text.enso @@ -22,6 +22,7 @@ polyglot java import org.enso.base.Text_Utils type Text ## ALIAS count GROUP Metadata + ICON metadata Computes the number of characters in the text. ! What is a Character? @@ -91,7 +92,8 @@ type Text to_case_insensitive_key self (locale : Locale = Locale.default) = Text_Utils.case_insensitive_key self locale.java_locale - ## Compare two texts to discover their ordering. + ## ICON text + Compare two texts to discover their ordering. Arguments: - that: The text to order `self` with respect to. @@ -141,6 +143,7 @@ type Text to_text self = self ## ADVANCED + ICON metadata Checks where this Text is in FCD normalized form. > Example @@ -151,6 +154,7 @@ type Text is_normalized self = @Builtin_Method "Text.is_normalized" ## ALIAS normalise + ICON convert Perform Unicode normalization on the string, using the specified method. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Encoding.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Encoding.enso index 3082dc792e98..98fb80d8ee77 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Encoding.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Encoding.enso @@ -39,7 +39,8 @@ type Encoding all_encodings = Encoding.all_character_sets.map Encoding.Value - ## Create an Encoding from a Text. + ## ICON convert + Create an Encoding from a Text. from_name : Text -> Encoding ! Illegal_Argument from_name name = handler = _-> Error.throw (Illegal_Argument.Error ("Unknown Character Set: " + name)) @@ -61,65 +62,80 @@ type Encoding Panic.catch UnsupportedCharsetException (Charset.forName self.character_set) _-> Error.throw (Illegal_Argument.Error ("Unknown Character Set: " + self.character_set)) - ## Encoding for ASCII. + ## ICON convert + Encoding for ASCII. ascii : Encoding ascii = Encoding.Value "US-ASCII" - ## Encoding for Unicode UTF-8. + ## ICON convert + Encoding for Unicode UTF-8. utf_8 : Encoding utf_8 = Encoding.Value "UTF-8" - ## Encoding for Unicode UTF-16 Little Endian. + ## ICON convert + Encoding for Unicode UTF-16 Little Endian. utf_16_le : Encoding utf_16_le = Encoding.Value "UTF-16LE" - ## Encoding for Unicode UTF-16 Big Endian. + ## ICON convert + Encoding for Unicode UTF-16 Big Endian. utf_16_be : Encoding utf_16_be = Encoding.Value "UTF-16BE" - ## Encoding for Unicode UTF-32 Little Endian. + ## ICON convert + Encoding for Unicode UTF-32 Little Endian. utf_32_le : Encoding utf_32_le = Encoding.Value "UTF-32LE" - ## Encoding for Unicode UTF-32 Big Endian. + ## ICON convert + Encoding for Unicode UTF-32 Big Endian. utf_32_be : Encoding utf_32_be = Encoding.Value "UTF-32BE" - ## Encoding for Central European (Windows). + ## ICON convert + Encoding for Central European (Windows). windows_1250 : Encoding windows_1250 = Encoding.Value "windows-1250" - ## Encoding for Cyrillic (Windows). + ## ICON convert + Encoding for Cyrillic (Windows). windows_1251 : Encoding windows_1251 = Encoding.Value "windows-1251" ## ALIAS iso-8859-1 + ICON convert Encoding for Western European (Windows). windows_1252 : Encoding windows_1252 = Encoding.Value "windows-1252" - ## Encoding for Greek (Windows). + ## ICON convert + Encoding for Greek (Windows). windows_1253 : Encoding windows_1253 = Encoding.Value "windows-1253" ## ALIAS iso-8859-9 + ICON convert Encoding for Turkish (Windows). windows_1254 : Encoding windows_1254 = Encoding.Value "windows-1254" - ## Encoding for Hebrew (Windows). + ## ICON convert + Encoding for Hebrew (Windows). windows_1255 : Encoding windows_1255 = Encoding.Value "windows-1255" - ## Encoding for Arabic (Windows). + ## ICON convert + Encoding for Arabic (Windows). windows_1256 : Encoding windows_1256 = Encoding.Value "windows-1256" - ## Encoding for Baltic (Windows). + ## ICON convert + Encoding for Baltic (Windows). windows_1257 : Encoding windows_1257 = Encoding.Value "windows-1257" - ## Encoding for Vietnamese (Windows). + ## ICON convert + Encoding for Vietnamese (Windows). windows_1258 : Encoding windows_1258 = Encoding.Value "windows-1258" diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Extensions.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Extensions.enso index 359518aafb8e..cbdac1b6060c 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Extensions.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Extensions.enso @@ -35,6 +35,7 @@ from project.Data.Boolean import Boolean, False, True from project.Data.Json import Invalid_JSON, JS_Object, Json from project.Data.Numbers import Float, Integer, Number, Number_Parse_Error from project.Data.Range.Extensions import all +from project.Metadata import Display, Widget from project.Widget_Helpers import make_date_format_selector, make_date_time_format_selector, make_delimiter_selector, make_regex_text_widget, make_time_format_selector polyglot java import com.ibm.icu.lang.UCharacter @@ -96,6 +97,7 @@ Text.each self function = ## ALIAS get character GROUP Selections + ICON split_text Returns a character from the text at the specified index (0-based). @@ -114,11 +116,13 @@ Text.each self function = Get the individual characters in the text "건반(Korean)". "건반(Korean)".at 1 == "반" +@index (t-> Widget.Numeric_Input minimum=0 maximum=t.length display=Display.Always) Text.at : Integer -> Text ! Index_Out_Of_Bounds Text.at self index = self.get index (Error.throw (Index_Out_Of_Bounds.Error index self.length)) ## ALIAS get character + ICON split_text Returns a character from the text at the specified index (0-based). If the index is invalid then `if_missing` is returned. @@ -139,6 +143,7 @@ Text.at self index = Get the individual characters in the text "건반(Korean)". "건반(Korean)".get 1 == "반" +@index (t-> Widget.Numeric_Input minimum=0 maximum=t.length display=Display.Always) Text.get : Integer -> Any -> Any Text.get self index ~if_missing=Nothing = new_index = if index < 0 then index + self.length else index @@ -151,6 +156,7 @@ Text.get self index ~if_missing=Nothing = Text_Utils.substring self first next ## GROUP Selections + ICON split_text Returns the first character from the text. ! What is a Character? @@ -166,6 +172,7 @@ Text.first : Text ! Index_Out_Of_Bounds Text.first self = self.at 0 ## GROUP Selections + ICON split_text Returns the second character from the text. ! What is a Character? @@ -181,6 +188,7 @@ Text.second : Text ! Index_Out_Of_Bounds Text.second self = self.at 1 ## GROUP Selections + ICON split_text Returns the last character from the text. ! What is a Character? @@ -197,6 +205,7 @@ Text.last self = self.at -1 ## ALIAS get characters GROUP Text + ICON convert Returns a vector containing all characters in the given text. @@ -216,6 +225,7 @@ Text.characters self = bldr.to_vector ## GROUP Selections + ICON find Find the regular expression `pattern` in `self`, returning the first match if present or `Nothing` if not found. @@ -244,6 +254,7 @@ Text.find self pattern=".*" case_sensitivity=Case_Sensitivity.Sensitive = compiled_pattern.match self ## GROUP Selections + ICON find Finds all the matches of the regular expression `pattern` in `self`, returning a Vector. If not found, will be an empty Vector. @@ -304,6 +315,7 @@ Text.match self pattern=".*" case_sensitivity=Case_Sensitivity.Sensitive = compiled_pattern.matches self ## GROUP Text + ICON text Compile the text into a regex pattern that can be used for matching. Arguments @@ -323,6 +335,7 @@ Text.to_regex self case_insensitive=False = Regex.compile self case_insensitive ## ALIAS split text GROUP Conversions + ICON split_text Takes a delimiter and returns the vector that results from splitting `self` on each of its occurrences. @@ -387,6 +400,7 @@ Text.split self delimiter="," case_sensitivity=Case_Sensitivity.Sensitive use_re ## ADVANCED GROUP Conversions + ICON split_text Takes an input string and and a pattern and returns all the matches as a `Vector Text`. If the pattern contains marked groups, the values are concatenated together; otherwise the whole match is returned. @@ -513,6 +527,7 @@ Text.replace self term:(Text | Regex) replacement:Text (case_sensitivity:Case_Se ## ALIAS get words GROUP Text + ICON text Returns a vector containing all words in the given text. @@ -557,6 +572,7 @@ Text.words self keep_whitespace=False = ## ALIAS get lines GROUP Text + ICON text Splits the text into lines, based on '\n', '\r' or '\r\n' line endings. @@ -660,6 +676,7 @@ Text.is_whitespace self = Text_Utils.is_all_whitespace self ## ADVANCED + ICON convert Returns a vector containing bytes representing the specified encoding of the input text. @@ -685,7 +702,8 @@ Text.bytes self encoding on_problems=Problem_Behavior.Report_Warning = if result.warnings.is_nothing then vector else on_problems.attach_problems_after vector [Encoding_Error.Error result.warnings] -## Takes a vector of bytes and returns Text resulting from decoding it using the +## ICON convert + Takes a vector of bytes and returns Text resulting from decoding it using the specified encoding. Arguments: @@ -705,7 +723,8 @@ Text.from_bytes bytes encoding on_problems=Problem_Behavior.Report_Error = if result.warnings.is_nothing then result.result else on_problems.attach_problems_after result.result [Encoding_Error.Error result.warnings] -## Returns a vector containing bytes representing the UTF-8 encoding of the +## ICON convert + Returns a vector containing bytes representing the UTF-8 encoding of the input text. This is useful for low-level operations, such as binary data encoding and @@ -726,7 +745,8 @@ Text.utf_8 : Problem_Behavior -> Vector Integer Text.utf_8 self on_problems=Problem_Behavior.Report_Warning = self.bytes Encoding.utf_8 on_problems -## Takes a vector of bytes and returns Text resulting from decoding it as UTF-8. +## ICON convert + Takes a vector of bytes and returns Text resulting from decoding it as UTF-8. Arguments: - bytes: The vector of UTF-8 bytes. @@ -744,7 +764,8 @@ Text.from_utf_8 : Vector Integer -> Problem_Behavior -> Text Text.from_utf_8 bytes on_problems=Problem_Behavior.Report_Error = Text.from_bytes bytes Encoding.utf_8 on_problems -## Returns a vector containing the UTF-16 characters that encode the input text. +## ICON convert + Returns a vector containing the UTF-16 characters that encode the input text. This is useful for low-level operations, such as binary data encoding and decoding. @@ -756,7 +777,8 @@ Text.from_utf_8 bytes on_problems=Problem_Behavior.Report_Error = Text.char_vector : Vector Integer Text.char_vector self = Vector.from_polyglot_array (Text_Utils.get_chars self) -## Takes a vector of characters and returns the text that results from it. +## ICON convert + Takes a vector of characters and returns the text that results from it. Arguments: - chars: The vector of UTF-16 characters. @@ -766,7 +788,8 @@ Text.char_vector self = Vector.from_polyglot_array (Text_Utils.get_chars self) Text.from_char_vector : Vector Integer -> Text Text.from_char_vector chars = Text_Utils.from_chars chars -## Returns a vector containing integers representing the Unicode codepoints of +## ICON convert + Returns a vector containing integers representing the Unicode codepoints of the input text. This is useful for low-level operations, such as binary data encoding and @@ -779,7 +802,8 @@ Text.from_char_vector chars = Text_Utils.from_chars chars Text.codepoints : Vector Integer Text.codepoints self = Vector.from_polyglot_array (Text_Utils.get_codepoints self) -## Takes an array of numbers and returns the text resulting from interpreting it +## ICON convert + Takes an array of numbers and returns the text resulting from interpreting it as a sequence of Unicode codepoints. This is useful for low-level operations, such as binary data encoding and @@ -922,6 +946,7 @@ Text.* : Integer -> Text Text.* self count = self.repeat count ## GROUP Calculations + ICON text Takes an integer and returns a new text, consisting of `count` concatenated copies of `self`. @@ -942,8 +967,9 @@ Text.repeat : Integer -> Text Text.repeat self count=1 = 0.up_to count . fold "" acc-> _-> acc + self -## ALIAS first, last, left, mid, right, slice, substring, top, head, tail, limit +## ALIAS first, head, last, left, limit, mid, right, slice, substring, tail, top GROUP Selections + ICON split_text Creates a new Text by selecting the specified range of the input. This can select a section of text from the beginning, end, or middle of the @@ -1085,6 +1111,7 @@ Text.to_case self case_option=Case.Lower locale=Locale.default = case case_optio Case.Title -> UCharacter.toTitleCase locale.java_locale self Nothing ## GROUP Calculations + ICON text Returns the input padded to the specified `length`, using the `with_pad` string repeated at the start or the end. @@ -1364,6 +1391,7 @@ Text.locate_all self term="" case_sensitivity=Case_Sensitivity.Sensitive = if te Span.Value (grapheme_span.grapheme_start.up_to grapheme_span.grapheme_end) self ## GROUP Values + ICON find Find the first index of the `term` in the input. Returns `Nothing` if the term was not found in the input. @@ -1398,6 +1426,7 @@ Text.index_of self term="" (start : Integer = 0) case_sensitivity=Case_Sensitivi if span.is_nothing then Nothing else span.start+used_start ## GROUP Values + ICON find Find the last index of the `term` in the input. Returns `Nothing` if the term was not found in the input. @@ -1433,6 +1462,7 @@ Text.last_index_of self term="" start=-1 case_sensitivity=Case_Sensitivity.Sensi ## ALIAS float from text, to_float GROUP Conversions + ICON convert Parses a textual representation of a float into a float number, returning a `Number_Parse_Error` if the text does not represent a valid float. @@ -1450,6 +1480,7 @@ Text.parse_float self locale=Nothing = Float.parse self locale ## ALIAS integer from text, to_integer GROUP Conversions + ICON convert Parses a textual representation of an integer into an integer number, returning a `Number_Parse_Error` if the text does not represent a valid integer. @@ -1466,6 +1497,7 @@ Text.parse_integer self (radix:Integer = 10) -> Integer ! Number_Parse_Error = I ## ALIAS json from text GROUP Conversions + ICON convert Parse a Text value into a `JS_Object` or an Enso primitive value (like `Text`, `Number`, `Boolean`, `Nothing`), or a `Vector` of values. @@ -1479,6 +1511,7 @@ Text.parse_json self = Json.parse self ## ALIAS date from text, to_date GROUP Conversions + ICON convert Converts text containing a date into a Date object. @@ -1569,6 +1602,7 @@ Text.parse_date self format:Date_Time_Formatter=Date_Time_Formatter.iso_date = ## ALIAS date_time from text GROUP Conversions + ICON convert Obtains an instance of `Date_Time` from a text such as "2007-12-03T10:15:30+01:00 Europe/Paris". @@ -1689,6 +1723,7 @@ Text.parse_date_time self format:Date_Time_Formatter=Date_Time_Formatter.default ## ALIAS time_of_day from text, to_time_of_day GROUP Conversions + ICON convert Obtains an instance of `Time_Of_Day` from a text such as "10:15". @@ -1766,6 +1801,7 @@ Text.parse_time_of_day self format:Date_Time_Formatter=Date_Time_Formatter.iso_t ## ALIAS time_zone from text, to_time_zone GROUP Conversions + ICON convert This method parses the ID producing a `Time_Zone`. @@ -1801,6 +1837,7 @@ Text.parse_time_zone self = Time_Zone.parse self ## ALIAS mid, slice, substring GROUP Selections + ICON split_text Creates a new Text by selecting the specified range of the input. Arguments: diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Regex.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Regex.enso index cbed15c9603d..330eb18d3410 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Regex.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Regex.enso @@ -63,6 +63,7 @@ type Regex Value (case_insensitive : Boolean) (internal_regex_object : Any) ## GROUP Metadata + ICON metadata Gets the original pattern used to create this `Regex`. pattern : Text pattern self = self.internal_regex_object.pattern @@ -130,6 +131,7 @@ type Regex builder.to_vector ## GROUP Selections + ICON find Tries to match the provided `input` against the pattern `self`. Returns a `Text` containing the matched text, or `Nothing` if the match @@ -142,6 +144,7 @@ type Regex match_to_group_maybe <| self.match input ## GROUP Selections + ICON find Tries to match the provided `input` against the pattern `self`. Returns a `Vector Text`, each containing the matched text. @@ -154,6 +157,7 @@ type Regex self.match_all input . map match_to_group_maybe ## GROUP Conversions + ICON split_text Splits the `input` text based on the pattern described by `self`. Arguments: @@ -198,6 +202,7 @@ type Regex builder.to_vector ## GROUP Conversions + ICON split_text Takes an input string and returns all the matches as a `Vector Text`. If the pattern contains marked groups, the values are concatenated together; otherwise the whole match is returned. Non-participating @@ -367,6 +372,7 @@ type Regex group_count self = self.internal_regex_object.groupCount ## GROUP Metadata + ICON metadata Return a vector of all named group names. named_groups : Vector Text named_groups self = @@ -482,7 +488,8 @@ type Regex_Syntax_Error to_display_text : Text to_display_text self = "Regex Syntax Error:" + self.message -## Shorthand to create a regular expression from a Text value. +## ICON text + Shorthand to create a regular expression from a Text value. If an empty regex is used, throws an Illegal_Argument error. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Regex/Match.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Regex/Match.enso index f45995ad68ed..4ee00e716133 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Regex/Match.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Regex/Match.enso @@ -55,7 +55,8 @@ type Match internal_end : Integer -> Integer internal_end self group = self.internal_regex_result.getEnd group - ## Returns the start UTF16 character index of a group. + ## ICON metadata + Returns the start UTF16 character index of a group. Arguments: - group: the group name or number. Marked groups defined in the regex are @@ -65,7 +66,8 @@ type Match span = self.utf_16_span group if span.is_nothing then Nothing else span.start - ## Returns the end UTF16 character index, plus one, of a group. + ## ICON metadata + Returns the end UTF16 character index, plus one, of a group. Arguments: - group: the group name or number. Marked groups defined in the regex are @@ -76,6 +78,7 @@ type Match if span.is_nothing then Nothing else span.end ## GROUP Metadata + ICON metadata Returns the start grapheme index of a group. ! What is a Character? @@ -106,7 +109,8 @@ type Match span = self.span group if span.is_nothing then Nothing else span.end - ## Gets the UTF16 span matched by the group with the provided identifier, or + ## ICON metadata + Gets the UTF16 span matched by the group with the provided identifier, or a default value if the group did not participate in the match. If no such group exists for the provided identifier, a `No_Such_Group` is returned. @@ -145,6 +149,7 @@ type Match Utf_16_Span.Value range self.input ## GROUP Metadata + ICON metadata Gets the grapheme span matched by the group with the provided identifier, or a default value if the group did not participate in the match. If no such group exists for the provided identifier, a `No_Such_Group` is returned. @@ -179,6 +184,7 @@ type Match if result.is_nothing then default else result.to_grapheme_span ## GROUP Metadata + ICON metadata Gets the Text matched by the group with the provided identifier, or a default value if the group did not participate in the match. If no such group exists for the provided identifier, a `No_Such_Group` is returned. @@ -208,6 +214,7 @@ type Match if result.is_nothing then default else result.text ## GROUP Metadata + ICON metadata Gets a vector containing the Text of _all_ of the capturing groups in the pattern, replacing the value of groups that did not participate in the match with `default`. This vector includes group 0, which contains @@ -249,6 +256,7 @@ type Match group_numbers.map n-> (self.text n . if_nothing default) ## GROUP Metadata + ICON metadata Gets a map containing the named capturing groups for the pattern, replacing the value for groups that did not participate in the match with `default`. @@ -293,6 +301,7 @@ type Match self.text index . catch No_Such_Group (_-> if_missing) ## GROUP Selections + ICON split_text Gets the grapheme span matched by the group with the provided index, or a default value if the group did not participate in the match. If the identifier is invalid then Index_Out_Of_Bounds is thrown. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Span.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Span.enso index 56c226a2dbdf..5d385f6c1829 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Span.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Span.enso @@ -39,6 +39,7 @@ type Span Value (range : Range) (parent : Text) ## GROUP Metadata + ICON metadata The index of the first character included in the span. ! What is a Character? @@ -59,6 +60,7 @@ type Span end self = self.range.end ## GROUP Metadata + ICON metadata The length of the span in extended grapheme clusters. ! What is a Character? @@ -69,11 +71,13 @@ type Span length self = self.range.length ## GROUP Metadata + ICON metadata Returns the part of the text that this span covers. text : Text text self = self.to_utf_16_span.text ## ADVANCED + ICON convert Converts the span of extended grapheme clusters to a corresponding span of UTF-16 code units. @@ -111,6 +115,7 @@ type Utf_16_Span Value (range : Range) (parent : Text) ## GROUP Metadata + ICON metadata The index of the first code unit included in the span. start : Integer start self = self.range.start @@ -121,16 +126,19 @@ type Utf_16_Span end self = self.range.end ## GROUP Metadata + ICON metadata The length of the span in UTF-16 code units. length : Integer length self = self.range.length ## GROUP Metadata + ICON metadata Returns the part of the text that this span covers. text : Text text self = Text_Utils.substring self.parent self.start self.end ## GROUP Conversions + ICON convert Returns a span of extended grapheme clusters which is the closest approximation of this span of code units. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Date_Time_Formatter.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Date_Time_Formatter.enso index 0e6d818a384c..10a778d06f43 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Date_Time_Formatter.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Date_Time_Formatter.enso @@ -27,7 +27,8 @@ type Date_Time_Formatter ## PRIVATE Value (underlying : EnsoDateTimeFormatter) (~deferred_parsing_warnings = []) - ## Creates a formatter from a simple date-time format pattern. + ## ICON convert + Creates a formatter from a simple date-time format pattern. Every letter in the pattern is interpreted as a pattern character as described in the table below. Any character that is not a letter in the @@ -133,7 +134,8 @@ type Date_Time_Formatter As_Java_Formatter_Interpreter.interpret used_locale parsed Date_Time_Formatter.Value (EnsoDateTimeFormatter.new java_formatter pattern FormatterKind.SIMPLE) deferred_parsing_warnings=analyzer.get_parsing_only_warnings - ## Creates a formatter from a pattern for the ISO 8601 leap week calendar. + ## ICON convert + Creates a formatter from a pattern for the ISO 8601 leap week calendar. The ISO 8601 leap week calendar is a variation of the ISO 8601 calendar that defines a leap week as the week that contains the 29th of February. @@ -186,6 +188,7 @@ type Date_Time_Formatter Date_Time_Formatter.Value (EnsoDateTimeFormatter.new java_formatter pattern FormatterKind.ISO_WEEK_DATE) deferred_parsing_warnings=analyzer.get_parsing_only_warnings ## ADVANCED + ICON convert Creates a formatter from a Java `DateTimeFormatter` instance or a text pattern parsed using the Java parser: `DateTimeFormatter.ofPattern`. @@ -213,7 +216,8 @@ type Date_Time_Formatter Date_Time_Formatter.Value (EnsoDateTimeFormatter.new java_formatter pattern FormatterKind.RAW_JAVA) _ -> Error.throw (Illegal_Argument.Error "The pattern must either be a string or a Java DateTimeFormatter instance.") - ## The default format for date-time used in Enso. + ## ICON convert + The default format for date-time used in Enso. It acts as `ISO_Zoned_Date_Time` but both offset and timezone are optional. For example, it may parse date of the form `2011-12-03 10:15:30+01:00[Europe/Paris]`, @@ -222,7 +226,8 @@ type Date_Time_Formatter default_enso_zoned_date_time = Date_Time_Formatter.Value EnsoDateTimeFormatter.default_enso_zoned_date_time_formatter - ## The ISO 8601 format for date-time with offset and timezone. + ## ICON convert + The ISO 8601 format for date-time with offset and timezone. The date and time parts may be separated by a single space or a `T`. For example, it may parse date of the form `2011-12-03 10:15:30+01:00[Europe/Paris]`. @@ -230,7 +235,8 @@ type Date_Time_Formatter iso_zoned_date_time = Date_Time_Formatter.Value (EnsoDateTimeFormatter.makeISOConstant DateTimeFormatter.ISO_ZONED_DATE_TIME "iso_zoned_date_time") - ## The ISO 8601 format for date-time with offset. + ## ICON convert + The ISO 8601 format for date-time with offset. The date and time parts may be separated by a single space or a `T`. For example, it may parse date of the form `2011-12-03 10:15:30+01:00`. @@ -238,7 +244,8 @@ type Date_Time_Formatter iso_offset_date_time = Date_Time_Formatter.Value (EnsoDateTimeFormatter.makeISOConstant DateTimeFormatter.ISO_OFFSET_DATE_TIME "iso_offset_date_time") - ## The ISO 8601 format for date-time without a timezone. + ## ICON convert + The ISO 8601 format for date-time without a timezone. The date and time parts may be separated by a single space or a `T`. For example, it may parse date of the form `2011-12-03 10:15:30`. The @@ -247,14 +254,16 @@ type Date_Time_Formatter iso_local_date_time = Date_Time_Formatter.Value (EnsoDateTimeFormatter.makeISOConstant DateTimeFormatter.ISO_LOCAL_DATE_TIME "iso_local_date_time") - ## The ISO 8601 format for date. + ## ICON convert + The ISO 8601 format for date. For example, it may parse date of the form `2011-12-03`. iso_date : Date_Time_Formatter iso_date = Date_Time_Formatter.Value (EnsoDateTimeFormatter.makeISOConstant DateTimeFormatter.ISO_DATE "iso_date") - ## The ISO 8601 format for time. + ## ICON convert + The ISO 8601 format for time. For example, it may parse time of the form `10:15:30`. iso_time : Date_Time_Formatter @@ -281,7 +290,8 @@ type Date_Time_Formatter to_display_text : Text to_display_text self = self.to_text - ## Returns a copy of this formatter with a changed locale. + ## ICON convert + Returns a copy of this formatter with a changed locale. with_locale : Locale -> Date_Time_Formatter with_locale self (locale : Locale) = Date_Time_Formatter.Value (self.underlying.withLocale locale.java_locale) 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 4fe3543bafd7..79d214e5a3fe 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 @@ -57,6 +57,7 @@ type Period Period.Value (Java_Period.between start_date_inclusive end_date_exclusive) ## GROUP DateTime + ICON date_and_time Create a new Period from years, months and days. Arguments: @@ -82,6 +83,7 @@ type Period Value (internal_period : Java_Period) ## GROUP DateTime + ICON date_and_time Get the portion of the period expressed in years. years : Integer years self = self.internal_period.getYears @@ -93,6 +95,7 @@ type Period months self = self.internal_period.getMonths ## GROUP DateTime + ICON date_and_time Get the portion of the period coming from months and years as months (every year is translated to 12 months). total_months : Integer @@ -167,6 +170,7 @@ type Period Period.Value (self.internal_period.multipliedBy factor) ## GROUP Operators + ICON operators Negate all amounts in the period. This is useful when a period used for going forward in time needs to be diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Vector.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Vector.enso index c3da939ce8d9..05264d1b6b8c 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Vector.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Vector.enso @@ -542,6 +542,7 @@ type Vector a Array_Like_Helpers.partition_with_index self predicate ## GROUP Selections + ICON dataframe_map_row Swaps the rows and columns of a matrix represented by a vector of vectors. ! Error Conditions @@ -615,7 +616,8 @@ type Vector a map self function on_problems=Problem_Behavior.Report_Error = Array_Like_Helpers.map self function on_problems - ## Applies a function to each element of the vector, returning the `Vector` + ## ICON dataframes_union + Applies a function to each element of the vector, returning the `Vector` that contains all results concatenated. Arguments: @@ -805,7 +807,7 @@ type Vector a Array_Like_Helpers.plus self that ## GROUP Calculations - ICON add_row + ICON row_add Inserts the given item into the vector at the given index. Arguments: @@ -826,7 +828,7 @@ type Vector a Array_Like_Helpers.insert self at item ## GROUP Selections - ICON select_column + ICON table_clean Removes the item at the given index from the vector. Arguments: @@ -870,7 +872,7 @@ type Vector a slice : Integer -> Integer -> Vector Any slice self start end = Array_Like_Helpers.slice self start end - ## ALIAS first, last, sample, slice, top, head, tail, limit + ## ALIAS first, head, last, limit, sample, slice, tail, top GROUP Selections ICON select_row Creates a new `Vector` with only the specified range of elements from the @@ -1196,11 +1198,13 @@ type Builder not_empty self = self.is_empty.not ## GROUP Metadata + ICON metadata Gets the current length of the builder. length : Integer length self = self.java_builder.getSize - ## Appends a new element into this builder and returns it, propagating any + ## ICON join + Appends a new element into this builder and returns it, propagating any errors that the provided element could have contained. Arguments: @@ -1217,7 +1221,8 @@ type Builder self.unsafe_append item self - ## Appends a part of a given vector to this builder + ## ICON join + Appends a part of a given vector to this builder Arguments: - vector: The vector from which the elements are sourced. @@ -1275,6 +1280,7 @@ type Builder Error.throw (Index_Out_Of_Bounds.Error index self.length) ## GROUP Selections + ICON select_row Get the first element from the vector, or an `Index_Out_Of_Bounds` if the vector is empty. @@ -1286,6 +1292,7 @@ type Builder first self = self.at 0 ## GROUP Selections + ICON select_row Get the last element of the vector, or an `Index_Out_Of_Bounds` if the vector is empty. @@ -1310,6 +1317,7 @@ type Builder 0.up_to self.length . any (idx -> (predicate (self.java_builder.get idx))) ## GROUP Conversions + ICON convert Converts this builder to a vector containing all the appended elements. > Example diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/XML.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/XML.enso index 9f51e038ab07..8a9f5facfc1f 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/XML.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/XML.enso @@ -125,6 +125,7 @@ type XML_Document XML_Element.new java_element ## GROUP Metadata + ICON metadata Gets the tag of the root XML element of the document. > Example @@ -136,6 +137,7 @@ type XML_Document name self = self.root_element.name ## GROUP Selections + ICON parse3 Gets a child element of an XML document. Arguments: @@ -162,6 +164,7 @@ type XML_Document _ : Text -> if key == self.root_element.name then self.root_element else if_missing ## GROUP Selections + ICON parse3 Gets a child or attribute of an XML document. Arguments: @@ -190,7 +193,8 @@ type XML_Document _ : Text -> Error.throw (No_Such_Key.Error self key) self.get key if_missing - ## Gets the raw XML of the document. + ## ICON metadata + Gets the raw XML of the document. > Example Get the outer XML of the document. @@ -202,7 +206,8 @@ type XML_Document XML_Error.handle_java_exceptions <| XML_Utils.outerXML self.java_document False - ## Gets the raw XML of the document. + ## ICON metadata + Gets the raw XML of the document. > Example Get the inner XML of the document. @@ -257,6 +262,7 @@ type XML_Document write_impl self.java_document path encoding on_existing_file include_xml_declaration on_problems ## GROUP Selections + ICON array_new Gets the child elements of an XML document. > Example @@ -266,6 +272,7 @@ type XML_Document children self = [self.root_element] ## GROUP Metadata + ICON metadata Gets the number children of an XML document. `child_count` only counts child elements and child text nodes that are @@ -281,11 +288,13 @@ type XML_Document child_count self = 1 ## GROUP Metadata + ICON text Gets the unique set of child names of an XML document. child_names : Vector Text ! XML_Error child_names self = [self.root_element.name] ## GROUP Selections + ICON parse3 Get an attribute of an XML document. Arguments: @@ -302,17 +311,20 @@ type XML_Document attribute_names self = [] ## GROUP Selections + ICON array_new Gets a map containing of the attributes of an XML document. attributes : Map Text Text ! XML_Error attributes self = Map.empty ## GROUP Selections + ICON metadata Gets the text (non-markup) contents of the element and its descendants, if any. text : Text ! XML_Error text self = self.root_element.text - ## Get elements denoted by the given XPath key. + ## ICON parse3 + Get elements denoted by the given XPath key. Arguments: - key: The XPath string to use to search for elements. @@ -329,7 +341,8 @@ type XML_Document xpath = XPathFactory.newInstance.newXPath only_wanted_nodes (xpath.evaluate key self.java_document XPathConstants.NODESET) - ## Gets child elements matching a given tag name. + ## ICON parse3 + Gets child elements matching a given tag name. Arguments: - tag_name: The tag name to search for. @@ -338,7 +351,8 @@ type XML_Document get_children_by_tag_name self tag_name:Text = if tag_name=="*" || tag_name==self.root_element.name then [self.root_element] else [] - ## Gets descendant elements matching a given tag name. + ## ICON parse3 + Gets descendant elements matching a given tag name. This searches through all descendants of the node, not just immediate children. Arguments: @@ -405,7 +419,7 @@ type XML_Element self.children.find (c-> c.name == key) . if_nothing if_missing ## GROUP Selections - ICON select_row + ICON parse3 Gets a child or attribute of an XML element. Arguments: @@ -464,6 +478,7 @@ type XML_Element child_count self = self.children_cache.length ## GROUP Metadata + ICON text Gets the unique set of child names of an XML element. child_names : Vector Text ! XML_Error child_names self = @@ -616,7 +631,8 @@ type XML_Element xpath = XPathFactory.newInstance.newXPath only_wanted_nodes (xpath.evaluate key self.java_element XPathConstants.NODESET) - ## Gets child elements matching a given tag name. + ## ICON parse3 + Gets child elements matching a given tag name. Arguments: - tag_name: The tag name to search for. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Data_Link.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Data_Link.enso index 6ed356e2b6eb..03f1b82fefd7 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Data_Link.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Data_Link.enso @@ -14,16 +14,16 @@ import project.Errors.Unimplemented.Unimplemented import project.Meta import project.Nothing.Nothing import project.Panic.Panic +import project.System.File.Data_Link_Access.Data_Link_Access import project.System.File.File import project.System.File.File_Access.File_Access -import project.System.File.Data_Link_Access.Data_Link_Access +import project.System.File.Generic.File_Like.File_Like +import project.System.File.Generic.Writable_File.Writable_File import project.System.File_Format.Auto_Detect import project.System.File_Format.Infer import project.System.File_Format.JSON_Format -import project.System.File_Format_Metadata.File_Format_Metadata import project.System.File_Format_Metadata.Content_Type_Metadata -import project.System.File.Generic.File_Like.File_Like -import project.System.File.Generic.Writable_File.Writable_File +import project.System.File_Format_Metadata.File_Format_Metadata import project.System.Input_Stream.Input_Stream from project.Data.Boolean import Boolean, False, True from project.Data.Text.Extensions import all diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Enso_File.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Enso_File.enso index f6d0c8226097..5e0f742c6a35 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Enso_File.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Enso_File.enso @@ -39,7 +39,8 @@ from project.System.File_Format import Auto_Detect, Bytes, File_Format, Plain_Te from project.System.File.Generic.File_Write_Strategy import generic_copy type Enso_File - ## Resolves an `enso://` path and returns the corresponding `Enso_File` + ## ICON data_input + Resolves an `enso://` path and returns the corresponding `Enso_File` instance. Arguments: @@ -68,11 +69,13 @@ type Enso_File Represents a file or folder within the Enso cloud. Value name:Text id:Text organization:Text asset_type:Enso_Asset_Type - ## Represents the root folder of the current users. + ## ICON folder + Represents the root folder of the current users. root : Enso_File root = Enso_File.Value "/" "" "" Enso_Asset_Type.Directory - ## Represents the current working directory. + ## ICON folder + Represents the current working directory. If the workflow is running on the Cloud, this will be the directory containing the current project. @@ -99,6 +102,7 @@ type Enso_File Enso_Asset_Type.Secret -> Error.throw (Illegal_Argument.Error "Secrets cannot be accessed directly.") ## GROUP Metadata + ICON metadata Checks if the folder or file exists exists : Boolean exists self = @@ -106,6 +110,7 @@ type Enso_File response.code.is_success ## GROUP Metadata + ICON metadata Gets the size of a file in bytes. size : Integer size self -> Integer = if self.is_regular_file.not then Error.throw (Illegal_Argument.Error "`size` can only be queried for regular files.") else @@ -113,6 +118,7 @@ type Enso_File get_required_field "size" metadata expected_type=Integer ## GROUP Metadata + ICON metadata Gets the creation time of a file. creation_time : Date_Time creation_time self -> Date_Time = if self.is_directory then Unimplemented.throw "Enso_File.creation_time is not implemented yet for directories." else @@ -121,6 +127,7 @@ type Enso_File . catch Time_Error error-> Error.throw (Enso_Cloud_Error.Invalid_Response_Payload error) ## GROUP Metadata + ICON metadata Gets the last modified time of a file. last_modified_time : Date_Time last_modified_time self = if self.is_directory then Unimplemented.throw "Enso_File.last_modified_time is not implemented yet for directories." else @@ -129,26 +136,31 @@ type Enso_File . catch Time_Error error-> Error.throw (Enso_Cloud_Error.Invalid_Response_Payload error) ## GROUP Metadata + ICON metadata Checks if this is a folder is_directory : Boolean is_directory self = self.asset_type == Enso_Asset_Type.Directory ## GROUP Metadata + ICON metadata Checks if this is a regular file is_regular_file : Boolean is_regular_file self = self.asset_type == Enso_Asset_Type.File ## GROUP Metadata + ICON folder Finds the parent Enso_File for this file. parent : Enso_File | Nothing parent self = Unimplemented.throw "Enso_File.parent is not implemented" ## GROUP Metadata + ICON metadata Returns the path of this file. path : Text path self = Unimplemented.throw "Enso_File.path is not implemented" ## GROUP Metadata + ICON metadata Checks if `self` is a descendant of `other`. is_descendant_of : Enso_File -> Boolean is_descendant_of self (other : Enso_File) = @@ -260,6 +272,7 @@ type Enso_File self.read (Plain_Text_Format.Plain_Text encoding) on_problems ## GROUP Metadata + ICON metadata Returns the extension of the file. extension : Text extension self = case self.asset_type of @@ -274,6 +287,7 @@ type Enso_File if extension == "." then "" else extension ## GROUP Input + ICON data_input Gets a list of assets within self. list : Vector Enso_File list self = @@ -299,7 +313,8 @@ type Enso_File response = Utils.http_request HTTP_Method.Delete self.internal_uri response.if_not_error Nothing - ## Deletes the file if it had existed. + ## ICON data_output + Deletes the file if it had existed. delete_if_exists : Nothing delete_if_exists self = r = self.delete @@ -307,7 +322,8 @@ type Enso_File File_Error.Not_Found _ -> Nothing _ -> r - ## Copies the file to the specified destination. + ## ICON data_output + Copies the file to the specified destination. Arguments: - destination: the destination to move the file to. @@ -317,7 +333,8 @@ type Enso_File copy_to self (destination : Writable_File) (replace_existing : Boolean = False) = generic_copy self destination.file replace_existing - ## Moves the file to the specified destination. + ## ICON data_output + Moves the file to the specified destination. Arguments: - destination: the destination to move the file to. @@ -339,7 +356,8 @@ type Enso_File if name.contains "/" then Error.throw (Illegal_Argument.Error "Resolving sub-paths (/) is not implemented. Temporary workaround: use the `/` operator multiple times.") else self.list . find f-> f.name == name - ## Returns the text representation of the file descriptor. + ## PRIVATE + Returns the text representation of the file descriptor. to_text : Text to_text self -> Text = if self == Enso_File.root then "Cloud Root Directory" else diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Enso_Secret.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Enso_Secret.enso index 0e586aca8f85..8e41fd568213 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Enso_Secret.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Enso_Secret.enso @@ -18,7 +18,7 @@ import project.Runtime.Context from project.Data.Boolean import Boolean, False, True from project.Data.Text.Extensions import all from project.Enso_Cloud.Enso_File import list_assets -from Standard.Base.Metadata import make_single_choice +from project.Metadata import make_single_choice polyglot java import org.enso.base.enso_cloud.EnsoSecretHelper polyglot java import org.enso.base.enso_cloud.HideableValue diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Enso_User.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Enso_User.enso index e7155e824218..3daa4a377904 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Enso_User.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Enso_User.enso @@ -24,13 +24,15 @@ type Enso_User - is_enabled: Whether the user is enabled. User name:Text email:Text id:Text home:Enso_File is_enabled:Boolean=True - ## Fetch the current user. + ## ICON people + Fetch the current user. current : Enso_User current = json = Utils.http_request_as_json HTTP_Method.Get (Utils.cloud_root_uri + "users/me") Enso_User.from json - ## Lists all known users. + ## ICON people + Lists all known users. list : Vector Enso_User list = json = Utils.http_request_as_json HTTP_Method.Get (Utils.cloud_root_uri + "users") diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Errors.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Errors.enso index 3ecb7dad55aa..d9688d866894 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Errors.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Enso_Cloud/Errors.enso @@ -19,6 +19,7 @@ type Cloud_Session_Expired The `underlying_error` is not shown in the error message, but is saved for debugging purposes. Error underlying_error + ## PRIVATE to_display_text : Text to_display_text self = "Login session with Enso Cloud has expired. Please log in again and restart." diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Function.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Function.enso index 23e1fb6780d3..1f6338d8c7a7 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Function.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Function.enso @@ -11,6 +11,7 @@ type Function ## ADVANCED GROUP Operators + ICON operators Applies the function `self` to the provided argument. Arguments: @@ -32,6 +33,7 @@ type Function ## ADVANCED GROUP Operators + ICON operators Composes two functions together, for `f << g` creating the function composition `f ∘ g` (equivalent to `x -> f (g x)`). @@ -47,6 +49,7 @@ type Function ## ADVANCED GROUP Operators + ICON operators Composes two functions together in the forward direction, for `f >> g` creating the function composition `g ∘ f` (equivalent to `x -> g (f (x))`). diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Data_Read_Helpers.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Data_Read_Helpers.enso index 88a4ae3bb913..d670ec4ad0be 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Data_Read_Helpers.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Data_Read_Helpers.enso @@ -12,14 +12,13 @@ import project.Network.HTTP.HTTP import project.Network.HTTP.HTTP_Method.HTTP_Method import project.Network.URI.URI import project.Warning.Warning +from project.Data import Raw_Response from project.Data.Boolean import Boolean, False, True from project.Data.Text.Extensions import all -from project.Data import Raw_Response from project.Metadata.Choice import Option from project.Metadata.Widget import Single_Choice from project.System.File_Format import Auto_Detect, format_types - ## PRIVATE looks_like_uri path:Text -> Boolean = (path.starts_with "http://" Case_Sensitivity.Insensitive) || (path.starts_with "https://" Case_Sensitivity.Insensitive) diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Main.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Main.enso index e76a5aa335fe..7a028533156a 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Main.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Main.enso @@ -92,12 +92,12 @@ import project.System.Platform import project.System.Process import project.System.Process.Exit_Code.Exit_Code import project.Warning.Warning +from project.Data import Raw_Response from project.Data.Index_Sub_Range.Index_Sub_Range import First, Last from project.Data.Json.Extensions import all from project.Data.Range.Extensions import all from project.Data.Text.Extensions import all from project.Data.Text.Regex import regex -from project.Data import Raw_Response from project.Errors.Problem_Behavior.Problem_Behavior import all from project.Meta.Enso_Project import enso_project from project.Network.Extensions import all @@ -197,13 +197,14 @@ from project.Data.Index_Sub_Range.Index_Sub_Range export First, Last from project.Data.Json.Extensions export all from project.Data.Numbers export Float, Integer, Number from project.Data.Range.Extensions export all +from project.Data export Raw_Response from project.Data.Statistics export all hiding to_moment_statistic, wrap_java_call, calculate_correlation_statistics, calculate_spearman_rank, calculate_correlation_statistics_matrix, compute_fold, empty_value, is_valid from project.Data.Text.Extensions export all from project.Data.Text.Regex export regex -from project.Data export Raw_Response from project.Errors.Problem_Behavior.Problem_Behavior export all from project.Function export all from project.Meta.Enso_Project export enso_project from project.Network.Extensions export all from project.System.File_Format export Auto_Detect, Bytes, File_Format, Infer, JSON_Format, Plain_Text_Format from project.System.File_Format.Plain_Text_Format export Plain_Text + diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Math.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Math.enso index ab2307f32363..0eac744b436c 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Math.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Math.enso @@ -1,7 +1,8 @@ import project.Data.Numbers.Float import project.Data.Numbers.Number -## The mathematical constant pi, equal to the ratio of a circle circumference +## ICON math + The mathematical constant pi, equal to the ratio of a circle circumference to its diameter. > Example @@ -11,7 +12,8 @@ import project.Data.Numbers.Number pi : Float pi = 3.1415926535897932385 -## The mathematical constant e, the base of the natural logarithm. +## ICON math + The mathematical constant e, the base of the natural logarithm. > Example Calculating the natural logarithm of 3. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Meta.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Meta.enso index b0a68d7d7e82..fd16e7025bed 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Meta.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Meta.enso @@ -36,6 +36,7 @@ type Type ## ADVANCED GROUP Metadata + ICON metadata Returns a vector of method names that can be invoked on instances of this type. @@ -63,6 +64,7 @@ type Type ## ADVANCED GROUP Metadata + ICON metadata Returns the fully qualified name of the type. qualified_name : Text @@ -72,6 +74,7 @@ type Type ## ADVANCED GROUP Metadata + ICON metadata Returns the short name of the type. name : Text @@ -81,6 +84,7 @@ type Type ## ADVANCED GROUP Metadata + ICON find Finds type specified by fully qualified name. Searches all the types known to the system by transitive closure @@ -107,6 +111,7 @@ type Atom ## ADVANCED GROUP Metadata + ICON metadata Returns a vector of field values of the given atom. fields : Vector @@ -132,6 +137,7 @@ type Constructor ## ADVANCED GROUP Metadata + ICON metadata Returns a vector of field names defined by a constructor. fields : Vector @@ -141,6 +147,7 @@ type Constructor ## ADVANCED GROUP Metadata + ICON metadata Returns the name of a constructor. name : Text @@ -162,6 +169,7 @@ type Constructor ## ADVANCED GROUP Metadata + ICON metadata Returns the type that this constructor is a part of. declaring_type : Type declaring_type self = @@ -202,6 +210,7 @@ type Unresolved_Symbol ## ADVANCED GROUP Metadata + ICON metadata Returns the name of an unresolved symbol. name : Text @@ -209,6 +218,7 @@ type Unresolved_Symbol ## ADVANCED GROUP Metadata + ICON metadata Returns the definition scope of an unresolved symbol. scope : Any @@ -216,6 +226,7 @@ type Unresolved_Symbol ## ADVANCED GROUP Metadata + ICON metadata Starts building an instrumentation for a given node instrument : Instrumentor @@ -243,6 +254,7 @@ type Polyglot ## ADVANCED GROUP Metadata + ICON metadata Returns the language with which a polyglot value is associated. get_language : Language @@ -251,6 +263,7 @@ type Polyglot if lang_str == "java" then Language.Java else Language.Unknown ## ADVANCED + ICON metadata Checks whether `self` represents the same underlying reference as `value`. @@ -261,6 +274,7 @@ Any.is_same_object_as : Any -> Boolean Any.is_same_object_as self value = is_same_object self value ## ADVANCED + ICON metadata Checks if `self` is an instance of `typ`. @@ -270,6 +284,7 @@ Any.is_a : Any -> Boolean Any.is_a self typ = is_a self typ ## ADVANCED + ICON metadata Checks if `self` is an instance of `typ`. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Meta/Enso_Project.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Meta/Enso_Project.enso index e83d1d1c6415..e6e5aa2ce06d 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Meta/Enso_Project.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Meta/Enso_Project.enso @@ -48,6 +48,7 @@ type Project_Description Value prim_root_file prim_config ## GROUP Metadata + ICON folder Returns the root directory of the project. > Example @@ -58,6 +59,7 @@ type Project_Description root self = File.new self.prim_root_file ## GROUP Input + ICON folder Returns the root data directory of the project. > Example @@ -68,6 +70,7 @@ type Project_Description data self = self.root / "data" ## GROUP Metadata + ICON metadata Returns the name of the project. > Example @@ -78,6 +81,7 @@ type Project_Description name self = self.prim_config.name ## GROUP Metadata + ICON metadata Returns the namespace of the project. > Example diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/Extensions.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/Extensions.enso index 1f4f0b1baa4f..f116617483bf 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/Extensions.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/Extensions.enso @@ -47,7 +47,7 @@ URI.fetch : HTTP_Method -> Vector (Header | Pair Text Text) -> File_Format -> An URI.fetch self (method:HTTP_Method=HTTP_Method.Get) headers=[] format=Auto_Detect = Data.fetch self method headers format -## ALIAS upload, http post +## ALIAS http post, upload GROUP Output ICON data_upload Writes the provided data to the provided URI. Returns the response, diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP.enso index b847a5982613..7c56510c72fb 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP.enso @@ -86,6 +86,7 @@ type HTTP Value timeout follow_redirects proxy version custom_ssl_context ## ADVANCED + ICON data_download Sends a request using the HTTP client. The response body will contain a raw Input_Stream which can be read once. Please note, this must be closed after use (either directly or via the diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/HTTP_Status_Code.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/HTTP_Status_Code.enso index 791b63a6b7e4..0887df212475 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/HTTP_Status_Code.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/HTTP_Status_Code.enso @@ -4,7 +4,8 @@ import project.Data.Text.Text from project.Data.Text.Extensions import all type HTTP_Status_Code - ## 100 Continue. + ## ICON data_download + 100 Continue. continue : HTTP_Status_Code continue = HTTP_Status_Code.Value 100 @@ -12,39 +13,48 @@ type HTTP_Status_Code switching_protocols : HTTP_Status_Code switching_protocols = HTTP_Status_Code.Value 101 - ## 200 OK. + ## ICON data_download + 200 OK. ok : HTTP_Status_Code ok = HTTP_Status_Code.Value 200 - ## 201 Created. + ## ICON data_download + 201 Created. created : HTTP_Status_Code created = HTTP_Status_Code.Value 201 - ## 202 Accepted. + ## ICON data_download + 202 Accepted. accepted : HTTP_Status_Code accepted = HTTP_Status_Code.Value 202 - ## 203 Non-Authoritative Information. + ## ICON data_download + 203 Non-Authoritative Information. non_authoritative_information : HTTP_Status_Code non_authoritative_information = HTTP_Status_Code.Value 203 - ## 204 No Content. + ## ICON data_download + 204 No Content. no_content : HTTP_Status_Code no_content = HTTP_Status_Code.Value 204 - ## 205 Reset Content. + ## ICON data_download + 205 Reset Content. reset_content : HTTP_Status_Code reset_content = HTTP_Status_Code.Value 205 - ## 206 Partial Content. + ## ICON data_download + 206 Partial Content. partial_content : HTTP_Status_Code partial_content = HTTP_Status_Code.Value 206 - ## 300 Multiple Choices. + ## ICON data_download + 300 Multiple Choices. multiple_choices : HTTP_Status_Code multiple_choices = HTTP_Status_Code.Value 300 - ## 301 Moved Permanently. + ## ICON data_download + 301 Moved Permanently. moved_permanently : HTTP_Status_Code moved_permanently = HTTP_Status_Code.Value 301 @@ -52,31 +62,38 @@ type HTTP_Status_Code found : HTTP_Status_Code found = HTTP_Status_Code.Value 302 - ## 303 See Other. + ## ICON data_download + 303 See Other. see_other : HTTP_Status_Code see_other = HTTP_Status_Code.Value 303 - ## 304 Not Modified. + ## ICON data_download + 304 Not Modified. not_modified : HTTP_Status_Code not_modified = HTTP_Status_Code.Value 304 - ## 305 Use Proxy. + ## ICON data_download + 305 Use Proxy. use_proxy : HTTP_Status_Code use_proxy = HTTP_Status_Code.Value 305 - ## 307 Temporary Redirect. + ## ICON data_download + 307 Temporary Redirect. temporary_redirect : HTTP_Status_Code temporary_redirect = HTTP_Status_Code.Value 307 - ## 400 Bad Request. + ## ICON data_download + 400 Bad Request. bad_request : HTTP_Status_Code bad_request = HTTP_Status_Code.Value 400 - ## 401 Unauthorized. + ## ICON data_download + 401 Unauthorized. unauthorized : HTTP_Status_Code unauthorized = HTTP_Status_Code.Value 401 - ## 402 Payment Required. + ## ICON data_download + 402 Payment Required. payment_required : HTTP_Status_Code payment_required = HTTP_Status_Code.Value 402 @@ -84,27 +101,33 @@ type HTTP_Status_Code forbidden : HTTP_Status_Code forbidden = HTTP_Status_Code.Value 403 - ## 404 Not Found. + ## ICON data_download + 404 Not Found. not_found : HTTP_Status_Code not_found = HTTP_Status_Code.Value 404 - ## 405 Method Not Allowed. + ## ICON data_download + 405 Method Not Allowed. method_not_allowed : HTTP_Status_Code method_not_allowed = HTTP_Status_Code.Value 405 - ## 406 Not Acceptable. + ## ICON data_download + 406 Not Acceptable. not_acceptable : HTTP_Status_Code not_acceptable = HTTP_Status_Code.Value 406 - ## 407 Proxy Authentication Required. + ## ICON data_download + 407 Proxy Authentication Required. proxy_authentication_required : HTTP_Status_Code proxy_authentication_required = HTTP_Status_Code.Value 407 - ## 408 Request Timeout. + ## ICON data_download + 408 Request Timeout. request_timeout : HTTP_Status_Code request_timeout = HTTP_Status_Code.Value 408 - ## 409 Conflict. + ## ICON data_download + 409 Conflict. conflict : HTTP_Status_Code conflict = HTTP_Status_Code.Value 409 @@ -112,27 +135,33 @@ type HTTP_Status_Code gone : HTTP_Status_Code gone = HTTP_Status_Code.Value 410 - ## 411 Length Required. + ## ICON data_download + 411 Length Required. length_required : HTTP_Status_Code length_required = HTTP_Status_Code.Value 411 - ## 412 Precondition Failed. + ## ICON data_download + 412 Precondition Failed. precondition_failed : HTTP_Status_Code precondition_failed = HTTP_Status_Code.Value 412 - ## 413 Request Entity Too Large. + ## ICON data_download + 413 Request Entity Too Large. request_entity_too_large : HTTP_Status_Code request_entity_too_large = HTTP_Status_Code.Value 413 - ## 414 Request-URI Too Long. + ## ICON data_download + 414 Request-URI Too Long. request_uri_too_long : HTTP_Status_Code request_uri_too_long = HTTP_Status_Code.Value 414 - ## 415 Unsupported Media Type. + ## ICON data_download + 415 Unsupported Media Type. unsupported_media_type : HTTP_Status_Code unsupported_media_type = HTTP_Status_Code.Value 415 - ## 416 Requested Range Not Satisfiable. + ## ICON data_download + 416 Requested Range Not Satisfiable. requested_range_not_satisfiable : HTTP_Status_Code requested_range_not_satisfiable = HTTP_Status_Code.Value 416 @@ -144,23 +173,28 @@ type HTTP_Status_Code internal_server_error : HTTP_Status_Code internal_server_error = HTTP_Status_Code.Value 500 - ## 501 Not Implemented. + ## ICON data_download + 501 Not Implemented. not_implemented : HTTP_Status_Code not_implemented = HTTP_Status_Code.Value 501 - ## 502 Bad Gateway. + ## ICON data_download + 502 Bad Gateway. bad_gateway : HTTP_Status_Code bad_gateway = HTTP_Status_Code.Value 502 - ## 503 Service Unavailable. + ## ICON data_download + 503 Service Unavailable. service_unavailable : HTTP_Status_Code service_unavailable = HTTP_Status_Code.Value 503 - ## 504 Gateway Timeout + ## ICON data_download + 504 Gateway Timeout gateway_timeout : HTTP_Status_Code gateway_timeout = HTTP_Status_Code.Value 504 - ## 505 HTTP Version Not Supported. + ## ICON data_download + 505 HTTP Version Not Supported. http_version_not_supported : HTTP_Status_Code http_version_not_supported = HTTP_Status_Code.Value 505 @@ -170,7 +204,8 @@ type HTTP_Status_Code - code: The numeric representation of the code. Value code:Integer - ## Does the status code represent a successful response? + ## ICON data_download + Does the status code represent a successful response? is_success : Boolean is_success self = self.code >= 200 && self.code < 300 diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Header.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Header.enso index b3819c589067..034ef52be7dc 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Header.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Header.enso @@ -22,6 +22,7 @@ type Header Value name:Text value:(Text|Enso_Secret|Derived_Secret_Value) ## ALIAS build a header + ICON text_input Create a new Header. @@ -38,7 +39,8 @@ type Header new : Text -> Text | Enso_Secret | Derived_Secret_Value -> Header new name:Text value:(Text | Enso_Secret | Derived_Secret_Value) = Header.Value name value - ## Create an "Accept" header. + ## ICON text_input + Create an "Accept" header. Arguments: - value: The value for the accept header. @@ -52,7 +54,8 @@ type Header accept : Text -> Header accept value = Header.Value "Accept" value - ## Create a header that accepts all (`"*/*"`). + ## ICON text_input + Create a header that accepts all (`"*/*"`). > Example Create an accept all header. @@ -64,6 +67,7 @@ type Header accept_all = Header.accept "*/*" ## ALIAS build an auth header + ICON text_input Create an "Authorization" header. @@ -79,7 +83,8 @@ type Header authorization : Text | Enso_Secret | Derived_Secret_Value -> Header authorization (value : Text | Enso_Secret | Derived_Secret_Value) = Header.Value "Authorization" value - ## Create HTTP basic auth header. + ## ICON text_input + Create HTTP basic auth header. Arguments: - user: The username. @@ -97,7 +102,8 @@ type Header value = (Derived_Secret_Value.from "Basic ") + (Derived_Secret_Value.Base_64_Encode pair) Header.authorization value.simplify - ## Create bearer token auth header. + ## ICON text_input + Create bearer token auth header. Arguments: - token: The token. @@ -106,7 +112,8 @@ type Header value = ((Derived_Secret_Value.from "Bearer ") + (Derived_Secret_Value.from token)) Header.authorization value.simplify - ## Create "Content-Type" header. + ## ICON text_input + Create "Content-Type" header. Arguments: - value: The value for the content type header. @@ -125,7 +132,8 @@ type Header charset = if encoding.is_nothing then "" else "; charset="+encoding.character_set Header.Value Header.content_type_header_name value+charset - ## Header "Content-Type: application/json". + ## ICON text_input + Header "Content-Type: application/json". > Example Create a header with content type "application/json". @@ -136,7 +144,8 @@ type Header application_json : Header application_json = Header.content_type "application/json" - ## Header "Content-Type: application/octet-stream". + ## ICON text_input + Header "Content-Type: application/octet-stream". > Example Create a header with content type "application/octet-stream". @@ -147,7 +156,8 @@ type Header application_octet_stream : Header application_octet_stream = Header.content_type "application/octet-stream" - ## Header "Content-Type: application/x-www-form-urlencoded". + ## ICON text_input + Header "Content-Type: application/x-www-form-urlencoded". > Example Create a header with content type "application/x-www-form-urlencoded". @@ -158,7 +168,8 @@ type Header application_x_www_form_urlencoded : Header application_x_www_form_urlencoded = Header.content_type "application/x-www-form-urlencoded" - ## Header "Content-Type: multipart/form-data". + ## ICON text_input + Header "Content-Type: multipart/form-data". Arguments: - boundary: The text that delimits boundaries between the parts of the form. @@ -174,7 +185,8 @@ type Header if boundary == "" then Header.content_type "multipart/form-data" else Header.content_type ("multipart/form-data; boundary=" + boundary) - ## Header "Content-Type: text/plain". + ## ICON text_input + Header "Content-Type: text/plain". > Example Create a header with the content type "text/plain". diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Request.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Request.enso index f60fece99c35..d2b0cb384861 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Request.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Request.enso @@ -36,7 +36,8 @@ type Request new (method:HTTP_Method) (url:URI) (headers:(Vector Header)=[]) (body:Request_Body=Request_Body.Empty) = Request.Value method url headers body - ## Create an Options request. + ## ICON find + Create an Options request. Arguments: @@ -103,7 +104,8 @@ type Request post : (Text | URI) -> Request_Body -> Vector -> Request post url body (headers = []) = Request.new HTTP_Method.Post url headers body - ## Create a Put request. + ## ICON data_upload + Create a Put request. Arguments: - url: The address for the request. @@ -121,7 +123,8 @@ type Request put : (Text | URI) -> Request_Body -> Vector -> Request put url body (headers = []) = Request.new HTTP_Method.Put url headers body - ## Create a Delete request. + ## ICON trash + Create a Delete request. Arguments: - url: The address for the request. @@ -148,7 +151,8 @@ type Request - body: The body of the request. Value (method : HTTP_Method) (uri : URI) (headers : Vector) (body : Request_Body) - ## Sets the header for the request. + ## ICON edit + Sets the header for the request. Arguments: - key: The name for the header in this request. @@ -172,7 +176,8 @@ type Request Pair.Value acc False -> acc + [new_header] Request.Value self.method self.uri new_headers self.body - ## Sets the headers in the request. + ## ICON edit + Sets the headers in the request. Arguments: - new_headers: A vector of headers to put in the request. If `self` has @@ -189,7 +194,8 @@ type Request update_header req new_header = req.with_header new_header.name new_header.value new_headers.fold self update_header - ## Set the body for the request. + ## ICON edit + Set the body for the request. Arguments: - new_body: The body to insert into the request. @@ -206,7 +212,8 @@ type Request with_body : Request_Body -> Request with_body self new_body = Request.Value self.method self.uri self.headers new_body - ## Set the body text in the request encoded as "application/json". + ## ICON edit + Set the body text in the request encoded as "application/json". Arguments: - json_body: The body to add to the request. It must be textual JSON. @@ -225,7 +232,8 @@ type Request new_body = Request_Body.Json json_body Request.Value self.method self.uri self.headers new_body . with_headers [Header.application_json] - ## Set body as vector of parts encoded as "application/x-www-form-urlencoded". + ## ICON data_input + Set body as vector of parts encoded as "application/x-www-form-urlencoded". Arguments: - parts: The parts of the form, or a form itself. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Response.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Response.enso index 6d70e359f634..690caeaf42f9 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Response.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Response.enso @@ -45,6 +45,7 @@ type Response Response.Value self.internal_http_response self.body.materialize ## GROUP Metadata + ICON metadata Get the uri for the response. uri : URI uri self = @@ -81,11 +82,13 @@ type Response values = p.second values.map v-> Header.new key v - ## Get the response content type. + ## ICON metadata + Get the response content type. content_type : Text | Nothing content_type self = self.get_header "Content-Type" ## GROUP Metadata + ICON metadata Get the response content length in bytes. This method uses the `Content-Length` header, and does not read the body. If the header is not present will return Nothing. @@ -94,7 +97,8 @@ type Response length_text = self.get_header "Content-Length" length_text.if_not_nothing <| Integer.parse length_text - ## Get the response body. + ## ICON data_input + Get the response body. > Example Getting the body from a response. @@ -108,7 +112,8 @@ type Response metadata = resolve_file_metadata_for_response self Response_Body.new self.internal_http_response.body metadata self.uri - ## Get the response status code. + ## ICON metadata + Get the response status code. > Example Getting the code from a response. @@ -169,6 +174,7 @@ type Response ## ALIAS to_file GROUP Output + ICON data_download Write response body to a File. Arguments: diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Response_Body.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Response_Body.enso index 76b5470a2074..072e0f55eb66 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Response_Body.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/Response_Body.enso @@ -109,6 +109,7 @@ type Response_Body ## ALIAS parse GROUP Input + ICON convert Uses the format to decode the body. If using `Auto_Detect`, the content-type will be used to determine the format. @@ -133,6 +134,7 @@ type Response_Body ## ALIAS bytes GROUP Input + ICON convert Read the body as a byte array. decode_as_bytes : Vector decode_as_bytes self = self.decode Bytes @@ -172,6 +174,7 @@ type Response_Body self.decode_as_text encoding . parse_json ## GROUP Metadata + ICON metadata The content type of the response. content_type : Text | Nothing content_type self = self.metadata.content_type @@ -183,6 +186,7 @@ type Response_Body ## ALIAS to_file GROUP Output + ICON data_output Write response body to a File. Arguments: 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 ee26611e3a9b..89a74eea1598 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 @@ -158,7 +158,7 @@ type URI Problem_Behavior.Report_Warning.attach_problems_before (has_question_mark+has_hash) result ## GROUP Metadata - ICON find + ICON metadata Get the query part of this URI. > Example diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Nothing.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Nothing.enso index 12347033311b..d60ae7e4c2f3 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Nothing.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Nothing.enso @@ -23,6 +23,7 @@ type Nothing is_nothing self = True ## GROUP Logical + ICON operators If this is Nothing then returns `function`. > Example @@ -33,6 +34,7 @@ type Nothing if_nothing self ~function = function ## GROUP Logical + ICON operators If `self` is Nothing then returns Nothing, otherwise returns the result of running the provided `action`. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Runtime/Ref.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Runtime/Ref.enso index 8aac17945fa1..fa2daa35471b 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Runtime/Ref.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Runtime/Ref.enso @@ -28,7 +28,8 @@ type Ref get : Any get self = @Builtin_Method "Ref.get" - ## Puts a new value into this reference, returning the old value. + ## ICON edit + Puts a new value into this reference, returning the old value. Arguments: - new_value: The new value to store in this ref. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Runtime/Source_Location.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Runtime/Source_Location.enso index c308ea9a25a2..4aeeb3bff6d0 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Runtime/Source_Location.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Runtime/Source_Location.enso @@ -2,7 +2,6 @@ import project.Data.Numbers.Integer import project.Data.Text.Text import project.Nothing.Nothing import project.System.File.File - from project.Data.Boolean import Boolean, False, True ## PRIVATE @@ -56,7 +55,8 @@ type Source_Location _ -> file.path formatted_file + ":" + indices - ## Return the source file corresponding to this location. + ## ICON metadata + Return the source file corresponding to this location. file : File | Nothing file self = source = self.prim_location.getSource diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/System/File/File_Permissions.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/System/File/File_Permissions.enso index 4a27e6a5864b..d7185ec49f62 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/System/File/File_Permissions.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/System/File/File_Permissions.enso @@ -46,26 +46,31 @@ type File_Permissions result.to_vector ## GROUP Metadata + ICON metadata Checks if the given file can be read by the owner. owner_read : Boolean owner_read self = self.owner.contains Permission.Read ## GROUP Metadata + ICON metadata Checks if the given file can be written by the owner. owner_write : Boolean owner_write self = self.owner.contains Permission.Write ## GROUP Metadata + ICON metadata Checks if the given file can be executed by the owner. owner_execute : Boolean owner_execute self = self.owner.contains Permission.Execute ## GROUP Metadata + ICON metadata Checks if the given file can be read by the group. group_read : Boolean group_read self = self.group.contains Permission.Read ## GROUP Metadata + ICON metadata Checks if the given file can be written by the group. group_write : Boolean group_write self = self.group.contains Permission.Write @@ -75,16 +80,19 @@ type File_Permissions group_execute self = self.group.contains Permission.Execute ## GROUP Metadata + ICON metadata Checks if the given file can be read by others. others_read : Boolean others_read self = self.others.contains Permission.Read ## GROUP Metadata + ICON metadata Checks if the given file can be written by others. others_write : Boolean others_write self = self.others.contains Permission.Write ## GROUP Metadata + ICON metadata Checks if the given file can be executed by others. others_execute : Boolean others_execute self = self.others.contains Permission.Execute 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 b17190d2edb9..9cd2e0ff0e4d 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 @@ -90,7 +90,8 @@ type File_By_Line end_at = if self.limit_lines.is_nothing then Nothing else self.limit_lines-1 FileLineReader.readLines self.java_file self.file_end self.row_map 0 end_at self.charset self.filter_func - ## Performs an action on each line. + ## ICON parse3 + Performs an action on each line. Arguments - function: The action to perform on each line. @@ -99,7 +100,8 @@ type File_By_Line new_function _ t = function t self.each_with_index new_function - ## Performs an action on each line. + ## ICON parse3 + Performs an action on each line. Arguments: - function: A function to apply that takes an index and an item. @@ -203,6 +205,7 @@ type File_By_Line File_By_Line.Reader self.file self.encoding Nothing new_predicate (make_filter_map self new_filter) (index_of self self.limit_lines) ## ADVANCED + ICON metadata Exports the row_map row_positions : Vector Integer row_positions self = Vector.from_polyglot_array <| diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/System/Platform.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/System/Platform.enso index 1d7350adf85d..79cee4c979f0 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/System/Platform.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/System/Platform.enso @@ -16,7 +16,8 @@ type OS ## An unknown operating system. Unknown -## Return the type of operating system. +## ICON system + Return the type of operating system. > Example Return the OS type: diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/System/Process.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/System/Process.enso index a3345dfe1156..2389b8bc8175 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/System/Process.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/System/Process.enso @@ -8,6 +8,7 @@ from project.Data.Boolean import Boolean, False, True ## ALIAS run a command GROUP Input + ICON system Call a command with a list of arguments. diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/System/Process/Exit_Code.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/System/Process/Exit_Code.enso index 6f39aa4bcd5b..6cc8a152d5e5 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/System/Process/Exit_Code.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/System/Process/Exit_Code.enso @@ -29,6 +29,7 @@ type Exit_Code Failure code ## GROUP Conversions + ICON convert Convert exit code to a number. > Example diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/System/Process/Process_Builder.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/System/Process/Process_Builder.enso index 244775b13f14..7fdaf7ddcb7b 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/System/Process/Process_Builder.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/System/Process/Process_Builder.enso @@ -3,7 +3,6 @@ import project.Data.Vector.Vector import project.System import project.System.Process.Exit_Code.Exit_Code import project.System.System_Process_Result - from project.Data.Boolean import Boolean, False, True ## PRIVATE @@ -25,7 +24,8 @@ type Process_Builder set arguments and standard output. It results in much clearer code. Value command arguments stdin - ## Sets the arguments that should be passed to the created process. + ## ICON edit + Sets the arguments that should be passed to the created process. Arguments: - arguments: The arguments to pass to the process. @@ -41,7 +41,8 @@ type Process_Builder set_arguments : Vector Text -> Process_Builder set_arguments self arguments = Process_Builder.Value self.command arguments self.stdin - ## Sets the text that will be used to feed standard input to the created + ## ICON edit + Sets the text that will be used to feed standard input to the created process. Arguments: @@ -58,7 +59,8 @@ type Process_Builder set_stdin : Text -> Process_Builder set_stdin self stdin = Process_Builder.Value self.command self.arguments stdin - ## Create a process using a builder returning the result of execution. + ## ICON system + Create a process using a builder returning the result of execution. > Example Execute the process contained in the builder. diff --git a/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Table.enso b/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Table.enso index 0ca74baebd85..9bf0e6738354 100644 --- a/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Table.enso +++ b/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Table.enso @@ -147,7 +147,8 @@ type DB_Table if internal_column.is_nothing then if_missing else self.make_column internal_column ## ALIAS cell value, get cell - ICON select_column + GROUP Standard.Base.Selections + ICON local_scope4 Gets a value from the table. Arguments: @@ -688,7 +689,7 @@ type DB_Table result = self.filter column Filter_Condition.Is_True Warning.attach (Deprecated.Warning "Standard.Database.DB_Table.DB_Table" "filter_by_expression" "Deprecated: use `filter` with an `Expression` instead.") result - ## ALIAS first, last, sample, slice, top, head, tail, limit + ## ALIAS first, head, last, limit, sample, slice, tail, top GROUP Standard.Base.Selections ICON select_row Creates a new Table with the specified range of rows from the input @@ -2859,7 +2860,7 @@ type DB_Table ## ALIAS cumulative GROUP Standard.Base.Values - ICON dataframe_map_column + ICON data_input Adds a new column to the table with a running calculation. Arguments: @@ -2893,7 +2894,7 @@ type DB_Table @order_by Widget_Helpers.make_order_by_selector @of Widget_Helpers.make_column_name_selector running : Statistic -> (Text | Integer) -> Text -> Vector (Text | Integer | Regex) | Text | Integer | Regex -> Vector (Text | Sort_Column) | Text -> Problem_Behavior -> Table - running self (statistic:Statistic=Statistic.Count) (of:Text|Integer=0) (as:Text='') (group_by:(Vector | Text | Integer | Regex)=[]) (order_by:(Vector | Text)=[]) (on_problems:Problem_Behavior=Problem_Behavior.Report_Warning) = + running self (statistic:Statistic=Statistic.Count) (of:(Text | Integer)=0) (as:Text='') (group_by:(Vector | Text | Integer | Regex)=[]) (order_by:(Vector | Text)=[]) (on_problems:Problem_Behavior=Problem_Behavior.Report_Warning) = _ = [statistic, of, as, group_by, order_by, on_problems] Error.throw (Unsupported_Database_Operation.Error "DB_Table.running is currently not implemented for the Database backend. You may download the table to memory using `.read` to use this feature.") diff --git a/distribution/lib/Standard/Geo/0.0.0-dev/src/Geo_Json.enso b/distribution/lib/Standard/Geo/0.0.0-dev/src/Geo_Json.enso index 13a12f3f8d9e..16140fe80062 100644 --- a/distribution/lib/Standard/Geo/0.0.0-dev/src/Geo_Json.enso +++ b/distribution/lib/Standard/Geo/0.0.0-dev/src/Geo_Json.enso @@ -6,7 +6,8 @@ import Standard.Table.Errors.Invalid_JSON_Format import project.Helpers import project.Helpers.Object_Type -## Converts a GeoJSON object to a Table. +## ICON convert + Converts a GeoJSON object to a Table. Arguments: - geo_json: The GeoJSON object to convert. diff --git a/distribution/lib/Standard/Geo/0.0.0-dev/src/Main.enso b/distribution/lib/Standard/Geo/0.0.0-dev/src/Main.enso index 2431a85f1b0a..2342d2c725d4 100644 --- a/distribution/lib/Standard/Geo/0.0.0-dev/src/Main.enso +++ b/distribution/lib/Standard/Geo/0.0.0-dev/src/Main.enso @@ -1,10 +1,13 @@ from Standard.Base import all + from Standard.Table import Table import project.Geo_Json + from project.Geo_Json export geo_json_to_table ## UNSTABLE + ICON spatial Create a `Table` representing a geographic point with the specified latitude, longitude, and elevation. diff --git a/distribution/lib/Standard/Google_Api/0.0.0-dev/src/Google_Analytics.enso b/distribution/lib/Standard/Google_Api/0.0.0-dev/src/Google_Analytics.enso index 7e75b8747391..10da8e221ca6 100644 --- a/distribution/lib/Standard/Google_Api/0.0.0-dev/src/Google_Analytics.enso +++ b/distribution/lib/Standard/Google_Api/0.0.0-dev/src/Google_Analytics.enso @@ -3,16 +3,12 @@ import Standard.Base.Data.Array_Proxy.Array_Proxy import Standard.Base.Metadata.Display from Standard.Base.Metadata import make_single_choice, Widget from Standard.Base.Metadata.Widget import Single_Choice, Vector_Editor + from Standard.Table import Table + import project.Google_Credential.Google_Credential from project.Internal.Google_Credential_Internal import all -polyglot java import com.google.api.client.googleapis.auth.oauth2.GoogleCredential -polyglot java import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport -polyglot java import com.google.api.client.json.gson.GsonFactory -polyglot java import com.google.api.services.sheets.v4.Sheets -polyglot java import com.google.api.services.sheets.v4.SheetsScopes -polyglot java import java.util.Collections polyglot java import com.google.analytics.data.v1beta.BetaAnalyticsDataClient polyglot java import com.google.analytics.data.v1beta.BetaAnalyticsDataSettings polyglot java import com.google.analytics.data.v1beta.DateRange @@ -21,10 +17,15 @@ polyglot java import com.google.analytics.data.v1beta.Metric polyglot java import com.google.analytics.data.v1beta.Row polyglot java import com.google.analytics.data.v1beta.RunReportRequest polyglot java import com.google.analytics.data.v1beta.RunReportResponse -polyglot java import com.google.auth.oauth2.GoogleCredentials -polyglot java import com.google.api.gax.core.FixedCredentialsProvider +polyglot java import com.google.api.client.googleapis.auth.oauth2.GoogleCredential +polyglot java import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport +polyglot java import com.google.api.client.json.gson.GsonFactory polyglot java import com.google.api.gax.core.CredentialsProvider - +polyglot java import com.google.api.gax.core.FixedCredentialsProvider +polyglot java import com.google.api.services.sheets.v4.Sheets +polyglot java import com.google.api.services.sheets.v4.SheetsScopes +polyglot java import com.google.auth.oauth2.GoogleCredentials +polyglot java import java.util.Collections ## PRIVATE make_dimensions_vector_selector : Widget diff --git a/distribution/lib/Standard/Google_Api/0.0.0-dev/src/Google_Sheets.enso b/distribution/lib/Standard/Google_Api/0.0.0-dev/src/Google_Sheets.enso index b09a6f0ed295..d32ad04b319f 100644 --- a/distribution/lib/Standard/Google_Api/0.0.0-dev/src/Google_Sheets.enso +++ b/distribution/lib/Standard/Google_Api/0.0.0-dev/src/Google_Sheets.enso @@ -18,10 +18,10 @@ type Google_Sheets ## Initializes the Google Sheets instance using the given credentials file. - Arguments: - - secret_file: a file containing Google Service Account credentials to use to - access Google services. The credentials file can be downloaded from the - Google Admin Console when generating a key. + Arguments: + - secret_file: a file containing Google Service Account credentials to use to + access Google services. The credentials file can be downloaded from the + Google Admin Console when generating a key. initialize : File -> Google_Sheets initialize secret_file = app_name = 'Enso' diff --git a/distribution/lib/Standard/Google_Api/0.0.0-dev/src/Main.enso b/distribution/lib/Standard/Google_Api/0.0.0-dev/src/Main.enso index 8abbac11558a..93fdc7a15a69 100644 --- a/distribution/lib/Standard/Google_Api/0.0.0-dev/src/Main.enso +++ b/distribution/lib/Standard/Google_Api/0.0.0-dev/src/Main.enso @@ -1,9 +1,8 @@ -import project.Google_Credential.Google_Credential import project.Google_Analytics +import project.Google_Credential.Google_Credential import project.Google_Sheets.Google_Sheets - -export project.Google_Credential.Google_Credential export project.Google_Analytics +export project.Google_Credential.Google_Credential export project.Google_Sheets.Google_Sheets diff --git a/distribution/lib/Standard/Searcher/0.0.0-dev/src/Main.enso b/distribution/lib/Standard/Searcher/0.0.0-dev/src/Main.enso index d9fa2e6b8e10..0d4923bace7c 100644 --- a/distribution/lib/Standard/Searcher/0.0.0-dev/src/Main.enso +++ b/distribution/lib/Standard/Searcher/0.0.0-dev/src/Main.enso @@ -12,6 +12,7 @@ import Standard.Base.Errors.Unimplemented.Unimplemented ## ALIAS text input GROUP Standard.Base.Constants + ICON text_input Creating text in Enso is as simple as adding a node that contains the text that you would like to create. @@ -24,6 +25,7 @@ text_input = Unimplemented.throw "This function should not be called." ## ALIAS number input GROUP Standard.Base.Constants + ICON number_input Creating a number in Enso is as simple as adding a node that contains the number that you would like to create. @@ -43,6 +45,7 @@ number_input = Unimplemented.throw "This function should not be called." ## ALIAS table input GROUP Standard.Base.Constants + ICON data_input Creating a table in Enso is usually done directly from data. Nevertheless, it can be useful to create tables manually. diff --git a/distribution/lib/Standard/Snowflake/0.0.0-dev/src/Internal/Snowflake_Connection.enso b/distribution/lib/Standard/Snowflake/0.0.0-dev/src/Internal/Snowflake_Connection.enso index 0898c9e8b24c..d4acb0c92610 100644 --- a/distribution/lib/Standard/Snowflake/0.0.0-dev/src/Internal/Snowflake_Connection.enso +++ b/distribution/lib/Standard/Snowflake/0.0.0-dev/src/Internal/Snowflake_Connection.enso @@ -10,8 +10,8 @@ import Standard.Table.Data.Table.Table import Standard.Database.Column_Description.Column_Description import Standard.Database.Connection.Connection.Connection import Standard.Database.DB_Table.DB_Table -import Standard.Database.Internal.JDBC_Connection import Standard.Database.Internal.Connection.Entity_Naming_Properties.Entity_Naming_Properties +import Standard.Database.Internal.JDBC_Connection import Standard.Database.SQL_Query.SQL_Query import Standard.Database.SQL_Statement.SQL_Statement from Standard.Database.Connection.Connection import make_database_selector, make_schema_selector, make_structure_creator, make_table_name_selector, make_table_types_selector diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Column.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Column.enso index 64ea9fe5d9b5..6b1c79add15a 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Column.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Column.enso @@ -2053,6 +2053,7 @@ type Column Column.Value (self.java_column.rename name) ## GROUP Standard.Base.Metadata + ICON metadata Returns the name of this column. > Example @@ -2065,6 +2066,7 @@ type Column name self = self.java_column.getName ## GROUP Standard.Base.Metadata + ICON metadata Returns the length of this column. > Example @@ -2077,6 +2079,7 @@ type Column length self = self.java_column . getSize ## GROUP Standard.Base.Metadata + ICON metadata Returns the number of missing items in this column. > Example @@ -2089,6 +2092,7 @@ type Column count_nothing self = CountNothing.apply self.java_column ## GROUP Standard.Base.Metadata + ICON metadata Returns the number of non-null items in this column. > Example @@ -2171,6 +2175,7 @@ type Column to_vector self = Vector.from_polyglot_array self.java_column.getStorage.toList ## GROUP Standard.Base.Metadata + ICON metadata Returns the `Value_Type` associated with that column. The value type determines what type of values the column is storing and @@ -2290,7 +2295,7 @@ type Column sorted = self.to_vector.sort order by=wrapped Column.from_vector self.name sorted - ## ALIAS first, last, sample, slice, top, head, tail, limit + ## ALIAS first, head, last, limit, sample, slice, tail, top GROUP Standard.Base.Selections ICON select_row Creates a new Column with the specified range of rows from the input @@ -2374,6 +2379,7 @@ type Column Column.Value (self.java_column.applyMask mask) ## GROUP Standard.Base.Metadata + ICON metadata Returns a column of numbers, in which every entry denotes how many times the value at the given position occured before. diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Conversions/Convertible_To_Columns.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Conversions/Convertible_To_Columns.enso index a4d4ec87854d..2248594defa5 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Conversions/Convertible_To_Columns.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Conversions/Convertible_To_Columns.enso @@ -1,9 +1,11 @@ from Standard.Base import all -from Standard.Table import Column, Table -import project.Data.Row.Row import Standard.Base.Data.Java_Json.Jackson_Object import Standard.Base.Errors.Illegal_Argument.Illegal_Argument +from Standard.Table import Column, Table + +import project.Data.Row.Row + ## PRIVATE A special type describing how to convert an object into a set of table columns. diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Conversions/Convertible_To_Rows.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Conversions/Convertible_To_Rows.enso index 66e6cc1486af..0d85b9121046 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Conversions/Convertible_To_Rows.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Conversions/Convertible_To_Rows.enso @@ -1,7 +1,8 @@ from Standard.Base import all -from Standard.Table import Column, Table import Standard.Base.Data.Java_Json.Jackson_Object +from Standard.Table import Column, Table + import project.Data.Conversions.Convertible_To_Columns.Convertible_To_Columns ## PRIVATE diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Data_Formatter.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Data_Formatter.enso index f7dcff2813d2..2dbe4d3daad3 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Data_Formatter.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Data_Formatter.enso @@ -94,7 +94,8 @@ type Data_Formatter formatter = self.make_auto_formatter formatter.format value - ## Create a clone of self with specified number formatting options. + ## ICON convert + Create a clone of self with specified number formatting options. Arguments: - decimal_point: The character used to separate the integer part from the fractional part of a number. @@ -106,7 +107,8 @@ type Data_Formatter if decimal_point == thousand_separator then Error.throw (Illegal_Argument.Error "The decimal point and thousand separator must be different.") else self.clone decimal_point=decimal_point thousand_separator=thousand_separator allow_leading_zeros=allow_leading_zeros allow_exponential_notation=allow_exponential_notation - ## Specify values for Date/Time parsing. + ## ICON convert + Specify values for Date/Time parsing. A plain text pattern can be provided and it will be automatically converted into a `Date_Time_Formatter` using simple pattern parsing @@ -138,7 +140,8 @@ type Data_Formatter time_vector = convert_formats time_formats self.clone datetime_formats=datetime_vector date_formats=date_vector time_formats=time_vector - ## Specify values for Boolean parsing. + ## ICON convert + Specify values for Boolean parsing. Arguments: - true_values: Values representing True. @@ -149,7 +152,8 @@ type Data_Formatter false_vector = wrap_text_in_vector false_values self.clone true_values=true_vector false_values=false_vector - ## Create a clone of self with a changed format string for a particular + ## ICON convert + Create a clone of self with a changed format string for a particular datatype. It is mostly a convenience function to easily specify a datatype format. diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Expression.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Expression.enso index 3e76b6368a72..cdf85e5de5c3 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Expression.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Expression.enso @@ -4,7 +4,8 @@ polyglot java import java.lang.IllegalArgumentException polyglot java import java.lang.UnsupportedOperationException polyglot java import org.enso.table.expressions.ExpressionVisitorImpl -## Create an expression from a Text value. +## ICON dataframe_map_column + Create an expression from a Text value. Arguments: - expression: the expression to create diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Row.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Row.enso index 684940e149b2..7116f2cf0a8e 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Row.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Row.enso @@ -16,6 +16,7 @@ type Row column_names self = self.table.column_names ## GROUP Standard.Base.Metadata + ICON metadata Gets the number of columns in the table. length : Integer length self = self.table.columns.length 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 0f78c2d94f25..6bf27adeba6d 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 @@ -286,8 +286,9 @@ type Table _ -> Error.throw (Illegal_Argument.Error "expected 'selector' to be either a Text or an Integer, but got "+(Meta.get_simple_type_name selector)+".") if java_column.is_nothing then if_missing else Column.Value java_column - ## ALIAS get cell, cell value - ICON select_column + ## ALIAS cell value, get cell + GROUP Standard.Base.Selections + ICON local_scope4 Gets a value from the table. Arguments: @@ -879,7 +880,7 @@ type Table self.java_table.orderBy java_columns directions comparator Table.Value java_table - ## ALIAS unique, deduplicate + ## ALIAS deduplicate, unique GROUP Standard.Base.Selections ICON preparation Returns the distinct set of rows within the specified columns from the @@ -1528,7 +1529,7 @@ type Table result = self.filter column Filter_Condition.Is_True Warning.attach (Deprecated.Warning "Standard.Table.Data.Table.Table" "filter_by_expression" "Deprecated: use `filter` with an `Expression` instead.") result - ## ALIAS first, last, sample, slice, top, head, tail, limit + ## ALIAS first, head, last, limit, sample, slice, tail, top GROUP Standard.Base.Selections ICON select_row Creates a new Table with the specified range of rows from the input @@ -1635,7 +1636,7 @@ type Table add_row_number self (name:Text="Row") (from:Integer=1) (step:Integer=1) (group_by:(Vector | Text | Integer | Regex)=[]) (order_by:(Vector | Text)=[]) (on_problems:Problem_Behavior=Problem_Behavior.Report_Warning) = Add_Row_Number.add_row_number self name from step group_by order_by on_problems - ## ALIAS add column, new column, update column, formula + ## ALIAS add column, formula, new column, update column GROUP Standard.Base.Values ICON dataframe_map_column Sets the column value at the given name. @@ -2688,11 +2689,13 @@ type Table to_write = if Context.Output.is_enabled then self else self.take 1000 format.write_table path to_write on_existing_file match_columns on_problems - ## Creates a text representation of the table using the CSV format. + ## ICON convert + 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 + ICON convert Returns an `XML_Document` representation of the table. Arguments: - element_columns: Columns to be used as elements in the XML. @@ -2895,7 +2898,7 @@ type Table @order_by Widget_Helpers.make_order_by_selector @of Widget_Helpers.make_column_name_selector running : Statistic -> (Text | Integer) -> Text -> Vector (Text | Integer | Regex) | Text | Integer | Regex -> Vector (Text | Sort_Column) | Text -> Problem_Behavior -> Table - running self (statistic:Statistic=Statistic.Count) (of:Text|Integer=0) (as:Text='') (group_by:(Vector | Text | Integer | Regex)=[]) (order_by:(Vector | Text)=[]) (on_problems:Problem_Behavior=Problem_Behavior.Report_Warning) = + running self (statistic:Statistic=Statistic.Count) (of:(Text | Integer)=0) (as:Text='') (group_by:(Vector | Text | Integer | Regex)=[]) (order_by:(Vector | Text)=[]) (on_problems:Problem_Behavior=Problem_Behavior.Report_Warning) = if statistic != Statistic.Count then Error.throw (Illegal_Argument.Error ("Currently only Statistic.Count is supported in Table.running.")) else of_col = self.at of new_name = if as == '' then 'Running ' + statistic.to_text + ' of ' + of_col.name else as @@ -2907,7 +2910,7 @@ type Table ## ALIAS from GROUP Standard.Base.Calculations - ICON dataframes_union + ICON select_column Appends records from the vector of tables into a single table. Arguments: diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Type/Value_Type.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Type/Value_Type.enso index 4bfffe552d34..6ddba83bdd1d 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Type/Value_Type.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Data/Type/Value_Type.enso @@ -153,6 +153,7 @@ type Value_Type Mixed ## GROUP Standard.Base.Metadata + ICON metadata Checks if the `Value_Type` represents a boolean type. is_boolean : Boolean is_boolean self = case self of @@ -160,6 +161,7 @@ type Value_Type _ -> False ## GROUP Standard.Base.Metadata + ICON metadata Checks if the `Value_Type` represents a floating-point number type. is_floating_point : Boolean is_floating_point self = case self of @@ -167,6 +169,7 @@ type Value_Type _ -> False ## GROUP Standard.Base.Metadata + ICON metadata Checks if the `Value_Type` represents a text type. is_text : Boolean is_text self = case self of @@ -174,6 +177,7 @@ type Value_Type _ -> False ## GROUP Standard.Base.Metadata + ICON metadata Checks if the `Value_Type` represents any numeric type - integer, byte, floating point or decimal. is_numeric : Boolean @@ -185,6 +189,7 @@ type Value_Type _ -> False ## GROUP Standard.Base.Metadata + ICON metadata Checks if the `Value_Type` represents an integer type. is_integer : Boolean is_integer self = case self of @@ -192,6 +197,7 @@ type Value_Type _ -> False ## GROUP Standard.Base.Metadata + ICON metadata Checks if the `Value_Type` represents a decimal type. is_decimal : Boolean is_decimal self = case self of @@ -199,6 +205,7 @@ type Value_Type _ -> False ## GROUP Standard.Base.Metadata + ICON metadata Checks if the `Value_Type` represents a Date_Time type. is_date_time : Boolean is_date_time self = case self of @@ -206,6 +213,7 @@ type Value_Type _ -> False ## GROUP Standard.Base.Metadata + ICON metadata Checks if the `Value_Type` represents a type that holds a date. It will return true for both `Date` and `Date_Time` types. @@ -216,6 +224,7 @@ type Value_Type _ -> False ## GROUP Standard.Base.Metadata + ICON metadata Checks if the `Value_Type` represents a type that holds a time of day. It will return true for both `Time_Of_Day` and `Date_Time` types. @@ -226,6 +235,7 @@ type Value_Type _ -> False ## GROUP Standard.Base.Metadata + ICON metadata Checks if the `Value_Type` represents a date/time type. is_date_or_time : Boolean is_date_or_time self = case self of @@ -452,7 +462,9 @@ type Value_Type JS_Object.from_pairs <| [["type", "Value_Type"], ["constructor", constructor_name]] + additional_fields - ## Check if the same type of value ignoring size, precision and scale. + ## GROUP Standard.Base.Metadata + ICON metadata + Check if the same type of value ignoring size, precision and scale. is_same_type : Value_Type -> Boolean is_same_type self other:Value_Type = self_ctor = Meta.meta self . constructor diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Delimited/Delimited_Format.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Delimited/Delimited_Format.enso index 7582c5cba4e2..45d6f9968adf 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Delimited/Delimited_Format.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Delimited/Delimited_Format.enso @@ -5,8 +5,8 @@ import Standard.Base.System.File.Generic.Writable_File.Writable_File import Standard.Base.System.File_Format_Metadata.File_Format_Metadata import Standard.Base.System.Input_Stream.Input_Stream from Standard.Base.Metadata.Choice import Option -from Standard.Base.Widget_Helpers import make_file_read_delimiter_selector from Standard.Base.System.File_Format import parse_boolean_with_infer +from Standard.Base.Widget_Helpers import make_file_read_delimiter_selector import project.Data.Data_Formatter.Data_Formatter import project.Data.Match_Columns.Match_Columns @@ -116,48 +116,57 @@ type Delimited_Format clone self (quote_style=self.quote_style) (headers=self.headers) (value_formatter=self.value_formatter) (keep_invalid_rows=self.keep_invalid_rows) (line_endings=self.line_endings) (comment_character=self.comment_character) = Delimited_Format.Delimited self.delimiter self.encoding self.skip_rows self.row_limit quote_style headers value_formatter keep_invalid_rows line_endings comment_character - ## Create a clone of this with specified quoting settings. + ## ICON data_input + Create a clone of this with specified quoting settings. with_quotes : Text -> Text -> Boolean -> Delimited_Format with_quotes self quote='"' quote_escape=quote always_quote=False = self.clone quote_style=(Quote_Style.With_Quotes always_quote=always_quote quote=quote quote_escape=quote_escape) - ## Create a clone of this with specified quoting settings. + ## ICON data_input + Create a clone of this with specified quoting settings. without_quotes : Delimited_Format without_quotes self = self.clone quote_style=Quote_Style.No_Quotes - ## Create a clone of this with first row treated as header. + ## ICON data_input + Create a clone of this with first row treated as header. with_headers : Delimited_Format with_headers self = self.clone headers=True - ## Create a clone of this where the first row is treated as data, not a + ## ICON data_input + Create a clone of this where the first row is treated as data, not a header. without_headers : Delimited_Format without_headers self = self.clone headers=False - ## Create a clone of this with value parsing. + ## ICON data_input + Create a clone of this with value parsing. A custom `Data_Formatter` can be provided to customize parser options. with_parsing : Data_Formatter -> Delimited_Format with_parsing self (value_formatter=Data_Formatter.Value) = self.clone value_formatter=value_formatter - ## Create a clone of this without value parsing. + ## ICON data_input + Create a clone of this without value parsing. without_parsing : Delimited_Format without_parsing self = self.clone value_formatter=Nothing - ## Creates a clone of this with a changed line ending style. + ## ICON data_input + Creates a clone of this with a changed line ending style. with_line_endings : Line_Ending_Style | Infer -> Delimited_Format with_line_endings self (line_endings : Line_Ending_Style | Infer = Infer) = self.clone line_endings=line_endings - ## Creates a clone of this with comment parsing enabled. + ## ICON data_input + Creates a clone of this with comment parsing enabled. with_comments : Text -> Delimited_Format with_comments self comment_character='#' = self.clone comment_character=comment_character - ## Creates a clone of this with comment parsing disabled. + ## ICON data_input + Creates a clone of this with comment parsing disabled. without_comments : Delimited_Format without_comments self = self.clone comment_character=Nothing diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Format.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Format.enso index 53c3fed65ee8..13242c82bae6 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Format.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Format.enso @@ -5,15 +5,15 @@ import Standard.Base.System.File.Generic.Writable_File.Writable_File import Standard.Base.System.File_Format_Metadata.File_Format_Metadata import Standard.Base.System.Input_Stream.Input_Stream from Standard.Base.Metadata.Choice import Option -from Standard.Base.Metadata.Widget import Text_Input, Numeric_Input +from Standard.Base.Metadata.Widget import Numeric_Input, Text_Input from Standard.Base.System.File_Format import parse_boolean_with_infer import project.Data.Match_Columns.Match_Columns import project.Data.Table.Table import project.Excel.Excel_Range.Excel_Range -import project.Internal.Excel_Section.Excel_Section import project.Excel.Excel_Workbook.Excel_Workbook import project.Internal.Excel_Reader +import project.Internal.Excel_Section.Excel_Section import project.Internal.Excel_Writer ## PRIVATE diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Range.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Range.enso index e91a694e83c2..29291b3c5b49 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Range.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Range.enso @@ -21,24 +21,29 @@ type Excel_Range Value java_range:Java_Range ## GROUP Standard.Base.Metadata + ICON metadata Gets the name of the sheet. sheet_name : Text sheet_name self = self.java_range.getSheetName ## GROUP Standard.Base.Metadata + ICON metadata Gets the index (1-based) of the top row of the range. Returns `Nothing` if referring to a complete column. top_row : Integer | Nothing top_row self = if self.java_range.isWholeColumn then Nothing else self.java_range.getTopRow - ## Gets the index (1-based) of the bottom row of the range. + ## GROUP Standard.Base.Metadata + ICON metadata + Gets the index (1-based) of the bottom row of the range. Returns `Nothing` if referring to a complete column. bottom_row : Integer | Nothing bottom_row self = if self.java_range.isWholeColumn then Nothing else self.java_range.getBottomRow ## GROUP Standard.Base.Metadata + ICON metadata Gets the index (1-based) of the left column of the range. Returns `Nothing` if referring to a complete row. left_column : Integer | Nothing @@ -46,6 +51,7 @@ type Excel_Range self.java_range.getLeftColumn ## GROUP Standard.Base.Metadata + ICON metadata Gets the index (1-based) of the right column of the range. Returns `Nothing` if referring to a complete row. right_column : Integer | Nothing @@ -53,11 +59,14 @@ type Excel_Range self.java_range.getRightColumn ## GROUP Standard.Base.Metadata + ICON metadata Is the Excel_Range referring to a single cell is_single_cell : Boolean is_single_cell self = self.java_range.isSingleCell - ## Gets the address to this in A1 format. + ## GROUP Standard.Base.Metadata + ICON metadata + Gets the address to this in A1 format. address : Text address self = self.java_range.getAddress @@ -97,13 +106,15 @@ type Excel_Range _ : Text -> Java_Range.parseA1Column column _ -> Error.throw (Illegal_Argument.Error "Column must be a Text or Integer") - ## Creates a Range from an address. + ## ICON data_input + Creates a Range from an address. from_address : Text -> Excel_Range from_address address = Illegal_Argument.handle_java_exception <| Excel_Range.Value (Java_Range.new address) - ## Create a Range for a single cell. + ## ICON data_input + Create a Range for a single cell. for_cell : Text -> (Text|Integer) -> Integer -> Excel_Range for_cell sheet column row = col_index = Excel_Range.column_index column @@ -114,7 +125,8 @@ type Excel_Range col_valid <| row_valid <| Excel_Range.Value (Java_Range.new sheet col_index row) - ## Create an Excel_Range for a range of cells. + ## ICON data_input + Create an Excel_Range for a range of cells. for_range : Text -> (Text|Integer) -> Integer -> (Text|Integer) -> Integer -> Excel_Range for_range sheet left top right bottom = left_index = Excel_Range.column_index left @@ -128,7 +140,8 @@ type Excel_Range left_valid <| right_valid <| top_valid <| bottom_valid <| Excel_Range.Value (Java_Range.new sheet left_index top right_index bottom) - ## Create an Excel_Range for a set of columns. + ## ICON data_input + Create an Excel_Range for a set of columns. for_columns : Text -> (Text|Integer) -> (Text|Integer) -> Excel_Range for_columns sheet left (right=left) = left_index = Excel_Range.column_index left @@ -140,7 +153,8 @@ type Excel_Range left_valid <| right_valid <| Excel_Range.Value (Java_Range.forColumns sheet left_index right_index) - ## Create an Excel_Range for a set of rows. + ## ICON data_input + Create an Excel_Range for a set of rows. for_rows : Text -> Integer -> Integer -> Excel_Range for_rows sheet top (bottom=top) = top_valid = validate (Excel_Range.is_valid_row top) ("Invalid top row for Excel: " + top.to_text + ".") diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Workbook.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Workbook.enso index c2e4e8c16e30..8532afacc7f4 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Workbook.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Workbook.enso @@ -13,8 +13,8 @@ from Standard.Base.Metadata.Widget import Single_Choice import project.Data.Table.Table import project.Excel.Excel_Range.Excel_Range -import project.Internal.Excel_Section.Excel_Section import project.Internal.Excel_Reader +import project.Internal.Excel_Section.Excel_Section import project.Internal.Java_Problems polyglot java import java.io.File as Java_File @@ -198,7 +198,7 @@ type Excel_Workbook - limit: the maximum number of rows to read. If set to `Nothing`, all rows will be returned. @query (self-> Single_Choice display=Display.Always values=(self.tables.at "Name" . to_vector . map t-> Option t t.pretty)) - read : Text -> Boolean | Infer -> Integer | Nothing -> Table + read : Text | Excel_Range -> Boolean | Infer -> Integer | Nothing -> Table read self (query : Text | Excel_Range) (headers : Boolean | Infer = Infer) (limit : Integer | Nothing = Nothing) = java_headers = Excel_Reader.make_java_headers headers java_table = Java_Problems.with_problem_aggregator Problem_Behavior.Report_Warning java_problem_aggregator-> diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Extensions/Table_Conversions.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Extensions/Table_Conversions.enso index cc03055fbb9e..c4175a382c6c 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Extensions/Table_Conversions.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Extensions/Table_Conversions.enso @@ -81,6 +81,7 @@ Table.from_objects value (fields : Vector | Nothing = Nothing) = Expand_Objects_Helpers.create_table_from_objects value fields ## GROUP Standard.Base.Conversions + ICON convert Converts a Text into a Table using a regular expression pattern. Each match becomes a row in the table. diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Excel_Writer.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Excel_Writer.enso index 2a805a2af69c..f382156a1684 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Excel_Writer.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Excel_Writer.enso @@ -10,8 +10,8 @@ from Standard.Base.System.File import file_as_java import project.Data.Match_Columns.Match_Columns import project.Data.Table.Table import project.Excel.Excel_Range.Excel_Range -import project.Internal.Excel_Section.Excel_Section import project.Internal.Excel_Reader +import project.Internal.Excel_Section.Excel_Section from project.Errors import Column_Count_Mismatch, Column_Name_Mismatch, Existing_Data, Invalid_Location, Range_Exceeded polyglot java import java.io.File as Java_File diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Rows_View.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Rows_View.enso index 6c64356eda70..6dfa800c8ff8 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Rows_View.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Rows_View.enso @@ -9,11 +9,13 @@ type Rows_View Value (table:Table) ## GROUP Standard.Base.Metadata + ICON metadata Gets the number of rows in the table. length : Integer length self = self.table.row_count ## GROUP Standard.Base.Selections + ICON select_row Gets the specified row. at : Integer -> Any at self index = Row.Value self.table index diff --git a/distribution/lib/Standard/Test/0.0.0-dev/src/Faker.enso b/distribution/lib/Standard/Test/0.0.0-dev/src/Faker.enso index 2375cb87dd7d..76bd3f8e9af3 100644 --- a/distribution/lib/Standard/Test/0.0.0-dev/src/Faker.enso +++ b/distribution/lib/Standard/Test/0.0.0-dev/src/Faker.enso @@ -11,7 +11,8 @@ type Faker ## Set of lower case letters. lower_case_letters = "abcdefghijklmnopqrstuvwxyz".char_vector - ## Set of numerical digits. + ## ICON number_input + Set of numerical digits. numbers = "0123456789".char_vector ## Creates a new Faker which can be used for creating test values. diff --git a/distribution/lib/Standard/Visualization/0.0.0-dev/src/Main.enso b/distribution/lib/Standard/Visualization/0.0.0-dev/src/Main.enso index 848116d84a2f..bafacc7e5ff1 100644 --- a/distribution/lib/Standard/Visualization/0.0.0-dev/src/Main.enso +++ b/distribution/lib/Standard/Visualization/0.0.0-dev/src/Main.enso @@ -1,13 +1,15 @@ from Standard.Base import all +import project.AI import project.File_Upload import project.Helpers import project.Id.Id import project.Preprocessor -import project.AI + +export project.AI export project.Helpers export project.Id.Id export project.Preprocessor -export project.AI from project.File_Upload export file_uploading +