-
Notifications
You must be signed in to change notification settings - Fork 18
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
cmd/ie/commands: Use RunE
instead of Run
to make code simpler
#83
Open
blanquicet
wants to merge
246
commits into
Azure:main
Choose a base branch
from
blanquicet:jose/use-rune-instead-of-run
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Created main.py and am doing a test commit * test commit * test commit * Parses a markdown file and pulls out headings, code blocks, and paragraphs * took away a few magic values & cleaned up code a bit * added the initial executor code complete with repl behavior, by no means complete and it will have bugs but it would be good to get some eyes on it before I go too much further * added a few more comments and deleted a few unused functions * Added testing directions of using python3 main.py to test * Added automated testing functionality with fuzzy matching * cleaned up code a bit and added test functionality * testing * Added github actions for automated testing * Fixing github actions * bug fix for actions * Added push to main as a trigger * bug fix * testing * changed file type to yml * testing * fixed bug with fuzzywuzzy * changing sensitivity so that actions should fail as there is a warning * Changing Sensitivity and adjust actions test * testing * test should pass now * Trying to enable manual workflow trigger * testing github actions * Changing default test * added the ability to set command line variables from both comments and .ini files which are key value pairs * updated README.md and added new test scripts * fixed test file and changed github action to point to test file not readme * Hardedned program to deal with broken markdown files, there is still no good way to deal with interactive bash commands though * added some exception handling so the program doesn't crash on a timeout * Changed Parser file class to MarkdownParser to avoid name clash with std parser, added test scripts folder for testing, and added some additional error handling for commands * removing exit(1) from test section as it terminates early if multiple files are being tested * removed exit(1) from main when file does not parse correctly * removed exit 1 to stop early failures with multiple files * adding random string to end of resource group in testing section so that there are not name conflicts. Catch is the document itself has to use MY_RESOURCE_GROUP_NAME as the variable for testing * cleaned up file structure and fixed a few bugs in Readme.md * added verion locks to requirements.txt, deleted hardcoded vm create document, added .vscode to .gitignore, and modified test script to work based on new location
* Improve getting started docs 1. fix capitlization error 2. use virtual environment 3. separate installation from running * Switch to interactive mode Co-authored-by: jasonmesser7 <[email protected]> --------- Co-authored-by: jasonmesser7 <[email protected]>
* first draft of AKS quick start with event grid notfications * Added tutorial with AKS create + Subscribing to event grid notifications * Add tests for all steps, plus a few docs improvements. --------- Co-authored-by: Ross Gardler <[email protected]>
…lti tenancy, however we need this signal for an action to fail and block a PR (Azure#15)
…from the markdown codeblocks.
…outputs from the top level.
…d INI initialization to ie execute.
* [update] sed statement to use single quotations to avoid expansion during variable rendering and format document. * [update] command rendering failures to be reported. * [fix] resource URIs not being found.
… running in cloud shell. (Azure#101)
* Fixed errors on AKS doc * Fixed errors on AKS doc * Fixed errors on AKS doc * Fixed scenario bugs and cleaned text * Reverted dns name change * Fixed styling issues * Reverting moving around variable declarations and small text changes --------- Co-authored-by: Mitchell Bifeld <mbifeld@Mitchell-Surface>
Fix multi-line command rendering and disable inline rendering
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.8.0 to 0.17.0. - [Commits](golang/net@v0.8.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
…rg/x/net-0.17.0 Bump golang.org/x/net from 0.8.0 to 0.17.0
* [fix] remove horizontal align * [update] command output to not be tabbed
@blanquicet Apologies for responding to this PR so late -- These changes look good to me. Could you sync your branch with main to resolve the merge conflicts so that I could merge this PR for you? Thanks in advance. |
Signed-off-by: Jose Blanquicet <[email protected]>
Signed-off-by: Jose Blanquicet <[email protected]>
Signed-off-by: Jose Blanquicet <[email protected]>
Signed-off-by: Jose Blanquicet <[email protected]>
Signed-off-by: Jose Blanquicet <[email protected]>
blanquicet
force-pushed
the
jose/use-rune-instead-of-run
branch
from
October 30, 2023 18:17
44b9425
to
ecf041a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using
RunE
instead ofRun
prevents us from logging and printing the error, manually displaying the help and force-exiting every time. In other words, we can pass from this:To this:
Doing so, the error will be logged and printed here:
https://github.com/blanquicet/InnovationEngine/blob/44b942573b8cdd7fbc999739074a75cb79af7193/cmd/ie/commands/root.go#L44-L45
And the
cobra
library will take care of printing the help.