Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live debugging #315

Merged
merged 5 commits into from
Jul 10, 2020
Merged

Conversation

Kudbettin
Copy link
Member

-d / --debug

This option will let you peek in the stash or run IPython on the current step.
Commands

  • s: prints stash
  • d: opens Interactive Python.
  • h: prints commands
    In Python shell, context can be accessed via step.context.stash. Note that modifications to step object will carry over to the steps below.
    It is usually a better idea to inspect the stash before the step being debugged.

Notes

  • I was hoping to have an interactive and colorful way of parsing the stash, but this was the solution I could come up with.
  • Curses can be added to run the commands with a single click instead of pressing enter afterwards. However, I would need help to prevent curses from clearing the screen. (Which I is probably not easy)

Copy link
Member

@eerkunt eerkunt left a comment

Choose a reason for hiding this comment

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

Great implementation! Just remove the commented line - if not intended, and we are ready to go for the release.

@@ -94,6 +96,7 @@ def cli(arghandling=ArgHandling(), argparser=ArgumentParser(prog=__app_name__,
features_directory = os.path.join(os.path.abspath(args.features) + features_dir)

commands = ['radish',
# '--inspect-after-failure',
Copy link
Member

Choose a reason for hiding this comment

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

Remove this :)

@Kudbettin Kudbettin requested a review from eerkunt July 10, 2020 09:25
@coveralls
Copy link

coveralls commented Jul 10, 2020

Pull Request Test Coverage Report for Build 1108

  • 8 of 24 (33.33%) changed or added relevant lines in 2 files are covered.
  • 6 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.05%) to 59.358%

Changes Missing Coverage Covered Lines Changed/Added Lines %
terraform_compliance/main.py 2 3 66.67%
terraform_compliance/steps/terrain.py 6 21 28.57%
Files with Coverage Reduction New Missed Lines %
terraform_compliance/common/defaults.py 6 84.21%
Totals Coverage Status
Change from base Build 1101: -0.05%
Covered Lines: 1294
Relevant Lines: 2180

💛 - Coveralls

@eerkunt eerkunt merged commit 7ef52c9 into terraform-compliance:master Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants