Flux 0.189 (#4615)

* 0.188.0 flux spec updates

* 0.189.0 flux spec updates

* Flux 0.189.0 stdlib updates
pull/4604/head^2
Scott Anderson 2022-11-02 16:45:59 -06:00 committed by GitHub
parent 781599d412
commit 7fd469306b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
278 changed files with 906 additions and 710 deletions

View File

@ -10,6 +10,39 @@ aliases:
- /influxdb/cloud/reference/release-notes/flux/
---
## v0.189.0 [2022-11-02]
### Features
- Add `PartialOrd` and `Ord` to `ast::Position`.
- Detect undesirable patterns so we can remove them later.
### Bug fixes
- Update attribute syntax to require following element.
- Add `salsaDatabase` to list of feature passed to Rust.
- `testing.ShouldError` should error when no error occurs.
- Restore termination defaults for `holtWinters` to improve performance.
- Use salsa db when generating documentation.
---
## v0.188.1 [2022-10-31]
### Bug fixes
- Correctly handle join operations with large input that exceed the buffer size.
---
## v0.188.0 [2022-10-25]
### Features
- Compile the standard library incrementally.
- Add attribute parsing to the parser.
### Bug fixes
- Allow functions receiving dynamic arguments to do member expressions.
---
## v0.187.0 [2022-10-17]
### Features

View File

@ -0,0 +1,29 @@
---
title: Attributes
description: Attributes define a set of properties on source code elements.
menu:
flux_0_x_ref:
parent: Flux specification
name: Attributes
weight: 112
---
Attributes define a set of properties on source code elements.
```js
Attributes = { Attribute } .
Attribute = "@" identifier AttributeParameters .
AttributeParameters = "(" [ AttributeParameterList [ "," ] ] ")" .
AttributeParameterList = AttributeParameter { "," AttributeParameter } .
AttributeParameter = PrimaryExpression
```
The runtime specifies the set of defined attributes and their meaning.
##### Example attributes
```js
@edition("2022.1")
package main
```
{{< page-nav prev="/flux/v0.x/spec/packages/" next="/flux/v0.x/spec/statements/" >}}

View File

@ -71,7 +71,7 @@ The following character sequences represent operators:
- < !~ [ ] ^
* > =~ { } ?
/ <= = , : "
% >= <- . |>
% >= <- . |> @
```
### Integer literals

View File

@ -27,7 +27,7 @@ ImportList = { ImportDeclaration } .
## Package clause
```js
PackageClause = "package" identifier .
PackageClause = [ Attributes ] "package" identifier .
```
A _package clause_ defines the name for the current package.
@ -45,6 +45,38 @@ The `main` package is special for a few reasons:
2. It cannot be imported.
3. All statements are marked as producing side effects.
## Import declaration
```js
ImportDeclaration = [ Attributes ] "import" [identifier] string_lit
```
A package name and an import path is associated with every package.
The import statement takes a package's import path and brings all of the identifiers
defined in that package into the current scope under a namespace.
The import statement defines the namespace through which to access the imported identifiers.
By default the identifier of this namespace is the package name unless otherwise specified.
For example, given a variable `x` declared in package `foo`, importing `foo` and referencing `x` would look like this:
```js
import "import/path/to/package/foo"
foo.x
```
Or this:
```js
import bar "import/path/to/package/foo"
bar.x
```
A package's import path is always absolute.
A package may reassign a new value to an option identifier declared in one of its imported packages.
A package cannot access nor modify the identifiers belonging to the imported packages of its imported packages.
Every statement contained in an imported package is evaluated.
## Package initialization
Packages are initialized in the following order:
@ -63,4 +95,4 @@ Packages imported in the same file block are initialized in declaration order.
Packages imported across different file blocks have no known order.
When a set of imports modify the same option, they must be ordered by placing them in the same file block.
{{< page-nav prev="/flux/v0.x/spec/operators/" next="/flux/v0.x/spec/statements/" >}}
{{< page-nav prev="/flux/v0.x/spec/operators/" next="/flux/v0.x/spec/attributes/" >}}

View File

@ -14,45 +14,15 @@ aliases:
A _statement_ controls execution.
```js
Statement = OptionAssignment
| BuiltinStatement
| VariableAssignment
| ReturnStatement
| ExpressionStatement .
Statement = [ Attributes ] StatementInner .
StatementInner = OptionAssignment
| BuiltinStatement
| VariableAssignment
| ReturnStatement
| ExpressionStatement
| TestcaseStatement .
```
## Import declaration
```js
ImportDeclaration = "import" [identifier] string_lit .
```
A package name and an import path is associated with every package.
The import statement takes a package's import path and brings all of the identifiers
defined in that package into the current scope under a namespace.
The import statement defines the namespace through which to access the imported identifiers.
By default the identifier of this namespace is the package name unless otherwise specified.
For example, given a variable `x` declared in package `foo`, importing `foo` and referencing `x` would look like this:
```js
import "import/path/to/package/foo"
foo.x
```
Or this:
```js
import bar "import/path/to/package/foo"
bar.x
```
A package's import path is always absolute.
A package may reassign a new value to an option identifier declared in one of its imported packages.
A package cannot access nor modify the identifiers belonging to the imported packages of its imported packages.
Every statement contained in an imported package is evaluated.
## Return statements
A terminating statement prevents execution of all statements that appear after it in the same block.
@ -77,4 +47,47 @@ f()
a
```
#### Testcase statements
A _testcase_ statement defines a test case.
{{% note %}}
Testcase statements only work within the context of a Flux developement environment.
{{% /note %}}
```js
TestcaseStatement = "testcase" identifier [ TestcaseExtention ] Block .
TestcaseExtention = "extends" string_lit
```
Test cases are defined as a set of statements with special scoping rules.
Each test case statement in a file is considered to be its own main package.
In effect, all statements in package scope and all statements contained within
the test case statement are flattened into a single main package and executed.
Use the `testing` package from the standard library to control the pass failure
of the test case.
Test extension augments an existing test case with more statements or attributes.
A special function call, `super()`, must be made inside the body of a test case
extension. All statements from the parent test case will be executed in its place.
##### Basic testcase for addition
```js
import "testing"
testcase addition {
testing.assertEqualValues(got: 1 + 1, want: 2)
}
```
##### Example testcase extension to prevent feature regession
```js
@feature({vectorization: true})
testcase vector_addition extends "basics_test.addition" {
super()
}
```
{{< page-nav prev="/flux/v0.x/spec/packages/" next="/flux/v0.x/spec/side-effects/" >}}

View File

@ -81,7 +81,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -83,7 +83,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -83,7 +83,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -75,7 +75,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -81,7 +81,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -83,7 +83,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -81,7 +81,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -81,7 +81,7 @@ sampledata.uint()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -81,7 +81,7 @@ sampledata.uint()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -83,7 +83,7 @@ sampledata.uint()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -75,7 +75,7 @@ sampledata.uint()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -81,7 +81,7 @@ sampledata.uint()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -83,7 +83,7 @@ sampledata.uint()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -81,7 +81,7 @@ sampledata.uint()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -73,7 +73,7 @@ sampledata.float()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -169,7 +169,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -69,7 +69,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -96,7 +96,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data
@ -154,7 +154,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data
@ -202,7 +202,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -108,7 +108,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -83,7 +83,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -119,7 +119,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -86,7 +86,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -76,7 +76,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -84,7 +84,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -86,7 +86,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -86,7 +86,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -78,7 +78,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -84,7 +84,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -86,7 +86,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -84,7 +84,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -84,7 +84,7 @@ sampledata.uint()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -84,7 +84,7 @@ sampledata.uint()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -86,7 +86,7 @@ sampledata.uint()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -78,7 +78,7 @@ sampledata.uint()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -84,7 +84,7 @@ sampledata.uint()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -86,7 +86,7 @@ sampledata.uint()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -84,7 +84,7 @@ sampledata.uint()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -74,7 +74,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -67,7 +67,7 @@ sampledata.int(includeNull: true)
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -79,7 +79,7 @@ sampledata.int(includeNull: true)
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data
@ -137,7 +137,7 @@ sampledata.int(includeNull: true)
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -65,7 +65,7 @@ sampledata.int(includeNull: true)
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -77,7 +77,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data
@ -119,7 +119,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -117,7 +117,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -89,7 +89,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -83,7 +83,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data
@ -128,7 +128,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -65,7 +65,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -69,7 +69,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -63,7 +63,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -74,7 +74,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -101,7 +101,7 @@ sampledata.float()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -97,7 +97,7 @@ histogramData
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -88,12 +88,12 @@ requests.peek(response: requests.get(url: "https://api.agify.io", params: ["name
Connection: keep-alive,
Content-Length: 41,
Content-Type: application/json; charset=utf-8,
Date: Mon, 17 Oct 2022 17:11:46 GMT,
Date: Wed, 02 Nov 2022 17:52:48 GMT,
Server: nginx/1.16.1,
X-Rate-Limit-Limit: 1000,
X-Rate-Limit-Remaining: 998,
X-Rate-Limit-Reset: 24494,
X-Request-Id: Fx7qdmv9xXef1VkgUaVB
X-Rate-Limit-Reset: 22032,
X-Request-Id: FyPV_MovhXm2WygJJqdy
] | 200 |
{{% /expand %}}

View File

@ -87,7 +87,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data
@ -139,7 +139,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -84,7 +84,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data
@ -196,10 +196,10 @@ array.from(
#### Output data
| pendingDuration | id | color |
| ---------------- | -------- | ------ |
| 3 | 15612462 | red |
| 16 | 15612462 | blue |
| id | color | pendingDuration |
| -------- | ------ | ---------------- |
| 15612462 | red | 3 |
| 15612462 | blue | 16 |
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -72,7 +72,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -65,7 +65,7 @@ sampledata.int(includeNull: true)
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -65,7 +65,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -65,7 +65,7 @@ sampledata.float()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -65,7 +65,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -75,7 +75,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -101,50 +101,50 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data
| _time | _value |
| -------------------- | ------------------- |
| 2022-10-17T17:09:00Z | 10.56555566168836 |
| 2022-10-17T17:09:10Z | -29.76098586714259 |
| 2022-10-17T17:09:20Z | -67.50435038579738 |
| 2022-10-17T17:09:30Z | -16.758669047964453 |
| 2022-10-17T17:09:40Z | -47.25865245658065 |
| 2022-10-17T17:09:50Z | 66.16082461651365 |
| 2022-10-17T17:10:00Z | -0.9179216017921821 |
| 2022-10-17T17:10:10Z | -56.89169240573004 |
| 2022-10-17T17:10:20Z | 11.358605472976624 |
| 2022-10-17T17:10:30Z | 28.71147881415803 |
| 2022-10-17T17:10:40Z | -30.928830759588756 |
| 2022-10-17T17:10:50Z | -22.411848631056067 |
| 2022-10-17T17:11:00Z | 17.05503606764129 |
| 2022-10-17T17:11:10Z | 9.834382683760559 |
| 2022-10-17T17:11:20Z | -12.62058579127679 |
| 2022-10-17T17:11:30Z | -44.44668391211515 |
| 2022-11-02T17:50:00Z | 10.56555566168836 |
| 2022-11-02T17:50:10Z | -29.76098586714259 |
| 2022-11-02T17:50:20Z | -67.50435038579738 |
| 2022-11-02T17:50:30Z | -16.758669047964453 |
| 2022-11-02T17:50:40Z | -47.25865245658065 |
| 2022-11-02T17:50:50Z | 66.16082461651365 |
| 2022-11-02T17:51:00Z | -0.9179216017921821 |
| 2022-11-02T17:51:10Z | -56.89169240573004 |
| 2022-11-02T17:51:20Z | 11.358605472976624 |
| 2022-11-02T17:51:30Z | 28.71147881415803 |
| 2022-11-02T17:51:40Z | -30.928830759588756 |
| 2022-11-02T17:51:50Z | -22.411848631056067 |
| 2022-11-02T17:52:00Z | 17.05503606764129 |
| 2022-11-02T17:52:10Z | 9.834382683760559 |
| 2022-11-02T17:52:20Z | -12.62058579127679 |
| 2022-11-02T17:52:30Z | -44.44668391211515 |
#### Output data
| _time | _value |
| -------------------- | ------------------- |
| 2022-10-17T17:09:00Z | 10.56555566168836 |
| 2022-10-17T17:09:10Z | -29.76098586714259 |
| 2022-10-17T17:09:20Z | -67.50435038579738 |
| 2022-10-17T17:09:30Z | -16.758669047964453 |
| 2022-10-17T17:09:40Z | -47.25865245658065 |
| 2022-10-17T17:09:50Z | 66.16082461651365 |
| 2022-10-17T17:10:00Z | -0.9179216017921821 |
| 2022-10-17T17:10:10Z | -56.89169240573004 |
| 2022-10-17T17:10:20Z | 11.358605472976624 |
| 2022-10-17T17:10:30Z | 28.71147881415803 |
| 2022-10-17T17:10:40Z | -30.928830759588756 |
| 2022-10-17T17:10:50Z | -22.411848631056067 |
| 2022-10-17T17:11:00Z | 17.05503606764129 |
| 2022-10-17T17:11:10Z | 9.834382683760559 |
| 2022-10-17T17:11:20Z | -12.62058579127679 |
| 2022-10-17T17:11:30Z | -44.44668391211515 |
| 2022-11-02T17:50:00Z | 10.56555566168836 |
| 2022-11-02T17:50:10Z | -29.76098586714259 |
| 2022-11-02T17:50:20Z | -67.50435038579738 |
| 2022-11-02T17:50:30Z | -16.758669047964453 |
| 2022-11-02T17:50:40Z | -47.25865245658065 |
| 2022-11-02T17:50:50Z | 66.16082461651365 |
| 2022-11-02T17:51:00Z | -0.9179216017921821 |
| 2022-11-02T17:51:10Z | -56.89169240573004 |
| 2022-11-02T17:51:20Z | 11.358605472976624 |
| 2022-11-02T17:51:30Z | 28.71147881415803 |
| 2022-11-02T17:51:40Z | -30.928830759588756 |
| 2022-11-02T17:51:50Z | -22.411848631056067 |
| 2022-11-02T17:52:00Z | 17.05503606764129 |
| 2022-11-02T17:52:10Z | 9.834382683760559 |
| 2022-11-02T17:52:20Z | -12.62058579127679 |
| 2022-11-02T17:52:30Z | -44.44668391211515 |
{{% /expand %}}
{{< /expand-wrapper >}}
@ -160,49 +160,49 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data
| _time | _value |
| -------------------- | ------------------- |
| 2022-10-17T17:09:00Z | 10.56555566168836 |
| 2022-10-17T17:09:10Z | -29.76098586714259 |
| 2022-10-17T17:09:20Z | -67.50435038579738 |
| 2022-10-17T17:09:30Z | -16.758669047964453 |
| 2022-10-17T17:09:40Z | -47.25865245658065 |
| 2022-10-17T17:09:50Z | 66.16082461651365 |
| 2022-10-17T17:10:00Z | -0.9179216017921821 |
| 2022-10-17T17:10:10Z | -56.89169240573004 |
| 2022-10-17T17:10:20Z | 11.358605472976624 |
| 2022-10-17T17:10:30Z | 28.71147881415803 |
| 2022-10-17T17:10:40Z | -30.928830759588756 |
| 2022-10-17T17:10:50Z | -22.411848631056067 |
| 2022-10-17T17:11:00Z | 17.05503606764129 |
| 2022-10-17T17:11:10Z | 9.834382683760559 |
| 2022-10-17T17:11:20Z | -12.62058579127679 |
| 2022-10-17T17:11:30Z | -44.44668391211515 |
| 2022-11-02T17:50:00Z | 10.56555566168836 |
| 2022-11-02T17:50:10Z | -29.76098586714259 |
| 2022-11-02T17:50:20Z | -67.50435038579738 |
| 2022-11-02T17:50:30Z | -16.758669047964453 |
| 2022-11-02T17:50:40Z | -47.25865245658065 |
| 2022-11-02T17:50:50Z | 66.16082461651365 |
| 2022-11-02T17:51:00Z | -0.9179216017921821 |
| 2022-11-02T17:51:10Z | -56.89169240573004 |
| 2022-11-02T17:51:20Z | 11.358605472976624 |
| 2022-11-02T17:51:30Z | 28.71147881415803 |
| 2022-11-02T17:51:40Z | -30.928830759588756 |
| 2022-11-02T17:51:50Z | -22.411848631056067 |
| 2022-11-02T17:52:00Z | 17.05503606764129 |
| 2022-11-02T17:52:10Z | 9.834382683760559 |
| 2022-11-02T17:52:20Z | -12.62058579127679 |
| 2022-11-02T17:52:30Z | -44.44668391211515 |
#### Output data
| _time | _value |
| -------------------- | ------------------- |
| 2022-10-17T17:09:00Z | 10.56555566168836 |
| 2022-10-17T17:09:20Z | -67.50435038579738 |
| 2022-10-17T17:09:30Z | -16.758669047964453 |
| 2022-10-17T17:09:40Z | -47.25865245658065 |
| 2022-10-17T17:09:50Z | 66.16082461651365 |
| 2022-10-17T17:10:00Z | -0.9179216017921821 |
| 2022-10-17T17:10:10Z | -56.89169240573004 |
| 2022-10-17T17:10:20Z | 11.358605472976624 |
| 2022-10-17T17:10:30Z | 28.71147881415803 |
| 2022-10-17T17:10:40Z | -30.928830759588756 |
| 2022-10-17T17:10:50Z | -22.411848631056067 |
| 2022-10-17T17:11:00Z | 17.05503606764129 |
| 2022-10-17T17:11:10Z | 9.834382683760559 |
| 2022-10-17T17:11:20Z | -12.62058579127679 |
| 2022-10-17T17:11:30Z | -44.44668391211515 |
| 2022-11-02T17:50:00Z | 10.56555566168836 |
| 2022-11-02T17:50:20Z | -67.50435038579738 |
| 2022-11-02T17:50:30Z | -16.758669047964453 |
| 2022-11-02T17:50:40Z | -47.25865245658065 |
| 2022-11-02T17:50:50Z | 66.16082461651365 |
| 2022-11-02T17:51:00Z | -0.9179216017921821 |
| 2022-11-02T17:51:10Z | -56.89169240573004 |
| 2022-11-02T17:51:20Z | 11.358605472976624 |
| 2022-11-02T17:51:30Z | 28.71147881415803 |
| 2022-11-02T17:51:40Z | -30.928830759588756 |
| 2022-11-02T17:51:50Z | -22.411848631056067 |
| 2022-11-02T17:52:00Z | 17.05503606764129 |
| 2022-11-02T17:52:10Z | 9.834382683760559 |
| 2022-11-02T17:52:20Z | -12.62058579127679 |
| 2022-11-02T17:52:30Z | -44.44668391211515 |
{{% /expand %}}
{{< /expand-wrapper >}}
@ -218,48 +218,48 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data
| _time | _value |
| -------------------- | ------------------- |
| 2022-10-17T17:09:00Z | 10.56555566168836 |
| 2022-10-17T17:09:10Z | -29.76098586714259 |
| 2022-10-17T17:09:20Z | -67.50435038579738 |
| 2022-10-17T17:09:30Z | -16.758669047964453 |
| 2022-10-17T17:09:40Z | -47.25865245658065 |
| 2022-10-17T17:09:50Z | 66.16082461651365 |
| 2022-10-17T17:10:00Z | -0.9179216017921821 |
| 2022-10-17T17:10:10Z | -56.89169240573004 |
| 2022-10-17T17:10:20Z | 11.358605472976624 |
| 2022-10-17T17:10:30Z | 28.71147881415803 |
| 2022-10-17T17:10:40Z | -30.928830759588756 |
| 2022-10-17T17:10:50Z | -22.411848631056067 |
| 2022-10-17T17:11:00Z | 17.05503606764129 |
| 2022-10-17T17:11:10Z | 9.834382683760559 |
| 2022-10-17T17:11:20Z | -12.62058579127679 |
| 2022-10-17T17:11:30Z | -44.44668391211515 |
| 2022-11-02T17:50:00Z | 10.56555566168836 |
| 2022-11-02T17:50:10Z | -29.76098586714259 |
| 2022-11-02T17:50:20Z | -67.50435038579738 |
| 2022-11-02T17:50:30Z | -16.758669047964453 |
| 2022-11-02T17:50:40Z | -47.25865245658065 |
| 2022-11-02T17:50:50Z | 66.16082461651365 |
| 2022-11-02T17:51:00Z | -0.9179216017921821 |
| 2022-11-02T17:51:10Z | -56.89169240573004 |
| 2022-11-02T17:51:20Z | 11.358605472976624 |
| 2022-11-02T17:51:30Z | 28.71147881415803 |
| 2022-11-02T17:51:40Z | -30.928830759588756 |
| 2022-11-02T17:51:50Z | -22.411848631056067 |
| 2022-11-02T17:52:00Z | 17.05503606764129 |
| 2022-11-02T17:52:10Z | 9.834382683760559 |
| 2022-11-02T17:52:20Z | -12.62058579127679 |
| 2022-11-02T17:52:30Z | -44.44668391211515 |
#### Output data
| _time | _value |
| -------------------- | ------------------- |
| 2022-10-17T17:09:00Z | 10.56555566168836 |
| 2022-10-17T17:09:20Z | -67.50435038579738 |
| 2022-10-17T17:09:30Z | -16.758669047964453 |
| 2022-10-17T17:09:40Z | -47.25865245658065 |
| 2022-10-17T17:09:50Z | 66.16082461651365 |
| 2022-10-17T17:10:00Z | -0.9179216017921821 |
| 2022-10-17T17:10:10Z | -56.89169240573004 |
| 2022-10-17T17:10:20Z | 11.358605472976624 |
| 2022-10-17T17:10:30Z | 28.71147881415803 |
| 2022-10-17T17:10:40Z | -30.928830759588756 |
| 2022-10-17T17:10:50Z | -22.411848631056067 |
| 2022-10-17T17:11:00Z | 17.05503606764129 |
| 2022-10-17T17:11:10Z | 9.834382683760559 |
| 2022-10-17T17:11:30Z | -44.44668391211515 |
| 2022-11-02T17:50:00Z | 10.56555566168836 |
| 2022-11-02T17:50:20Z | -67.50435038579738 |
| 2022-11-02T17:50:30Z | -16.758669047964453 |
| 2022-11-02T17:50:40Z | -47.25865245658065 |
| 2022-11-02T17:50:50Z | 66.16082461651365 |
| 2022-11-02T17:51:00Z | -0.9179216017921821 |
| 2022-11-02T17:51:10Z | -56.89169240573004 |
| 2022-11-02T17:51:20Z | 11.358605472976624 |
| 2022-11-02T17:51:30Z | 28.71147881415803 |
| 2022-11-02T17:51:40Z | -30.928830759588756 |
| 2022-11-02T17:51:50Z | -22.411848631056067 |
| 2022-11-02T17:52:00Z | 17.05503606764129 |
| 2022-11-02T17:52:10Z | 9.834382683760559 |
| 2022-11-02T17:52:30Z | -44.44668391211515 |
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -117,7 +117,7 @@ sampledata.float()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data
@ -165,7 +165,7 @@ sampledata.float()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -70,7 +70,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -65,7 +65,7 @@ sampledata.float()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -65,7 +65,7 @@ sampledata.float()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -83,7 +83,7 @@ sampledata.float()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -63,7 +63,7 @@ sampledata.int()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -67,7 +67,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -69,7 +69,7 @@ sampledata.int(includeNull: true)
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -75,7 +75,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -115,7 +115,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data
@ -178,7 +178,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -79,7 +79,7 @@ sampledata.string()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -83,12 +83,12 @@ requests.peek(response: requests.get(url: "https://api.agify.io", params: ["name
Connection: keep-alive,
Content-Length: 41,
Content-Type: application/json; charset=utf-8,
Date: Mon, 17 Oct 2022 17:11:48 GMT,
Date: Wed, 02 Nov 2022 17:52:50 GMT,
Server: nginx/1.16.1,
X-Rate-Limit-Limit: 1000,
X-Rate-Limit-Remaining: 996,
X-Rate-Limit-Reset: 24492,
X-Request-Id: Fx7qdsmQdfsDXoogUafx
X-Rate-Limit-Reset: 22030,
X-Request-Id: FyPV_RiwO6f_Aa4KMKDB
] | 200 |
{{% /expand %}}

View File

@ -189,12 +189,12 @@ requests.peek(response: response)
Cache-Control: max-age=604800,
Content-Length: 1256,
Content-Type: text/html; charset=UTF-8,
Date: Mon, 17 Oct 2022 17:11:48 GMT,
Date: Wed, 02 Nov 2022 17:52:50 GMT,
Etag: "3147526947",
Expires: Mon, 24 Oct 2022 17:11:48 GMT,
Expires: Wed, 09 Nov 2022 17:52:50 GMT,
Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT,
Server: EOS (vny/0453)
] | 160451441 |
Server: EOS (vny/0454)
] | 97549784 |
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -86,7 +86,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -87,7 +87,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -77,7 +77,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -1,7 +1,7 @@
---
title: sample package
description: >
The `sample` package provides functions for downloading and ouputting InfluxDB sample datasets.
The `sample` package provides functions for downloading and outputting InfluxDB sample datasets.
menu:
flux_0_x_ref:
name: sample
@ -29,7 +29,7 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
------------------------------------------------------------------------------->
The `sample` package provides functions for downloading and ouputting InfluxDB sample datasets.
The `sample` package provides functions for downloading and outputting InfluxDB sample datasets.
Import the `influxdata/influxdb/sample` package:
```js

View File

@ -65,7 +65,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -69,7 +69,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -63,7 +63,7 @@ sampledata.float()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -63,7 +63,7 @@ sampledata.float()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -0,0 +1,68 @@
---
title: testing.assertMatches() function
description: >
`testing.assertMatches()` tests whether a string matches a given regex.
menu:
flux_0_x_ref:
name: testing.assertMatches
parent: internal/testing
identifier: internal/testing/assertMatches
weight: 201
flux/v0.x/tags: [tests]
introduced: LATEST
---
<!------------------------------------------------------------------------------
IMPORTANT: This page was generated from comments in the Flux source code. Any
edits made directly to this page will be overwritten the next time the
documentation is generated.
To make updates to this documentation, update the function comments above the
function definition in the Flux source code:
https://github.com/influxdata/flux/blob/master/stdlib/internal/testing/testing.flux#L67-L73
Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
------------------------------------------------------------------------------->
`testing.assertMatches()` tests whether a string matches a given regex.
##### Function type signature
```js
(got: string, want: regexp) => stream[{v: string, _diff: string}]
```
{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}}
## Parameters
### got
({{< req >}})
Value to test.
### want
({{< req >}})
Regex to test against.
## Examples
### Test if two values are equal
```js
import "internal/testing"
testing.assertMatches(got: "123", want: /12/)
```

View File

@ -21,7 +21,7 @@ documentation is generated.
To make updates to this documentation, update the function comments above the
function definition in the Flux source code:
https://github.com/influxdata/flux/blob/master/stdlib/internal/testing/testing.flux#L34-L42
https://github.com/influxdata/flux/blob/master/stdlib/internal/testing/testing.flux#L35-L46
Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md

View File

@ -71,7 +71,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -70,7 +70,7 @@ sampledata.float()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -75,7 +75,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -73,7 +73,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -74,7 +74,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -75,7 +75,7 @@ sampledata.float()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -75,7 +75,7 @@ sampledata.float()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -75,7 +75,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -75,7 +75,7 @@ sampledata.float()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -75,7 +75,7 @@ sampledata.float()
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

View File

@ -79,7 +79,7 @@ data
```
{{< expand-wrapper >}}
{{% expand "View example input and output data" %}}
{{% expand "View example input and output" %}}
#### Input data

Some files were not shown because too many files have changed in this diff Show More