-
Notifications
You must be signed in to change notification settings - Fork 1
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
changing input args for genpolicy #51
Conversation
371c46c
to
686905e
Compare
fd4da7d
to
fbd03e9
Compare
291d8bd
to
2a895ff
Compare
1d0f8d3
to
6e39e89
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
875ab69
to
8f2b530
Compare
8f2b530
to
2d97d10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
python is so flexible that I think there are little ways to make kata_genpolicy
a little shorter. it's already really readable, so just sharing in case you're interested:
- using
extend()
instead of successiveappend()
s - using
or
instead of if-else
ex:
settings_file_path = settings_file_name or os.path.join(DATA_FOLDER, "genpolicy-settings.json")
rules_file_path = rules_file_name or os.path.join(DATA_FOLDER, "rules.rego")
arg_list.extend(["-j", settings_file_path, "-p", rules_file_path])
- single line if-else
containerd_arg = "-d" + (f"={containerd_socket_path}" if containerd_socket_path else "")
@ksayid I agree with |
* build: add cicd pipeline (#7) * build: move update version logic to workflow (#8) * build: Run CI on multiple python version (#38) * build: Run CI in Python 3.8-3.11 * build: remove pull request event for CI to avoid duplicate runs * test: add test cases for commands (#40) * fix: error when register API with long description spec (#41) * test: add test cases for optional parameters (#42) * feat!: remove file name param (#43) * fix: error not thrown when import spec with >3MB file (#44) * feat!: remove state param for deployment commands (#46) * fix: API title created by register command is not same with provided spec (#47) * feat!: redesign parameters to specify APIM instance for import-from-apim command (#45) * test: clean up legacy test cases (#48) * test: add test cases for command examples (#49) * docs: update help message per feedback (#50) * build: bump version to 1.0.0 and add changelog (#51) * fix: some parameters should be required in import-specification and deployment command (#53) * feat!: rename parameter names to align with other Azure CLI command experience (#52) * test: enable test for import-from-apim (#54) * test: fix show service test case (#55) * docs: update changelog for 1.0.0 (#56) * Update HISTORY.rst - jukasper updated changelog * Update HISTORY.rst * Update HISTORY.rst * Update HISTORY.rst * Update HISTORY.rst * Update HISTORY.rst * Update HISTORY.rst * Update HISTORY.rst * Update HISTORY.rst * Update HISTORY.rst * Update HISTORY.rst * Update HISTORY.rst * Update HISTORY.rst * Update HISTORY.rst * Update HISTORY.rst * Update HISTORY.rst * Update HISTORY.rst * docs: update readme for apic-extension (#57) * fix: cannot run create command against existing resource (#58) * fix: cannot run create command against existing resource * style: fix style * build: remove cicd pipeline (#59) * build: resolve review comments (#60) --------- Co-authored-by: Julia Kasper <[email protected]>
Upcoming change to genpolicy splits the
-i
flag into two separate flags so the paths to therules.rego
andgenpolicy-settings.json
are decoupled. This allows for that and makes it so custom settings files don't need to be copied to the same folder asrules.rego