-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'improve_command_line' into 'master'
Improve AppRecommender command line options See merge request !26
- Loading branch information
Showing
4 changed files
with
88 additions
and
115 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import argparse | ||
|
||
|
||
def get_parser(): | ||
apprec_description = 'Package recommender system for Debian (and derived) \ | ||
distros' | ||
parser = argparse.ArgumentParser(description=apprec_description) | ||
|
||
parser.add_argument( | ||
'-s', '--strategy', | ||
help='select strategy to run apprecommender (default: cb)', | ||
type=str) | ||
|
||
parser.add_argument( | ||
'-d', '--debug', | ||
help='run apprecommender on debug mode', | ||
type=int) | ||
|
||
parser.add_argument( | ||
'-v', '--verbose', | ||
help='run apprecommender on verbose mode', | ||
type=int) | ||
|
||
parser.add_argument( | ||
'-z', '--profile-size', | ||
help='set the profile size of an user on apprecommender', | ||
type=int) | ||
|
||
parser.add_argument( | ||
'-i', '--init', | ||
help='initialize apprecommender database', | ||
action='store_true') | ||
|
||
parser.add_argument( | ||
'-t', '--train', | ||
help='train machine learning algorithms', | ||
action='store_true') | ||
|
||
parser.add_argument( | ||
'-b', '--because', | ||
help="display which user's packages generated a recommendation", | ||
action='store_true') | ||
|
||
parser.add_argument( | ||
'-n', '--num-recommendations', | ||
help='set the number of packages that will be recommended', | ||
type=int) | ||
|
||
parser.add_argument( | ||
'-c', '--contribute', | ||
help='classify recommendations and help apprecommender to improve', | ||
action='store_true') | ||
|
||
return parser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters