Commit Graph

178 Commits

Author SHA1 Message Date
JT
610e3911f6
Bump to 0.41 (#4187) 2021-12-08 06:21:00 +13:00
Jae-Heon Ji
9548e5ef5b
feat(random): add random-integer and random-uuid (#440)
* feat(randome): add random-integer

* feat(random): add random-uuid
2021-12-06 06:22:50 +13:00
Fernando Herrera
29efbee285
corrected missing shellerror type (#439) 2021-12-05 13:25:37 +00:00
onthebridgetonowhere
df5ac9b71c
Port str datetime to into datetime (#424)
* Port str datetime to into datetime

* Fix the span issue and some other small cleanups
2021-12-04 16:41:02 +13:00
JT
89cbfd758d
Remove 'arboard' (#4174) 2021-12-02 08:48:03 +13:00
Darren Schroeder
ce4d9dc7c6
allow icons to be used in grid -c (#378)
* add icons to grid output. still needs cleanup

* working but adds a dependency on ansi_term - need to fix that

* update styling, added lots of green code to icons

* clippy

* add config point for grid icons
2021-11-29 14:37:09 -06:00
Luccas Mateus
414ed4877a
From ssv from xml (#383)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo

* Deal with streams when they are not tables

* From xml and from ssv

* linting
2021-11-30 08:22:13 +13:00
Fernando Herrera
c8b16c14d5
Option to replace command same name (#374)
* option to replace command same name

* moved order of custom value declarations

* arranged dataframe folders and objects

* sort help commands by name

* added dtypes function for debugging

* corrected name for dataframe commands

* command names using function
2021-11-28 19:35:02 +00:00
Luccas Mateus
8043516d75
from vcf from ics and from ini (#367)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo

* Deal with streams when they are not tables

* `from toml` command

* From ods

* From XLSX

* From ics

* From ini

* From vcf

* Forgot a eprintln!
2021-11-26 06:10:56 +13:00
Fernando Herrera
76019f434e
Dataframe feature (#361)
* custom value trait

* functions for custom value trait

* custom trait behind flag

* open dataframe command

* command to-df for basic types

* follow path for dataframe

* dataframe operations

* dataframe not default feature

* custom as default feature

* corrected examples in command
2021-11-23 08:14:40 +00:00
Darren Schroeder
250743f60f
add coloring by primitive, bring in nu-ansi-term crate (#353)
* add coloring by primitive, bring in nu-ansi-term crate

* clippy
2021-11-20 07:12:35 -06:00
ahkrr
e06df124ca
upgrading dependencies (#4135)
* upgrade dependencies
num-bigint 0.3.1 -> 0.4.3
bigdecimal-rs 0.2.1 -> bigdecimal 0.3.0
s3hander 0.7 -> 0.7.5
bat 0.18 -> 0.18, default-features = false

* upgrade arboard 1.1.0 -> 2.0.1

* in polars use comfy-table instead of prettytable-rs
the last release of prettytable-rs was `0.8.0 Sep 27, 2018`
and it uses `term 0.5` as a dependency

* upgrade dependencies

* upgrade trash -> 2.0.1

Co-authored-by: ahkrr <alexhk@protonmail.com>
2021-11-20 07:11:11 -06:00
Luccas Mateus
00aac850fd
from xlsx from ods and from toml (#352)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo

* Deal with streams when they are not tables

* `from toml` command

* From ods

* From XLSX
2021-11-20 08:23:35 +13:00
JT
2590fcbe5c
Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
Nico Mandery
16db368232
upgrade polars to 0.17 (#4122) 2021-11-16 12:01:02 +13:00
Luccas Mateus
db2bca56c9
from url and from eml (#324)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo

* Deal with streams when they are not tables

* FromEml and FromUrl

Added tests for from eml
2021-11-13 09:46:39 +13:00
onthebridgetonowhere
586c6d9fa8
Port str find replace (#325)
* Port str find_replace command

* Add regex crate as dependency

Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2021-11-11 12:11:34 +13:00
Luccas Mateus
75cfee28b2
from yaml and from yml (#322)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo

* Deal with streams when they are not tables

* `from yaml` and `from yml`

`from yaml` and `from yml`

from yaml and from yml

* Fix collect_string

* Fix tests and linting
2021-11-10 14:02:33 +13:00
JT
bb1740d733
Add from csv and from tsv (#320) 2021-11-10 09:17:37 +13:00
Michael Angerman
573cb38bab
Port over the shuffle command from nushell (#300)
* initial commit of shuffle

* port the shuffle command from nushell
2021-11-07 14:19:57 +13:00
onthebridgetonowhere
a1f141d18a
Port str case commands (#287)
* Port camel case and kebab case

* Port pascal case

* Port snake case and screaming snake case

* Cleanup before PR

* Add back cell path support for str case commands

* Add cell path tests for str case command

* Revert "Add cell path tests for str case command"

This reverts commit a0906318d95fd2b5e4f8ca42f547a7e4c5db381a.

* Add cell path test cases for str case command

* Move cell path tests from tests.rs to Examples in each of the command's file

Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2021-11-07 06:55:25 +13:00
Luccas Mateus
c7d159a0f3
Last three math commands, eval, variance and stddev (#292)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo
2021-11-06 06:58:40 +13:00
Fernando Herrera
12eed1f98a plugin feature flag 2021-11-02 20:56:00 +00:00
JT
7b2116dc29
Merge pull request #270 from elferherrera/plugins
Plugins for engine q
2021-11-02 19:07:45 +13:00
Stefan Stanciulescu
20c770370b Port date commands to engine-q 2021-10-31 07:54:51 +01:00
Fernando Herrera
51e48bee53 Merge branch 'main' of https://github.com/nushell/engine-q into plugins 2021-10-28 07:12:40 +01:00
JT
2b06ce27d3
Bump to 0.39 (#4097) 2021-10-27 08:36:41 +13:00
JT
5455270446 Add a simple parallel each 2021-10-26 14:30:53 +13:00
Fernando Herrera
232790f488 plugin command 2021-10-23 21:08:54 +01:00
JT
1b745015c3 little cleanup 2021-10-16 07:51:25 +13:00
Gabriel B Gutierrez
8c2ae1eed1 -i flag finished, lacking tests 2021-10-14 14:54:51 -03:00
Justin
f5ce63ad55
Merge branch 'nushell:main' into main 2021-10-12 14:56:45 -07:00
xiuxiu62
94d00b28b7 add unicode-segmentation crate 2021-10-12 14:55:07 -07:00
Darren Schroeder
ffd922f393 add ability to parse strings like "100kib" and "100 kib" 2021-10-12 15:22:12 -05:00
xiuxiu62
97ca242634 add rm command + stubs for open and save 2021-10-09 21:13:15 -07:00
Fernando Herrera
41366f6cc4 Merge branch 'main' of https://github.com/nushell/engine-q into unit-test 2021-10-09 14:17:07 +01:00
Fernando Herrera
e3e4ae0591 example unit test 2021-10-09 14:10:10 +01:00
Darren Schroeder
5ddf0d209d respect lscolors env var; measure width minus ansi 2021-10-08 09:40:20 -05:00
Darren Schroeder
58d73d4c23 moved grid to it's own crate named nu-term-grid 2021-10-07 10:32:39 -05:00
Tanishq Kancharla
d481d5ca96 Merge branch 'main' of https://github.com/nushell/engine-q into source-command 2021-10-05 22:16:07 -04:00
JT
e1ebd461d2
Bump to 0.28 (#4064) 2021-10-06 06:35:25 +13:00
JT
f000d5d0a1
Remove the broken scrolling support (#4063)
* Remove the broken scrolling support

* Remove the broken scrolling support
2021-10-06 05:57:14 +13:00
Darren Schroeder
e402adbba0 WIP: output ls as a grid vs table 2021-10-05 08:43:20 -05:00
JT
535ece4e76 Add unit parsing and eval support 2021-10-05 15:27:39 +13:00
Tanishq Kancharla
dfd321a679
Merge branch 'main' into source-command 2021-10-03 14:25:00 -04:00
JT
91090e1db1 Add simple cd 2021-10-03 09:16:37 +13:00
Tanishq Kancharla
2d4e471052 fix more merge conflicts 2021-10-01 22:17:32 -04:00
Tanishq Kancharla
16c60f44d5 merge w/ upstream 2021-10-01 22:09:16 -04:00
JT
503939dcbe add sys command 2021-10-01 19:53:47 +13:00
JT
3e232a5db8 Add 'from json' 2021-10-01 18:11:49 +13:00
Squirrel
4e0d7bc77c
Less deps (#4038)
* compiles on nightly now. (breaking change)

* less deps

* Switch over to new resolver

(it's been stable for a while.)

* let's leave num-format for another PR
2021-09-28 07:17:00 +13:00
JT
8581bec891
bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
Fernando Herrera
c164ef5489
Update to polars 0.16 (#4013)
* update to polars 0.16

* enabled features for polars
2021-09-16 07:10:12 +12:00
JT
1d80a68f4c
bump to 0.37 (#4006) 2021-09-15 06:44:24 +12:00
Tanishq Kancharla
1d945d8ce3 added source command 2021-09-11 00:54:24 -04:00
JT
26d50ebcd5 Add a very silly table 2021-09-10 14:27:12 +12:00
JT
16baf5e16a Add a very silly ls 2021-09-10 13:06:44 +12:00
JT
7c8504ea24 Add commands 2021-09-03 10:58:15 +12:00
JT
3d252a9797 Add nu-protocol 2021-09-02 13:29:43 +12:00
JT
08014c6a98
Move sys, ps, fetch, post to internal commands (#3983)
* Move sys, ps, fetch, post to internal commands

* Remove old plugins

* clippy

Co-authored-by: JT <jonatha.d.turner@gmail.com>
2021-09-01 14:29:09 +12:00
Jakub Žádník
d95375d494
nu-path crate refactor (#3730)
* Resolve rebase artifacts

* Remove leftover dependencies on removed feature

* Remove unnecessary 'pub'

* Start taking notes and fooling around

* Split canonicalize to two versions; Add TODOs

One that takes `relative_to` and one that doesn't.
More TODO notes.

* Merge absolutize to and rename resolve_dots

* Add custom absolutize fn and use it in path expand

* Convert a couple of dunce::canonicalize to ours

* Update nu-path description

* Replace all canonicalize with nu-path version

* Remove leftover dunce dependencies

* Fix broken autocd with trailing slash

Trailing slash is preserved *only* in paths that do not contain "." or
"..". This should be fixed in the future to cover all paths but for now
it at least covers basic cases.

* Use dunce::canonicalize for canonicalizing

* Alow cd recovery from non-existent cwd

* Disable removed canonicalize functionality tests

Remove unused import

* Break down nu-path into separate modules

* Remove unused public imports

* Remove abundant cow mapping

* Fix clippy warning

* Reformulate old canonicalize tests to expand_path

They wouldn't work with the new canonicalize.

* Canonicalize also ~ and ndots; Unify path joining

Also, add doc comments in nu_path::expansions.

* Add comment

* Avoid expanding ndots if path is not valid UTF-8

With this change, no lossy path->string conversion should happen in the
nu-path crate.

* Fmt

* Slight expand_tilde refactor; Add doc comments

* Start nu-path integration tests

* Add tests TODO

* Fix docstring typo

* Fix some doc strings

* Add README for nu-path crate

* Add a couple of canonicalize tests

* Add nu-path integration tests

* Add trim trailing slashes tests

* Update nu-path dependency

* Remove unused import

* Regenerate lockfile
2021-08-28 15:59:09 +03:00
JT
7fe05b8296
bump to 0.36.1 (#3972) 2021-08-27 20:48:58 +12:00
JT
991a4801b1
Bump to 0.36 (#3963) 2021-08-25 06:01:17 +12:00
Fernando Herrera
02b2c55146
Rolling and cumulative commands (#3960)
* rolling and cumulative operations

* update polars to 0.15.1

* change reference in function
2021-08-24 09:10:29 -05:00
JT
ead4029d49
Bump rustyline and add unalias test (#3935) 2021-08-18 05:55:34 +12:00
soumil-07
cd814851da
Use bigdecimal-rs patch (#3905)
* Use bigdecimal-rs patch

* fix nu-serde's bigdecimal dependency
2021-08-07 09:27:19 +12:00
Lily Mara
ba483155d7
Reimplement parsers with nu-serde (#3880)
The nu-serde crate allows us to become much more generic with respect to how we
convert output to `nu-protocol::Value`s. This allows us to remove a lot of the
special-case code that we wrote for deserializing JSON values.

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2021-08-06 11:46:19 -05:00
Fernando Herrera
63abe1cb3e
Datetime commands (#3894)
* date and duration from nu

* date commands

* Import to feature flag

* corrected to-csv example

* corrected sample example
2021-08-05 17:18:53 -05:00
JT
bc682066d8
Bump to 0.35 (#3884) 2021-08-03 20:01:09 +12:00
Fernando Herrera
83b28cad8d
Remove dependencies (#3853)
* nuframe in its own type in UntaggedValue

* Removed eager dataframe from enum

* Dataframe created from list of values

* Corrected order in dataframe columns

* Returned tag from stream collection

* Removed series from dataframe commands

* Arithmetic operators

* forced push

* forced push

* Replace all command

* String commands

* appending operations with dfs

* Testing suite for dataframes

* Unit test for dataframe commands

* improved equality for dataframes

* moving all dataframe operations to protocol
2021-07-27 14:20:06 -05:00
Peter Cunderlik
111477aa74
Add sha256 to the hash command (#3836)
Hashers now uses on Rust Crypto Digest trait which makes it trivial to
implement additional hash functions.

The original `md5` crate does not implement the Digest trait and was
replaced by `md-5` crate which does. Sha256 uses already included `sha2`
crate.
2021-07-25 14:08:08 -05:00
JT
226739d13f
Bump to 0.34.1 (#3835) 2021-07-25 22:58:33 +12:00
Fernando Herrera
3645a0f0e4
Updated polars version for faster CSV reader (#3781) 2021-07-14 15:33:21 -05:00
JT
71f4ea9d76
Bump to 0.34.0 (#3766) 2021-07-14 05:57:41 +12:00
Jakub Žádník
56855f9791
Downgrade crossterm to fix pager compilation (#3740)
* Downgrade crossterm to fix pager compilation

With 0.20.0, the `table-pager` feature wouldn't compile.
Closes #3738

* Update Cargo.lock
2021-07-07 15:24:42 +12:00
Bruce Mitchener
651d425046
Remove ptree dep from nu-command, remove associated feature. (#3741)
Nothing used the `ptree` feature or optional dependency within
`nu-command` except to include it within the `version` output. This
may be related to when `nu-cli` also had a `ptree` feature, but
I'm not sure.

That leaves the code within `nu_plugin_tree` as the sole remaining
user of `ptree`, which is already covered by the feature `tree`
and included in the `version` output.
2021-07-06 10:33:24 -05:00
Bruce Mitchener
d1df9b9e38
Update minus, tui to remove crossterm 0.18 dep. (#3739)
We already depend on crossterm 0.19 (and 0.20), so we can at least
remove the usage of 0.18 by updating minus and tui.
2021-07-06 20:44:07 +12:00
Daniel Egger
b8c3a10e5b
Bump a few source compatible nu-command dependencies (#3724)
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
2021-07-05 19:16:34 +12:00
Daniel Egger
cab181832f
Bump rand version used by nu-command to 0.8 (#3723)
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
2021-07-05 16:12:44 +12:00
Fernando Herrera
af2b2c668d
New take command (#3722)
* Type in command description

* filter name change

* Clean column name

* Clippy error and updated polars version

* Lint correction in file

* CSV Infer schema optional

* Correct float operations

* changes in series castings to allow other types

* Clippy error correction

* Removed lists from command signatures

* Added not command for series

* take command with args

* set with idx command
2021-07-05 11:46:53 +12:00
Fernando Herrera
596062ccab
Clean column names (#3678)
* Type in command description

* filter name change

* Clean column name

* Clippy error and updated polars version

* Lint correction in file
2021-06-25 19:09:41 +12:00
JT
edbc828fc3
Bump to 0.33.1 (#3671) 2021-06-23 19:57:41 +12:00
JT
55cab9eb4f
Bump to 0.33 (#3667) 2021-06-22 17:22:33 +12:00
Niklas Jonsson
a8f6a13239
Move path handling to nu-path (#3653)
* fixes #3616
2021-06-20 11:07:26 +12:00
Fernando Herrera
b9f1371994
Series commands (#3652)
* new series commands

* clippy corrections
2021-06-20 10:59:39 +12:00
Jakub Žádník
4140834e4c
Remove dir-s/ectories/ectories-support features (#3647) 2021-06-19 11:29:29 +12:00
Andrés N. Robalino
2a946af81e
Support version option in Nu bin. (#3632)
Additionally we remove the little pieces that we relied on `clap` (for version number in this case).
2021-06-16 14:53:28 -05:00
Fernando Herrera
c4163c3621
Series arithmetic (#3602)
* operations with series

* contains operations with series

* Checked division and masked operations
2021-06-11 09:39:51 +12:00
Fernando Herrera
aa1cd7eba6
Series Operation (#3563)
* Sample command

* Join command with checks

* More dataframes commands

* Groupby and aggregate commands

* Missing feature dataframe flag

* Renamed file

* New commands for dataframes

* error parser and df reference

* filter command for dataframes

* removed name from nu_dataframe

* commands to save to parquet and csv

* polars new version

* new dataframe commands

* series type and print

* Series basic arithmetics

* Add new column to dataframe

* Command names changed to nushell standard
2021-06-08 05:27:46 +12:00
JT
7d78f40bf6
Bump to 0.32.1 (#3553) 2021-06-04 19:07:50 +12:00
Fernando Herrera
5537dce3cc
Dataframe commands (#3502)
* Sample command

* Join command with checks

* More dataframes commands

* Groupby and aggregate commands

* Missing feature dataframe flag

* Renamed file

* New commands for dataframes

* error parser and df reference

* filter command for dataframes

* removed name from nu_dataframe

* commands to save to parquet and csv
2021-06-03 18:23:14 +12:00
JT
df526f73be
Bump to 0.32 (#3521)
* Bump to 0.32

* Bump to 0.32
2021-06-01 08:14:50 +12:00
Christian Menges
29a77fd6ae
Bump rusqlite from 0.24.2 to 0.25.3 (#3523) 2021-06-01 07:34:51 +12:00
Fernando Herrera
3a5ee1aed0
Dataframe commands (#3498)
* Sample command

* Join command with checks

* More dataframes commands

* Groupby and aggregate commands

* Missing feature dataframe flag

* Renamed file
2021-05-27 17:09:48 +12:00
Fernando Herrera
e335e4fddc
Groupby operations on dataframes (#3473)
* Added PolarsStruct enum to implement groupby

* template groupby

* groupby operationi on dataframes
2021-05-23 19:37:04 +12:00
Fernando Herrera
d0229cb96e
Load parquet and json files (#3437)
* Load parquet and json files

* changed csv file error
2021-05-19 07:33:10 +12:00
Darren Schroeder
0612e5ccfb
updated to the latest rustyline (#3439) 2021-05-18 12:36:55 -05:00
Marc Schreiber
dc9cd7d8b9
Add Support for Partial Completions (#3432)
This commit adds a conditional event handler that inserts the next word of the
hint text when the user presses control and right arrow.
2021-05-16 08:43:43 +12:00
JT
2bb23c57df
Bump to 0.31.1 (#3411) 2021-05-12 15:06:50 +12:00
Fernando Herrera
c80a9585b0
Complete Dataframe MVP (#3373)
* Dataframe MVP

* Removed test csv file

* Dataframe MVP

* Removed test csv file

* New revision polars

* New revision polars

* csv file reader

* argument parser for file reader

* Parser from Row primitive

* Column conversion

* Added as f32 and f64

* Parsing row to dataframe

* Removed repeated push to vector

* Accept table values to create dataframe

* Removed default serde

* Dataframe to rows to show data

* Save name of file with dataframe

* Usage example

* Upgrade polars version

* Clippy changes

* Added print function with head and tail

* Move dataframe struct to folder

* Lock file after running tests and merge

* Optional feature for dataframe

* Removed dataframe from plugins

* Update primitive.rs

Co-authored-by: JT <jonathandturner@users.noreply.github.com>
2021-05-12 13:01:31 +12:00