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

feat: Add --save-params option #5808

Merged
merged 12 commits into from
Sep 14, 2023
Merged

feat: Add --save-params option #5808

merged 12 commits into from
Sep 14, 2023

Conversation

Leo10Gama
Copy link
Member

Why is this change necessary?

With the addition of this parameter, it will be possible for users to save parameters to the config file directly from the terminal as they are passed in. This will simplify the process of setting up configurations, since the file doesn't have to be open.

How does it address the issue?

The --save-params option has been added to most of the existing commands. With it, when run, any command passed in via the terminal will be saved to the provided config file.

What side effects does this change have?

Most commands now have an additional parameter, and an additional decorator on their cli() methods.

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • Add input/output type hints to new functions/methods
  • Write design document if needed (Do I need to write a design document?)
  • Write/update unit tests
  • Write/update integration tests
  • Write/update functional tests if needed
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

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

@Leo10Gama Leo10Gama requested a review from a team as a code owner August 21, 2023 17:54
@github-actions github-actions bot added area/package sam package command area/deploy sam deploy command area/validate sam validate command area/init sam init area/logs sam logs command area/build sam build command area/publish sam publish command area/local/invoke sam local invoke command area/pipeline area/delete area/sync sam sync command area/traces area/schema JSON schema file pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Aug 21, 2023
@Leo10Gama Leo10Gama changed the title Add --save-params option feat: Add --save-params option Aug 21, 2023
@lucashuy lucashuy added pr/internal and removed pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Aug 21, 2023
samcli/cli/cli_config_file.py Show resolved Hide resolved
samcli/cli/cli_config_file.py Show resolved Hide resolved
tests/unit/cli/test_cli_config_file.py Outdated Show resolved Hide resolved
Copy link
Contributor

@lucashuy lucashuy left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes! Just two minor comments, but the other changes look good to me

samcli/cli/cli_config_file.py Outdated Show resolved Hide resolved
tests/unit/cli/test_cli_config_file.py Show resolved Hide resolved
Copy link
Contributor

@hnnasit hnnasit left a comment

Choose a reason for hiding this comment

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

Left small comments but overall looks good to me!

samcli/cli/cli_config_file.py Outdated Show resolved Hide resolved
samcli/cli/cli_config_file.py Show resolved Hide resolved
@lucashuy lucashuy added this pull request to the merge queue Sep 14, 2023
Merged via the queue into aws:develop with commit e215b4e Sep 14, 2023
76 checks passed
@Leo10Gama Leo10Gama deleted the save-params branch September 28, 2023 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build sam build command area/delete area/deploy sam deploy command area/init sam init area/local/invoke sam local invoke command area/logs sam logs command area/package sam package command area/pipeline area/publish sam publish command area/schema JSON schema file area/sync sam sync command area/traces area/validate sam validate command pr/internal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants