Skip to content

Commit

Permalink
Added '--version' command-line option
Browse files Browse the repository at this point in the history
  • Loading branch information
vruusmann committed Dec 13, 2024
1 parent 461e802 commit e3a5f30
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jpmml_evaluator/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@

import pandas

from jpmml_evaluator import make_evaluator
from jpmml_evaluator import __version__, make_evaluator

def main():
version = "JPMML-Evaluator-Python {}".format(__version__)

parser = ArgumentParser(prog = "jpmml_evaluator", description = "JPMML-Evaluator command-line application")
parser.add_argument("model", type = str, help = "Model PMML file")
parser.add_argument("--backend", type = str, default = "jpype", help = "Java backend. One of 'jpype', 'pyjnius' or 'py4j'")
parser.add_argument("--transpile", action = "store_true", help = "Transpile PMML to Java")
parser.add_argument("-i", "--input", type = str, help = "Input CSV file. If absent, read from system input")
parser.add_argument("-o", "--output", type = str, help = "Output CSV file. If absent, write to system output")
parser.add_argument("--sep", type = str, default = ",", help = "CSV separator character")
parser.add_argument("--version", action = "version", version = version)

args = parser.parse_args()

Expand Down

0 comments on commit e3a5f30

Please sign in to comment.