Skip to content

feat: allow sam to be invoked as a module#987

Merged
sanathkr merged 4 commits intoaws:developfrom
sriram-mv:module_exec
Feb 14, 2019
Merged

feat: allow sam to be invoked as a module#987
sanathkr merged 4 commits intoaws:developfrom
sriram-mv:module_exec

Conversation

@sriram-mv
Copy link
Contributor

@sriram-mv sriram-mv commented Feb 7, 2019

  • python -m samcli.cli.main invokes sam cli

  • Write Design Document (Do I need to write a design document?)

  • Write unit tests

  • Write/update functional tests

  • Write/update integration tests

  • make pr passes

  • Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you instead add a main.py? python -m .. will call the main.py file - https://docs.python.org/3/library/__main__.html

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved, this was a good call out.

- python -m samcli.cli.main
 - added pylint rule for __main__.py because we dont need to pass ctx to
   cli, it gets added as part of a decorator.
 - added docstring
@sriram-mv
Copy link
Contributor Author

rebasing with develop, hence the force push.

@sanathkr sanathkr merged commit c7b8649 into aws:develop Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants