Title: documentation of commands/arguments · Issue #114 · google/python-fire · GitHub
Open Graph Title: documentation of commands/arguments · Issue #114 · google/python-fire
X Title: documentation of commands/arguments · Issue #114 · google/python-fire
Description: I have some questions/comments on the "user friendliness" of fire. With the following script fire_test.py import fire class Example(object): """this is an example module with some functions""" def hello(self, name, message="hello", count...
Open Graph Description: I have some questions/comments on the "user friendliness" of fire. With the following script fire_test.py import fire class Example(object): """this is an example module with some functions""" def ...
X Description: I have some questions/comments on the "user friendliness" of fire. With the following script fire_test.py import fire class Example(object): """this is an example module wi...
Opengraph URL: https://github.com/google/python-fire/issues/114
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"documentation of commands/arguments","articleBody":"I have some questions/comments on the \"user friendliness\" of fire.\r\n\r\nWith the following script `fire_test.py`\r\n```\r\nimport fire\r\n\r\n\r\nclass Example(object):\r\n \"\"\"this is an example module with some functions\"\"\"\r\n\r\n def hello(self, name, message=\"hello\", count=3):\r\n \"\"\"Says count times the message to the specified name\r\n\r\n :param name (str): the name of the person\r\n :param message (str): the message to say to the person\r\n :param count (int): the number of times the message should be repeated\r\n :return: the expected result\r\n \"\"\"\r\n return 'Hello {name}!'.format(name=name) * count\r\n\r\n\r\nif __name__ == '__main__':\r\n fire.Fire(Example)\r\n```\r\nthe call to `python fire_test.py hello` returns\r\n```\r\nFire trace:\r\n1. Initial component\r\n2. Instantiated class \"Example\" (fire_test.py:4)\r\n3. Accessed property \"hello\" (fire_test.py:7)\r\n4. ('The function received no value for the required argument:', 'name')\r\n\r\nType: method\r\nString form: \u003cbound method Example.hello of \u003c__main__.Example object at 0x0000000002A2F9E8>>\r\nFile: c:\\users\\gfj138\\pycharmprojects\\piecash\\piecash\\scripts\\fire_test.py\r\nLine: 7\r\nDocstring: Says count times the message to the specified name.\r\n\r\n:param name (str): the name of the person\r\n:param message (str): the message to say to the person\r\n:param count (int): the number of times the message should be repeated\r\n:return: the expected result\r\n\r\nUsage: fire_test.py hello NAME [MESSAGE] [COUNT]\r\n fire_test.py hello --name NAME [--message MESSAGE] [--count COUNT]\r\n```\r\nwhere:\r\n- the fire trace looks more like a \"debugging feature\" than a \"user feedback\"\r\n- the same for the Type/String form/File/Line information\r\n- the docstring is displayed as such which make it not user friendly\r\n- the default values of the optional arguments are not visible\r\n\r\nIs there some better way to document the commands and their arguments I may be missing ?\r\nAny good practice re documentation ?","author":{"url":"https://github.com/sdementen","@type":"Person","name":"sdementen"},"datePublished":"2018-02-01T13:26:57Z","url":"https://github.com/google/python-fire/issues/114"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f90d1d08-9723-75e0-18f6-9cd3db6e1532 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A36A:34D7A7:69BAE6:8E45FE:6B00391A |
| html-safe-nonce | 7cfb86514070379cd5d63dc6174f1c6ecca080e160a95068e12e55cf51d3865d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzZBOjM0RDdBNzo2OUJBRTY6OEU0NUZFOjZCMDAzOTFBIiwidmlzaXRvcl9pZCI6IjE3MDQ4OTMxNTgzNDI1Mzk1NDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2152af724ef0c5eec38320e430b4c98af4d2cae3e6156cab26aa3b532f97142d |
| hovercard-subject-tag | issue:293529520 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/google/python-fire/114/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8e39dd810b6bdd90b321fb4ab953dd53493e406ec3e53164f87e643deef86e2d/google/python-fire/issues/114 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8e39dd810b6bdd90b321fb4ab953dd53493e406ec3e53164f87e643deef86e2d/google/python-fire/issues/114 |
| og:image:alt | I have some questions/comments on the "user friendliness" of fire. With the following script fire_test.py import fire class Example(object): """this is an example module with some functions""" def ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sdementen |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/google/python-fire git https://github.com/google/python-fire.git |
| octolytics-dimension-user_id | 1342004 |
| octolytics-dimension-user_login | |
| octolytics-dimension-repository_id | 82729529 |
| octolytics-dimension-repository_nwo | google/python-fire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 82729529 |
| octolytics-dimension-repository_network_root_nwo | google/python-fire |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width