-
-
Notifications
You must be signed in to change notification settings - Fork 562
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
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>
src/scancode/cli.py
Outdated
@@ -249,6 +251,13 @@ def validate_depth(ctx, param, value): | |||
'the starting directory. Use 0 for no scan depth limit.', | |||
help_group=cliutils.CORE_GROUP, sort_order=301, cls=PluggableCommandLineOption) | |||
|
|||
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use future and not experimental, here and elsewhere
src/scancode_config.py
Outdated
|
||
# See https://github.com/nexB/scancode-toolkit/issues/2653 for more information | ||
# on the data format version | ||
__output_format_version__ = '1.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use 1.0
You need to push 21.8.31 to PyPI too IMHO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Merging!
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