Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaces CLI to use Pico CLI #946

Merged
merged 6 commits into from
Dec 30, 2022
Merged

Replaces CLI to use Pico CLI #946

merged 6 commits into from
Dec 30, 2022

Conversation

johnedquinn
Copy link
Member

@johnedquinn johnedquinn commented Dec 22, 2022

Relevant Issues

  • None

Description

  • Replaces JOpt with Pico CLI because it's significantly cleaner and easier to read/write.
  • Cleans up the main file substantially.
  • Updates docs.
  • Re-packages file to be contained within org.partiql.cli
  • Adjusts the shell.sh script to pass in all arguments to the CLI
  • Adds ability to pipe queries into the partiql command

New Examples

As a preface, I updated my path to be:

PATH="$HOME/Development/partiql-lang-kotlin/partiql-app/partiql-cli/build/install/partiql-cli/bin:$PATH"
### Echo
echo "SELECT VALUE 'Hello World' FROM <<0>>" | partiql
# << 'Hello World' >>

### Cat
cat ~/Desktop/query.partiql | partiql
# [0, 1]

### File parameter
partiql ~/Desktop/query.partiql
# [0, 1]

### Shell
partiql
# Welcome to the PartiQL Shell!
# ...

To Run

  • Pull this branch.
  • Run ./partiql-app/partiql-cli/shell.sh --help
  • See the available help message. I've also included a screenshot:

Screen Shot 2022-12-28 at 11 44 57 AM

Other Information

  • Updated Unreleased Section in CHANGELOG: YES
  • Any backward-incompatible changes? YES
    • Yes, but not for the library. CLI options have been modified.
  • Any new external dependencies? YES
    • Added pico-cli. Removed jopt.

License Information

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

codecov-commenter commented Dec 22, 2022

Codecov Report

Base: 83.22% // Head: 83.22% // No change to project coverage 👍

Coverage data is based on head (b576cba) compared to base (7d9c7f6).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #946   +/-   ##
=========================================
  Coverage     83.22%   83.22%           
  Complexity     1999     1999           
=========================================
  Files           218      218           
  Lines         14967    14967           
  Branches       2685     2685           
=========================================
  Hits          12456    12456           
  Misses         1720     1720           
  Partials        791      791           
Flag Coverage Δ
EXAMPLES 80.87% <ø> (ø)
EXTENSIONS 92.85% <ø> (ø)
LANG 83.28% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rg/partiql/lang/compiler/PartiQLCompilerBuilder.kt 96.61% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@johnedquinn johnedquinn requested a review from rchowell December 22, 2022 19:51
@johnedquinn johnedquinn marked this pull request as ready for review December 22, 2022 19:51
@johnedquinn johnedquinn marked this pull request as draft December 28, 2022 16:13
@johnedquinn johnedquinn requested a review from rchowell December 28, 2022 20:08
@johnedquinn johnedquinn marked this pull request as ready for review December 28, 2022 20:11
johnedquinn and others added 3 commits December 29, 2022 07:43
Co-authored-by: R. C. Howell <RCHowell@users.noreply.github.com>
Co-authored-by: R. C. Howell <RCHowell@users.noreply.github.com>
@johnedquinn johnedquinn requested a review from rchowell December 30, 2022 17:47
@johnedquinn johnedquinn merged commit bde2a3f into main Dec 30, 2022
@johnedquinn johnedquinn deleted the pico branch December 30, 2022 19:22
yliuuuu pushed a commit that referenced this pull request Jan 20, 2023
* Replaces CLI to use Pico CLI
* Repackages CLI
* Consolidates CLI commands
* Adds ability to handle queries from standard input

Co-authored-by: R. C. Howell <RCHowell@users.noreply.github.com>

* Cleans up logic

Co-authored-by: R. C. Howell <RCHowell@users.noreply.github.com>

* Adjusts options, script name, and capitalization
yliuuuu pushed a commit that referenced this pull request Jan 20, 2023
* Replaces CLI to use Pico CLI
* Repackages CLI
* Consolidates CLI commands
* Adds ability to handle queries from standard input

Co-authored-by: R. C. Howell <RCHowell@users.noreply.github.com>

* Cleans up logic

Co-authored-by: R. C. Howell <RCHowell@users.noreply.github.com>

* Adjusts options, script name, and capitalization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants