Skip to content

Commit

Permalink
Added documentation for BMI_PORT precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
goord committed Mar 11, 2020
1 parent d4713d8 commit cc4e057
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/server/python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The installation of the grpc4bmi package installs the ``run-bmi-server`` command
$ run-bmi-server --name <PACKAGE>.<MODULE>.<CLASS>
where ``<PACKAGE>``, ``<MODULE>`` are the python package and module containing your python BMI model, which should contain a python class ``<CLASS>`` that implements Bmi. The script assumes that this class does not take any constructor arguments. Upon running, the server will report which networking port it has decided to use on the terminal. This port will later be needed by BMI clients to communicate with your service.
The port can also be specified by adding the option ``--port <PORT>`` or pre-define the environment variable ``BMI_PORT``.
The port can also be specified by adding the option ``--port <PORT>`` or pre-define the environment variable ``BMI_PORT`` (the latter takes precedence over the former).
An extra system path can be specified by adding the option ``--path <PATH>`` or pre-define the environment variable ``BMI_PATH``.


Expand Down
4 changes: 3 additions & 1 deletion grpc4bmi/run_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ def build_parser():
help="Full name of the BMI implementation class. The module should be in your search "
"path and the class should have a constructor with no arguments")
parser.add_argument("--port", "-p", metavar="N", default=0, type=int,
help="Network port for the GRPC server and client. If 0, let the OS choose an available port")
help="Network port for the GRPC server and client. If 0, let the OS choose an available port. "
"If the BMI_PORT environment variable is specified, it will take precedence over this "
"argument")
parser.add_argument("--path", "-d", metavar="DIR", default=None, type=str,
help="Extra path name to append to the server instance process")
lang_choices = ['python']
Expand Down

0 comments on commit cc4e057

Please sign in to comment.