Skip to content

Commit

Permalink
Improve serve command #771
Browse files Browse the repository at this point in the history
Merge pull request #771 from openfisca/improve-serve
  • Loading branch information
pblayo authored Nov 22, 2018
2 parents 9bc99c3 + 218696f commit dca8985
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

### 24.9.5 [#771](https://github.com/openfisca/openfisca-core/pull/771)

- Improve serve command by documenting the bind option
- Avoid crashing when no arguments are supplied

### 24.9.4 [#774](https://github.com/openfisca/openfisca-core/pull/774)

- Clarify the error message when assigning a value larger than MaxInt32 to an 'int' variable
Expand Down
5 changes: 3 additions & 2 deletions openfisca_core/scripts/openfisca_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
def get_parser():
parser = argparse.ArgumentParser()

subparsers = parser.add_subparsers(help='Available commands')
parser_serve = subparsers.add_parser('serve', help='Run the OpenFisca Web API')
subparsers = parser.add_subparsers(help = 'Available commands', dest = 'command')
subparsers.required = True # Can be added as an argument of add_subparsers in Python 3
parser_serve = subparsers.add_parser('serve', help = 'Run the OpenFisca Web API')
parser_serve = define_command_line_options(parser_serve)

return parser
Expand Down
2 changes: 1 addition & 1 deletion openfisca_web_api/scripts/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def define_command_line_options(parser):
parser = add_tax_benefit_system_arguments(parser)

# Define server configuration
parser.add_argument('-p', '--port', action = 'store', help = "port to serve on", type = int)
parser.add_argument('-p', '--port', action = 'store', help = "port to serve on (use --bind to specify host and port)", type = int)
parser.add_argument('--tracker-url', action = 'store', help = "tracking service url", type = str)
parser.add_argument('--tracker-idsite', action = 'store', help = "tracking service id site", type = int)
parser.add_argument('--tracker-token', action = 'store', help = "tracking service authentication token", type = str)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

setup(
name = 'OpenFisca-Core',
version = '24.9.5',
version = '24.9.6',
author = 'OpenFisca Team',
author_email = 'contact@openfisca.org',
classifiers = [
Expand Down

0 comments on commit dca8985

Please sign in to comment.