Skip to content

Commit

Permalink
Merge pull request #124 from awslabs/develop
Browse files Browse the repository at this point in the history
Version 0.4.0
  • Loading branch information
sriram-mv authored Aug 20, 2019
2 parents f40c0ae + d07ea93 commit 0620b0e
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ GitHub provides additional document on [forking a repository](https://help.githu
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/awslabs/aws-lambda-builders/labels/help%20wanted) issues is a great place to start.


## Testing with SAM CLI

1. [Activate Virtualenv](https://github.com/awslabs/aws-sam-cli/blob/develop/DEVELOPMENT_GUIDE.md) that is used for SAM CLI development.
2. Navigate to aws-lambda-builders project on your machine
3. `pip install -e .` (This will install the editable version of the aws-lambda-builers into SAM CLI's Virtualenv)

## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,17 @@
Lambda Builders is a Python library to compile, build and package AWS Lambda functions for several runtimes &
frameworks.

We are in the process of implementing this project . If you are a developer and interested in contributing,
read the [DESIGN DOCUMENT](./DESIGN.md) to understand how this works.
Lambda Builders currently contains the following workflows

* Java with Gradle
* Java with Maven
* Dotnet with amazon.lambda.tools
* Python with Pip
* Javascript with Npm
* Ruby with Bundler
* Go with Dep
* Go with Mod

Lambda Builders is the brains behind the `sam build` command from [AWS SAM CLI](https://github.com/awslabs/aws-sam-cli)

If you are a developer and interested in contributing, read the [DESIGN DOCUMENT](./DESIGN.md) to understand how this works.
2 changes: 1 addition & 1 deletion aws_lambda_builders/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
AWS Lambda Builder Library
"""
__version__ = '0.3.0'
__version__ = '0.4.0'
RPC_PROTOCOL_VERSION = "0.3"
2 changes: 1 addition & 1 deletion aws_lambda_builders/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def copytree(source, destination, ignore=None):
try:
# Let's try to copy the directory metadata from source to destination
shutil.copystat(source, destination)
except WindowsError as ex: # pylint: disable=undefined-variable
except OSError as ex:
# Can't copy file access times in Windows
LOG.debug("Unable to copy file access times from %s to %s", source, destination, exc_info=ex)

Expand Down
8 changes: 4 additions & 4 deletions aws_lambda_builders/workflows/python_pip/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PythonPipBuildAction(BaseAction):
PURPOSE = Purpose.RESOLVE_DEPENDENCIES
LANGUAGE = 'python'

def __init__(self, artifacts_dir, manifest_path, scratch_dir, runtime, binaries):
def __init__(self, artifacts_dir, scratch_dir, manifest_path, runtime, binaries):
self.artifacts_dir = artifacts_dir
self.manifest_path = manifest_path
self.scratch_dir = scratch_dir
Expand All @@ -34,9 +34,9 @@ def execute(self):
dependency_builder=dependency_builder)
try:
package_builder.build_dependencies(
self.artifacts_dir,
self.manifest_path,
self.scratch_dir
artifacts_dir_path=self.artifacts_dir,
scratch_dir_path=self.scratch_dir,
requirements_path=self.manifest_path
)
except PackagerError as ex:
raise ActionFailedError(str(ex))
6 changes: 3 additions & 3 deletions tests/unit/workflows/python_pip/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def test_action_must_call_builder(self, PythonPipDependencyBuilderMock):
})
action.execute()

builder_instance.build_dependencies.assert_called_with("artifacts",
"scratch_dir",
"manifest")
builder_instance.build_dependencies.assert_called_with(artifacts_dir_path="artifacts",
scratch_dir_path="scratch_dir",
requirements_path="manifest")

@patch("aws_lambda_builders.workflows.python_pip.actions.PythonPipDependencyBuilder")
def test_must_raise_exception_on_failure(self, PythonPipDependencyBuilderMock):
Expand Down

0 comments on commit 0620b0e

Please sign in to comment.