Introduce output data format versioning #2653 - #2682
Conversation
Add output data format version numbers to the headers and version help text. Introduce new command line option to switch to the new experimental data format. Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
591a728 to
2a00b47
Compare
Modifies tests to ignore addition of output data format in headers. Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Renames flag to --future-format and updates help text test. Adds future format version. Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
c3ad331 to
588ac9d
Compare
|
@pombredanne could you look into this why the tests with If I change this to What am I doing wrong here |
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
|
|
||
| @click.option('--future-format', | ||
| is_flag=True, | ||
| help='Output the next experimental data format, for JSON and YAML output.' |
There was a problem hiding this comment.
Use future and not experimental, here and elsewhere
|
|
||
| # See https://github.com/nexB/scancode-toolkit/issues/2653 for more information | ||
| # on the data format version | ||
| __output_format_version__ = '1.1' |
You need to push 21.8.31 to PyPI too IMHO |
pombredanne
left a comment
There was a problem hiding this comment.
IMHO you could have fewer changes in the diffs if def check_json_scan(..., ignore_headers=True) was updated to be def check_json_scan(..., include_headers=False) this way few changes are needed in the tests overall... and only a few tests that test headers will need fixing.
You have to add me at https://pypi.org/project/commoncode/ btw |
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
72ab891 to
a93fd62
Compare
Replaces ignore_header with check_header attribute with default False, to minimise diff and ignore headers by default. Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
See #2653 (comment) Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
e5da48f to
457f782
Compare
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Add output data format version numbers to the headers and version help
text. Introduce new command line option to switch to the new experimental
data format.
Signed-off-by: Ayan Sinha Mahapatra ayansmahapatra@gmail.com