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

develop branch: integrate subcommands options #242

Closed
chinyeungli opened this issue Mar 16, 2016 · 8 comments
Closed

develop branch: integrate subcommands options #242

chinyeungli opened this issue Mar 16, 2016 · 8 comments
Assignees
Milestone

Comments

@chinyeungli
Copy link
Contributor

All the subcommands options such as --overwrite, --mapping, --extract_license etc. have not been integrated yet.

@chinyeungli chinyeungli self-assigned this Mar 16, 2016
@chinyeungli chinyeungli changed the title develop branch: integrate options from master develop branch: integrate options (subcommands) from master Mar 16, 2016
@chinyeungli chinyeungli changed the title develop branch: integrate options (subcommands) from master develop branch: integrate subcommands options Mar 16, 2016
chinyeungli added a commit that referenced this issue Mar 16, 2016
Added the `--overwrite` option for `inventory`
In addition, I've also added some error handling code to validate the
input before running the `inventory`
@chinyeungli
Copy link
Contributor Author

  --verbosity=VERBOSITY
                        Print more or fewer verbose messages while processing ABOUT files
                        0 - Do not print any warning or error messages, just a total count (default)
                        1 - Print error messages
                        2 - Print error and warning messages

The 0 option will not be integrated as we already have the -q, --quiet option

@chinyeungli
Copy link
Contributor Author

We need to adapt the new verbosity approach for printing the following:

# modeled after the logging levels
CRITICAL = 50
ERROR = 40
WARNING = 30
INFO = 20
DEBUG = 10
NOTSET = 0

chinyeungli added a commit that referenced this issue Apr 4, 2016
integrated the new verbosity approach.

Options:
  --overwrite          Overwrites the output file if it exists
  --verbosity INTEGER  Print more or fewer verbose messages while
processing
                       ABOUT files (Default: 30)
                       50 - CRITICAL
                       40 - ERROR
                       30 -
                       WARNING
                       20 - INFO
                       10 - DEBUG
  --help               Show this message and exit.
@chinyeungli
Copy link
Contributor Author

All the option for about.py have been integrated.

@chinyeungli
Copy link
Contributor Author

  --action=ACTION       Handle different behaviors if ABOUT files already existed
                        0 - Do nothing if ABOUT file existed (default)
                        1 - Overwrites the current ABOUT field value if existed
                        2 - Keep the current field value and only add the "new" field and field value
                        3 - Replace the ABOUT file with the current generation

Do we really need action 2 and 3? @DennisClark I would like to have your input.

@pombredanne
Copy link
Member

@chinyeungli: I think you can simplify a lot. IMHO we should not EVEN have these actions options at all.
we should always regen things as new correct data. Anything else is likely to create confusion, and it does confuse me

@DennisClark
Copy link
Member

@chinyeungli After a bit of thought, I am inclined to agree with @pombredanne that we should "always regen things as new correct data" and that the options are not necessary.

@chinyeungli
Copy link
Contributor Author

okay, thanks for the input.

chinyeungli added a commit that referenced this issue Apr 27, 2016
 * Integrate the mapping option "partially" as it's able to process the
user define keys.
 * Previous genabout behavior is not to convert input column keys/names
to lower case. However, to be as consistence as the --mapping (which
convert the mapping key to lower case), I've changed the behavior to
convert input column keys to lower case.
 * Updated some test code

Left ToDo:
 * Keys in the input but not in the MAPPING.CONFIG are also put in the
generated ABOUT files which is incorrect. We should only put keys that
are defined as the supported keys and keys that user define in the
MAPPING.CONFIG as valid. Others should not be included.
 * It currently ONLY look for MAPPING.CONFIG. In another word, user are
not able to provide path to another MAPPING file yet.
 * Need to write some test files
chinyeungli added a commit that referenced this issue Apr 29, 2016
Implemented the `--mapping` option. The fields that are included in the
MAPPING.CONFIG will be captured. Other custom fields that do not exist
in the MAPPING.CONFIG will be ignored.

Note that the feature to point to another mapping file still hasn't been
implemented yet. In addition, test code need to be updated too.
chinyeungli added a commit that referenced this issue May 6, 2016
Implemented the '--extract_license' option
 - Added a new supported key: 'dje_license_key'
 - Fill in the license_file, license_name, license_url fields if not
present
 - Update test code
chinyeungli added a commit that referenced this issue May 11, 2016
The attrib is working now with the default template. Still need code
update to have custom template input.
chinyeungli added a commit that referenced this issue May 12, 2016
Implement code for user to supply a sublist/component_list for
attribution on certain components.
@chinyeungli chinyeungli added this to the version 3 milestone May 17, 2016
chinyeungli added a commit that referenced this issue May 18, 2016
Implement option code for `--license_text_location`
chinyeungli added a commit that referenced this issue May 18, 2016
Add the '--mapping' support for attrib.
@chinyeungli
Copy link
Contributor Author

I think I've integrated all the will use options to the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants