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

Issue 382 tag value parser #502

Merged
merged 43 commits into from
Mar 9, 2023

Commits on Mar 9, 2023

  1. [issue-382] add lexer

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    fdf41d3 View commit details
    Browse the repository at this point in the history
  2. [issue-382] add tag-value parser

    The code is taken from the current implementation, I added a decorator function to use instead of docstrings and adapted the code according to the new data model.
    
    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    4e5ec68 View commit details
    Browse the repository at this point in the history
  3. [refactor] use pytest fixture instead of class

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    8a6c45b View commit details
    Browse the repository at this point in the history
  4. [issue-382] implement error handling

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    1efdade View commit details
    Browse the repository at this point in the history
  5. [issue-382] catch exception if not all required arguments are provide…

    …d for construction
    
    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    71689b9 View commit details
    Browse the repository at this point in the history
  6. [refactor] tests

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    77de34b View commit details
    Browse the repository at this point in the history
  7. [issue-382] add test and specify error message

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    7b96706 View commit details
    Browse the repository at this point in the history
  8. [issue-382] refactor relationship_parser

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    589466e View commit details
    Browse the repository at this point in the history
  9. [issue-382] use individual logger for current_element

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    7bf3cb8 View commit details
    Browse the repository at this point in the history
  10. [issue-382] add helper method to start a new current element

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    4d48b6e View commit details
    Browse the repository at this point in the history
  11. [issue-382] add test to parse whole document

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    5cf98f8 View commit details
    Browse the repository at this point in the history
  12. [issue-382] add function to parse_checksum

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    f26aac0 View commit details
    Browse the repository at this point in the history
  13. [issue-382] add error handling and tests for creation_info_parser

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    cbbeb2b View commit details
    Browse the repository at this point in the history
  14. [issue-382] add contains relationships

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    815e779 View commit details
    Browse the repository at this point in the history
  15. [issue-382] fix example

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    c486af0 View commit details
    Browse the repository at this point in the history
  16. [refactor] build parser when initializing class

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    1975cbf View commit details
    Browse the repository at this point in the history
  17. [issue-382] add tag-value parser to cli tool

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    0fce282 View commit details
    Browse the repository at this point in the history
  18. [fix] raise error if name is an empty string in actor_parser

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    d56aedc View commit details
    Browse the repository at this point in the history
  19. [issue-382] check that current element matches class of parsed value

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    dc4b2be View commit details
    Browse the repository at this point in the history
  20. [issue-382] add negative test for annotation_parser

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    ae635c3 View commit details
    Browse the repository at this point in the history
  21. [issue-382] add negative tests for extracted_licensing_info

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    d186f48 View commit details
    Browse the repository at this point in the history
  22. [issue-382] rename parsing methods

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    d89a2c8 View commit details
    Browse the repository at this point in the history
  23. [refactor] merge parsing functions that return the same values

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    0443b84 View commit details
    Browse the repository at this point in the history
  24. [refactor] creation_info_parser

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    e348289 View commit details
    Browse the repository at this point in the history
  25. [refactor] use helper method to set unique values

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    3d77094 View commit details
    Browse the repository at this point in the history
  26. [refactor] merge parsing methods for package dates

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    1b8d9a1 View commit details
    Browse the repository at this point in the history
  27. [issue-382] rename tests

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    5b62711 View commit details
    Browse the repository at this point in the history
  28. [issue-382] add negative tests for snippet_parser

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    c4d1ed5 View commit details
    Browse the repository at this point in the history
  29. [issue-382] add negative tests for package parser

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    d545654 View commit details
    Browse the repository at this point in the history
  30. [issue-382] merge parsing methods

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    69748da View commit details
    Browse the repository at this point in the history
  31. [issue-382] add tests for contains relationship

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    71a16d6 View commit details
    Browse the repository at this point in the history
  32. [issue-382] reformat

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    11d6d41 View commit details
    Browse the repository at this point in the history
  33. [issue-382] use tag-value parser to test tag-value writer

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    66399f8 View commit details
    Browse the repository at this point in the history
  34. [issue-382] fix logging

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    3fbe4d3 View commit details
    Browse the repository at this point in the history
  35. [issue-382] delete element_stack as it is not needed

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    1a6f744 View commit details
    Browse the repository at this point in the history
  36. [issue-382] add line number to error messages

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    6d06e60 View commit details
    Browse the repository at this point in the history
  37. squashed review commits concerning test improvement

    [review] assert that only one relationship exists
    [review] improve tests for package parser
    [review] don't use assertCountEqual if list contains only one element
    [review] add newline to <text> field
    [review] delete default values in datetime
    [fix] soften comparison of error messages to also support older python versions
    
    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    23c558f View commit details
    Browse the repository at this point in the history
  38. [review] fix type hint, parse_checksum and add test for the latter

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    1a1ca11 View commit details
    Browse the repository at this point in the history
  39. squashed review commits concerning the tag value parser

    [review] add comments to parser to improve code readability
    [review] merge parsing methods for byte_range and line_range
    [review] delete superfluous except block
    [review] delete superfluous call to setdefault
    [review] delete superfluous case distinction
    [review] rename parameter
    [review] get rid of docstrings
    [review] rename
    
    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    2c77716 View commit details
    Browse the repository at this point in the history
  40. squashed review commits concerning structure of the tag value parser

    [review] use strings instead of p.slice
    [review] merge generic parsing methods
    [review] parse value only if the current_element matches
    [review] merge parsing methods
    [review] merge error methods for current elements
    [review] delete tokens for enum values and let the parser take care of correct values
    
    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    451200d View commit details
    Browse the repository at this point in the history
  41. squashed review commits concerning structure, double quotes and naming

    [review] use double quotes
    [review] change file structure of tag value parser
    [review] rename
    
    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    c972177 View commit details
    Browse the repository at this point in the history
  42. squashed review commits with name fixes and comment improvement

    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    92379a6 View commit details
    Browse the repository at this point in the history
  43. squashed review commits

    [review] fix parsing of external document ref
    [review] use only one dictionary
    [review] return if multiple values for snippet range found
    
    Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
    meretp committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    97a8de4 View commit details
    Browse the repository at this point in the history