Commit Graph

8109 Commits

Author SHA1 Message Date
b12a265f1e writing to stdout 2021-09-25 15:56:33 +01:00
cf60f72452 table as string output 2021-09-25 15:47:23 +01:00
a176f12c9e Start simple module parsing 2021-09-25 17:14:20 +03:00
d6df367c6b Corrected typo (#4040)
It is not BSON but SQLite
2021-09-25 04:25:00 -05:00
JT
a2996abd47 improve table for lists 2021-09-25 20:58:02 +12:00
JT
b8d218e65b Update TODO.md 2021-09-25 20:46:43 +12:00
4e6327de1d Added BigInt handling to the delimited file format for the 'to' command (#4034)
Co-authored-by: patrick <patrick@spol42069.hitronhub.home>
2021-09-25 09:47:16 +12:00
b3d8666db0 compiles on nightly now. (breaking change) (#4037) 2021-09-25 09:46:48 +12:00
JT
d1da75d315 Merge pull request #62 from elferherrera/lines
Better print out for stream output
2021-09-25 05:39:06 +12:00
1de7c3d033 Scraping multiple tables (#4036)
* Output error when ls into a file without permission

* math sqrt

* added test to check fails when ls into prohibited dir

* fix lint

* math sqrt with tests and doc

* trigger wasm build

* Update filesystem_shell.rs

* Fix Running echo .. starts printing integers forever

* Allow for multiple table scraping

* linting

* Fix clippy

* linting

Co-authored-by: Jonathan Turner <jonathandturner@users.noreply.github.com>
2021-09-24 08:08:13 -05:00
767d822cbf change line format for test 2021-09-24 13:20:50 +01:00
b4977f1515 better print out for stream output 2021-09-24 13:03:39 +01:00
JT
6c589affe7 Merge pull request #61 from elferherrera/externals
Externals with redirection
2021-09-24 10:26:38 +12:00
cb9db792a6 filtering empty lines 2021-09-23 20:44:50 +01:00
04990eeba4 allow collect warning 2021-09-23 20:39:42 +01:00
772f8598dd lines command 2021-09-23 20:03:08 +01:00
JT
95439f5e9c Merge pull request #60 from zkat/main
deps: bump to miette 3.0 mainline
2021-09-24 06:01:04 +12:00
36c32e9832 input from ValueStream 2021-09-23 18:01:20 +01:00
660e8b5b73 external with redirection 2021-09-23 17:42:03 +01:00
5d442a287f deps: bump to miette 3.0 mainline 2021-09-22 16:50:57 -07:00
962b258cc6 merge span (#4031) 2021-09-23 07:48:05 +12:00
59697cab63 force rebuild of dev container (#4033) 2021-09-23 07:47:28 +12:00
JT
984538555c Merge pull request #59 from nushell/validation
multiline validation
2021-09-22 17:34:48 +12:00
JT
0ccbebee7a multiline validation 2021-09-22 17:29:53 +12:00
JT
9f9bec38e1 Merge pull request #58 from nushell/entry_num
Show entry number in error
2021-09-22 15:43:39 +12:00
JT
d1474c0691 Show entry number in error 2021-09-22 15:14:57 +12:00
JT
673137be8b Merge pull request #57 from zkat/main
Fix multifile miette crash
2021-09-22 13:02:43 +12:00
180dafb84c Merge branch 'nushell:main' into main 2021-09-21 17:57:35 -07:00
2553da3dc4 bump miette to fix multi-file rendering bug 2021-09-21 17:57:16 -07:00
a7ecf7af90 add magical debugging code to SourceCode impl for future debugging 2021-09-21 17:54:20 -07:00
JT
ff1adbd346 Merge pull request #55 from zkat/main
use miette's new panic hook
2021-09-22 10:02:09 +12:00
32f39c2fb8 use miette's new panic hook 2021-09-21 12:47:52 -07:00
JT
923330aadd Merge pull request #54 from zkat/main
Fix issue with unexpected EOF rendering in miette
2021-09-22 06:30:12 +12:00
c87414e462 Fix issue with unexpected EOF rendering in miette 2021-09-21 09:30:43 -07:00
JT
dbfd2808ba Merge pull request #53 from nushell/error_improvements
Add some improvements to errors
2021-09-21 16:12:47 +12:00
JT
3c18cac134 use the fancy 2021-09-21 16:10:29 +12:00
JT
4841d62d76 Add some improvements to errors 2021-09-21 16:03:06 +12:00
JT
e5aa8b9d3f Merge pull request #52 from zkat/main
replace codespan-reporting with miette 3.0
2021-09-21 12:58:14 +12:00
a1d6cefdf8 replace codespan-reporting with miette 3.0 2021-09-20 17:14:20 -07:00
JT
d532f3f304 Merge pull request #51 from elferherrera/externals
External with input
2021-09-21 09:56:47 +12:00
349af05da8 Do not throw error for files not found in lib_dirs (#4029) 2021-09-20 13:44:47 -05:00
29771c7d23 clippy errors 2021-09-20 10:42:03 +01:00
cb0914ecb0 remove enter scope 2021-09-20 10:32:55 +01:00
JT
b3b3cf0689 Remove the docker instructions
Docker has been out of date for a long time, go ahead and remove.
2021-09-20 19:33:49 +12:00
672dd5a868 external with input 2021-09-19 22:48:33 +01:00
JT
cbe85cbeaf Merge pull request #50 from elferherrera/externals
Externals proposal
2021-09-20 09:37:12 +12:00
6731e3542d clippy errors 2021-09-19 22:05:24 +01:00
5d59234f8d Flexibility updating table's cells. (#4027)
Very often we need to work with tables (say extracted from unstructured data or some
kind of final report, timeseries, and the like).

It's inevitable we will be having columns that we can't know beforehand what their names
will be, or how many.

Also, we may end up with certain cells having values we may want to remove as we explore.

Here, `update cells` fundamentally goes over every cell in the table coming in and updates
the cell's contents with the output of the block passed. Basic example here:

```
> [

    [   ty1,       t2,       ty];

    [     1,        a, $nothing]
    [(wrap), (0..<10),      1Mb]
    [    1s,     ({}),  1000000]
    [ $true,   $false,   ([[]])]

] | update cells { describe }

───┬───────────────────────┬───────────────────────────┬──────────
 # │          ty1          │            t2             │    ty
───┼───────────────────────┼───────────────────────────┼──────────
 0 │ integer               │ string                    │ nothing
 1 │ row Column(table of ) │ range[[integer, integer)] │ filesize
 2 │ string                │ nothing                   │ integer
 3 │ boolean               │ boolean                   │ table of
───┴───────────────────────┴───────────────────────────┴──────────
```

and another one (in the examples) for cases, say we have a timeseries table generated and
we want to remove the zeros and have empty strings and save it out to something like CSV.

```
> [
    [2021-04-16, 2021-06-10, 2021-09-18, 2021-10-15, 2021-11-16, 2021-11-17, 2021-11-18];
    [        37,          0,          0,          0,         37,          0,          0]
] | update cells {|value| i
  if ($value | into int) == 0 {
    ""
  } {
    $value
  }
}

───┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────
 # │ 2021-04-16 │ 2021-06-10 │ 2021-09-18 │ 2021-10-15 │ 2021-11-16 │ 2021-11-17 │ 2021-11-18
───┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────
 0 │         37 │            │            │            │         37 │            │
───┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────
```
2021-09-19 15:37:54 -05:00
5a6aebfcb2 clippy errors 2021-09-19 21:09:11 +01:00
96af23f370 clippy errors 2021-09-19 20:41:35 +01:00