Skip to content

Commit

Permalink
Falling back to config file defaults in using executor class (#43)
Browse files Browse the repository at this point in the history
* Falling back to config file defaults in using executor class

Falling back to config file defaults when using executor via instantiation of executor class

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Venkat Bala <[email protected]>
3 people authored Oct 5, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 5d9bc3f commit 0bcc728
Showing 2 changed files with 15 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -7,10 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]


### Fixed

- Falling back to config file defaults when using executor via instantiation of executor class

### Docs

- Updated docs to include more information about required/optional config values, and provide information about each cloud resource that needs to be provisioned.


## [0.11.0] - 2022-10-03


17 changes: 9 additions & 8 deletions covalent_awslambda_plugin/awslambda.py
Original file line number Diff line number Diff line change
@@ -151,11 +151,11 @@ class AWSLambdaExecutor(AWSExecutor):

def __init__(
self,
credentials_file: str,
profile: str,
region: str,
s3_bucket_name: str,
execution_role: str,
credentials_file: str = None,
profile: str = None,
region: str = None,
poll_freq: int = None,
timeout: int = None,
memory_size: int = None,
@@ -164,11 +164,12 @@ def __init__(

# AWSExecutor parameters
required_attrs = {
"credentials_file": credentials_file,
"profile": profile,
"region": region,
"s3_bucket_name": s3_bucket_name,
"execution_role": execution_role,
"credentials_file": credentials_file
or get_config("executors.awslambda.credentials_file"),
"profile": profile or get_config("executors.awslambda.profile"),
"region": region or get_config("executors.awslambda.region"),
"s3_bucket_name": s3_bucket_name or get_config("executors.awslambda.s3_bucket_name"),
"execution_role": execution_role or get_config("executors.awslambda.execution_role"),
}

super().__init__(**required_attrs)

0 comments on commit 0bcc728

Please sign in to comment.