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

Add jpp which is an extended superset of the jp command #224

Open
wants to merge 50 commits into
base: develop
Choose a base branch
from

Commits on Mar 22, 2013

  1. Merge branch 'release-0.0.2'

    jamesls committed Mar 22, 2013
    Configuration menu
    Copy the full SHA
    126621f View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2013

  1. Merge branch 'release-0.0.3'

    * release-0.0.3: (22 commits)
      Bump version to 0.0.3
      There's no tests/unit dir, just tests/
      Add travis.yml file
      Update escape compliance test to escape quotes
      Remove escape sequences
      Allow identifiers to be surrounded in double quotes
      Add proper string escaping
      Verify whitespace separator not required for '||'
      Support root level wildcards
      Simplify wildcard values parsing
      Simplify index parsing
      Add more tests to basic test spec
      Add more test cases for indices json spec
      Add a proper __repr__ to ORExpression nodes
      Change 'or' to '||'
      Add jp command line
      Don't include tests as part of package list
      Add jp command line interface
      Add support for root indexing
      Add note on pronounciation in README
      ...
    jamesls committed Oct 9, 2013
    Configuration menu
    Copy the full SHA
    fd87696 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2013

  1. Merge branch 'release-0.1.0'

    * release-0.1.0: (25 commits)
      Bump version to 0.1.0
      Add with_str_method to ParseError class as well
      Map __str__ appropriately in py2/py3
      Catch case where object can't be indexed
      Improve lexer/parser error messages
      Fix example in spec
      Update docs/spec/grammar for new multiselect hash
      Update multiselect hash to require key names
      Initial commit of spec docs
      Update grammar with multiselect changes
      Update grammar for quoted char escapes
      Remove unneeded pretty_print
      Add multiselect tests for multifieldlist
      Pullup common multiselect code into base class
      Implement multiselect with array syntax
      Add tests for AST when constructing by hand
      Add more tests for root level multiselects
      Rename scalaridentifiers to nonbranched-expr
      Bug fix for scalaridentifier in multiselect
      Allow recursive scalaridentifier in multimatch expressions
      ...
    jamesls committed Oct 17, 2013
    Configuration menu
    Copy the full SHA
    54d0620 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2013

  1. Merge branch 'release-0.2.0'

    * release-0.2.0:
      Bump version to 0.2.0
      Update compliance tests for projections on non list values
      Fix wildcard projection bug
      Add a JEP number to the docs
      Change JEP status to accepted
      Allow perftest to run an arbitrary directory
      Allow wildcard projections on wildcards
      Fix issue 18, indexing wildcard projections
      Fixing typo
      Adding a nested-expressions proposal
      Adding a place for JMESPath proposals
      Add another index test
      Update the spec/grammar for list flattening
      Add test for single element multiselect with flattening
      Add more tests for the flattening operator
      Make index expressions in flatten expression consistent
      Update jmespath with alternate merging behavior
      Add more indices tests
      Initial commit of flattened multiselect
      Fix unbalanced parens in grammar
    jamesls committed Dec 6, 2013
    Configuration menu
    Copy the full SHA
    e7df117 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2013

  1. Merge branch 'release-0.2.1'

    * release-0.2.1:
      Bump version to 0.2.1
      Don't project non list elements in flattening operator
      Remove duplicate test case
      Update spec with the JEP 6 grammar
      Add unicode literal compliance test
      Implement JEP 6
      Add note about compliance test differences
      Update JEP to allow "_" as a valid unquoted identifier
      Add JEP 6 proposal
      Update spec/tests for wildcard syntax
      Implement JEP 1
    jamesls committed Dec 19, 2013
    Configuration menu
    Copy the full SHA
    fd8af34 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2014

  1. Merge branch 'release-0.3.0'

    * release-0.3.0: (48 commits)
      Bump version number to 0.3.0
      Fix bug in py26
      Update JEP with latest edits
      Adding JEP number
      Adding a functions JEP
      Document function projections in the spec
      Fix types/minor formatting errors in spec docs
      Add type info for sort/to_number/to_string
      Refactor resolver/type checker into smaller functions
      Update spec to add a note about floating numbers
      Copy over jep-3 to specification.rst
      Pull sort_by and resolve=False from functions
      Fix failing test from or expression update
      Change or statements to use true/false values rather than null
      Fix bugs in sort_by
      Final compliance tests
      Add support for variadic function
      Support type checking in argspec
      Allow projections on functions
      Initial commit of jep-3
      ...
    jamesls committed Feb 28, 2014
    Configuration menu
    Copy the full SHA
    e23af23 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2014

  1. Merge branch 'release-0.3.1'

    * release-0.3.1:
      Bump version to 0.3.1
      Add docs for exptype (jep-8)
      Regen lrtables
      Initial commit of expression references
      Regen lrtables
      Add note in README about how to regen the lrtables
      Marking JEP-8 as accepted
      Add exptype to the proposals index
      Incorporate review feedback
      Initial commit of jep-8
      Add scripts to generate the lr tables
      Update perftest to run single files
      Update jp so we can actually pass the compliance tests
      Add a compliance test runner
    jamesls committed Mar 6, 2014
    Configuration menu
    Copy the full SHA
    53999ed View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2014

  1. Merge branch 'release-0.4.0'

    * release-0.4.0:
      Bump version to 0.4.0
      Disallow '@' as a top level syntax
      Remove cruft that's no longer needed after pratt-jep-4
      Fix py26 test failure by using unittest2 compat import
      Add jep-4 to proposals doc
      Add docs for pipe-expression
      Switch to hand written lexer/parser
      Add sum() function
      Use proper pronunciation guide for project name
    jamesls committed Apr 23, 2014
    Configuration menu
    Copy the full SHA
    7e1c5b1 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2014

  1. Merge branch 'release-0.4.1'

    jamesls committed May 1, 2014
    Configuration menu
    Copy the full SHA
    10ec1b9 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2014

  1. Merge branch 'release-0.5.0'

    * release-0.5.0:
      Bump version to 0.5.0
      Remove unused filter_expression AST node
      Update min/max docs with new signature
      Corrected expected results for perf tests.
      Update min*/max* to support strings
      Add starts_with, ends_with, and reverse function
      Fix lexer bug when lexing an empty string
      Add missing unit tests
      Add coveragerc file
      Fix failing build, use https link for test submodule
      Cache visitor method lookups
      Initial commit that switches to an simpler AST
      Update compliance tests with latest tests
      Add jmespath.test git repo as a submodule
      Fix to_string to json dump without spaces
      Relax compliance tests for to_string
      Fix typo
      Remove function usage from pipe.json
    jamesls committed Nov 6, 2014
    Configuration menu
    Copy the full SHA
    b445f13 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2015

  1. Merge branch 'release-0.6.0'

    jamesls committed Jan 31, 2015
    Configuration menu
    Copy the full SHA
    7cdde2b View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2015

  1. Merge branch 'release-0.6.1'

    jamesls committed Feb 3, 2015
    Configuration menu
    Copy the full SHA
    5f23fbf View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2015

  1. Merge branch 'release-0.6.2'

    * release-0.6.2:
      Bump version to 0.6.2
      Add changelog for 0.6.2
      Remove jmespath.test submodule
      Remove redundant error check in jp
      Raise IncompleteExpressionError where appropriate
      Use singular argument when expected arity is 1
      Add test for empty array with sort_by
      Fix invalid-type error messages
      Add a merge() function
      Add to_array function
      Fix filter projection parsing
      Sync jmespath.test submodule with latest changes
      Cleanup README, reorganize some sections
      Add another test for null check on slice projs
      Add gitter link in README
      Implement JEP-10, slice projections
    jamesls committed Apr 9, 2015
    Configuration menu
    Copy the full SHA
    dc57769 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2015

  1. Merge branch 'release-0.7.0'

    * release-0.7.0:
      Bump version to 0.7.0
      Update travis CI to test from .whl files
      Add nightly to python targets
      Add additional compliance tests for raw string literals
      Add a PendingDeprecationWarning to the old string literal syntax
      Initial commit of JEP-12
      Separate compliance tests utilizing quoteless literals
      Add support for wheels
    jamesls committed Apr 21, 2015
    Configuration menu
    Copy the full SHA
    0466cc1 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2015

  1. Merge branch 'release-0.7.1'

    * release-0.7.1:
      Bump version to 0.7.1
      Update jp.py to not use ordereddict
      Add more perf tests
      Add deeply nested projection perf test
      Move cases into their own directory
      Update tox to run 3.4
      Remove unused imports
      Update changelog with latest changes
      Remove unused imports for 2.6
      Update setup.py with latest information
      Rename jp to jp.py for consistency
      Fix regression when parsing filters
    jamesls committed Apr 27, 2015
    Configuration menu
    Copy the full SHA
    ee83029 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2015

  1. Merge branch 'release-0.8.0'

    * release-0.8.0:
      Bump version to 0.8.0
      Add changelog for latest release
      Add more map tests
      Add map() function
      Sync with latest jmespath.test repo
      Add support for using an ordered dictionary
      Process escaped single quotes
      Fix multiselect list parsing
      Actually pretty print the AST
      Rename variables to be full words
      Using a stateful lexer rather than a Scanner object
      Lexer cleanup and test fixes
      Lexer bug fixes
      Removing the computed table is just as fast but less code
      No longer using a regex based lexer
    jamesls committed Sep 23, 2015
    Configuration menu
    Copy the full SHA
    361838d View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2015

  1. Merge branch 'release-0.9.0'

    jamesls committed Oct 1, 2015
    Configuration menu
    Copy the full SHA
    048f594 View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2017

  1. Merge branch 'release-0.9.1'

    jamesls committed Jan 26, 2017
    Configuration menu
    Copy the full SHA
    79baf74 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2017

  1. Merge branch 'release-0.9.2'

    jamesls committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    6cde3b3 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2017

  1. Merge branch 'release-0.9.3'

    * release-0.9.3:
      Bump version to 0.9.3
      Add additional hypothesis tests for functions
      Assert more properties on parsed AST result
      Fix lexer error values
      Always create a new copy of the function table
      Add fix to changelog
      Handle scientific notation in to_number()
      Add fix to changelog
      Add tests for number type fix
      Add testing for Python 3.6 and document support
      Added fix for long and Decimal numeric types
    jamesls committed May 26, 2017
    Configuration menu
    Copy the full SHA
    b4a3f4e View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2019

  1. Merge branch 'release-0.9.4'

    jamesls committed Feb 24, 2019
    Configuration menu
    Copy the full SHA
    4a4f6db View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2020

  1. Merge branch 'release-0.9.5'

    jamesls committed Feb 24, 2020
    Configuration menu
    Copy the full SHA
    e824eee View commit details
    Browse the repository at this point in the history

Commits on May 12, 2020

  1. Merge branch 'release-0.10.0'

    jamesls committed May 12, 2020
    Configuration menu
    Copy the full SHA
    1c46efc View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2021

  1. init repo

    zmedico committed Jun 13, 2021
    Configuration menu
    Copy the full SHA
    8b59732 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2021

  1. Initial import

    zmedico committed Jun 14, 2021
    Configuration menu
    Copy the full SHA
    6a076a4 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2021

  1. jpp: fork jpp command from jpipe

    This is the first commit of a series that will port the
    golang jpp implementation to python. The jpp implementation
    is in these commits which begin with the 0.1.3 tag and end
    with the 0.1.3.1 tag:
    
    pipebus/jpp@2e59b07d58b76dd7e8c1a26d5815b8eb0d3717a3^...a8ea7c9
    zmedico committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    4ca9dd3 View commit details
    Browse the repository at this point in the history
  2. jpp: copy jpipe unit tests

    zmedico committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    9068279 View commit details
    Browse the repository at this point in the history
  3. jpp: Add --compact, -c bool flag to omit nonessential whitespace

    Reference golang implementation:
    
    pipebus/jpp@ee70420
    zmedico committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    ef5e7e3 View commit details
    Browse the repository at this point in the history
  4. jpp: decode all objects from the input stream

    Reference golang implementation:
    
    pipebus/jpp@ba4e883
    pipebus/jpp@d75cf88
    zmedico committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    b64e300 View commit details
    Browse the repository at this point in the history
  5. jpp: Add --slurp, -s bool flag like jq has

    Read one or more input JSON objects into an array and apply the
    JMESPath expression to the resulting array.
    
    Reference golang implementation:
    
    pipebus/jpp@8a08979
    zmedico committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    f51b65f View commit details
    Browse the repository at this point in the history
  6. jpp: Add --accumulate, -a option which accumulates all output objects…

    … into a single recursively merged object
    
    This option will accumulate all output objects into a single
    recursively merged output object.
    
    Reference golang implementation:
    
    pipebus/jpp@e7989df
    zmedico committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    0bbc90f View commit details
    Browse the repository at this point in the history
  7. version 0.1.3.1

    zmedico committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    8acf6dc View commit details
    Browse the repository at this point in the history
  8. jpp: fix --accumulate array merge to coalesce duplicates

    Reference golang implementation:
    
    pipebus/jpp@0abe226
    
    Fixes: 0bbc90f ("jpp: Add --accumulate, -a option which accumulates all output objects into a single recursively merged object")
    zmedico committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    72e273e View commit details
    Browse the repository at this point in the history
  9. Add jpp which is an extended superset of the jp command

    $ jpp --help
    usage: jpp [-h] [-a] [-c] [-e EXPR_FILE] [-f FILENAME] [-s] [-u] [--ast] [expression]
    
      jpp is an extended superset of the jp CLI for JMESPath
    
    positional arguments:
      expression
    
    optional arguments:
      -h, --help            show this help message and exit
      -a, --accumulate      Accumulate all output objects into a single recursively merged output object.
      -c, --compact         Produce compact JSON output that omits nonessential whitespace.
      -e EXPR_FILE, --expr-file EXPR_FILE
                            Read JMESPath expression from the specified file.
      -f FILENAME, --filename FILENAME
                            The filename containing the input data. If a filename is not given then data is read from stdin.
      -s, --slurp           Read one or more input JSON objects into an array and apply the JMESPath expression to the resulting array.
      -u, --unquoted        If the final result is a string, it will be printed without quotes.
      --ast                 Only print the AST of the parsed expression. Do not rely on this output, only useful for debugging purposes.
    
    There's also a golang implementation in jmespath/jp#30.
    zmedico committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    3771021 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2021

  1. jpp: default to the identity expression @ if no expression is given

    Reference golang implementation:
    
    pipebus/jpp@74c0bbd
    zmedico committed Jun 16, 2021
    Configuration menu
    Copy the full SHA
    fbd3751 View commit details
    Browse the repository at this point in the history
  2. jpp: Add --read-raw, -R bool flag like jq has

    Reference golang implementation:
    
    pipebus/jpp@b025412
    zmedico committed Jun 16, 2021
    Configuration menu
    Copy the full SHA
    a61cdea View commit details
    Browse the repository at this point in the history
  3. jpp: Add --raw, -r bool flag like jq has (an alias for unquoted)

    Reference golang implementation:
    
    pipebus/jpp@39fd791
    zmedico committed Jun 16, 2021
    Configuration menu
    Copy the full SHA
    073bb88 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    478b397 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d69e8e4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    827491f View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2021

  1. jpp: rename --read-raw to --raw-input for consistency with jq

    Reference golang implementation:
    
    pipebus/jpp@fbd178f
    zmedico committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    6b5b611 View commit details
    Browse the repository at this point in the history
  2. jpp: Add --unbox, -u flag (and drop --unquoted to reduce clutter)

    If the final result is a list, unbox it into a stream of output
    objects that is suitable for consumption by --slurp mode.
    
    Reference golang implementation:
    
    pipebus/jpp@9caa261
    
    See: jqlang/jq#878
    zmedico committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    60cd963 View commit details
    Browse the repository at this point in the history
  3. jpp: rename --raw to --raw-output for consistency with jq

    Reference golang implementation:
    
    pipebus/jpp@f574aa5
    zmedico committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    d811157 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    31f18fb View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    666036f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4762f0d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    87036fd View commit details
    Browse the repository at this point in the history
  8. jpp: re-add --unquoted (a short -u means --unbox now)

    Reference golang implementation:
    
    pipebus/jpp@6a504e8
    zmedico committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    ff641ef View commit details
    Browse the repository at this point in the history
  9. jpp: reformatted with black

    zmedico committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    70c5ec2 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    379b70b View commit details
    Browse the repository at this point in the history