Skip to content

Commit

Permalink
Merge 09eda15 into 484768c
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanpm committed Mar 27, 2020
2 parents 484768c + 09eda15 commit 53d181d
Show file tree
Hide file tree
Showing 20 changed files with 37 additions and 36 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
cdn-lambda
==========
exodus-lambda
=============

AWS Lambda functions for Red Hat's Content Delivery Network

[![Build Status](https://travis-ci.org/release-engineering/cdn-lambda.svg?branch=master)](https://travis-ci.org/release-engineering/cdn-lambda)
[![Coverage Status](https://coveralls.io/repos/github/release-engineering/cdn-lambda/badge.svg?branch=master)](https://coveralls.io/github/release-engineering/cdn-lambda?branch=master)
[![Build Status](https://travis-ci.org/release-engineering/exodus-lambda.svg?branch=master)](https://travis-ci.org/release-engineering/exodus-lambda)
[![Coverage Status](https://coveralls.io/repos/github/release-engineering/exodus-lambda/badge.svg?branch=master)](https://coveralls.io/github/release-engineering/exodus-lambda?branch=master)

- [Source](https://github.com/release-engineering/cdn-lambda)
- [Documentation](https://release-engineering.github.io/cdn-lambda/)
- [Source](https://github.com/release-engineering/exodus-lambda)
- [Documentation](https://release-engineering.github.io/exodus-lambda/)


Installation
Expand All @@ -22,7 +22,7 @@ Development
-----------

Patches may be contributed via pull requests to
https://github.com/release-engineering/cdn-lambda.
https://github.com/release-engineering/exodus-lambda.

All changes must pass the automated test suite, along with various static
checks.
Expand Down
2 changes: 1 addition & 1 deletion docs/arch.gv
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ digraph {
style="rounded";
controller;
subgraph cluster_1 {
label=<<b>cdn-lambda</b>>;
label=<<b>exodus-lambda</b>>;
style="dashed";
rank=same
origin_request;
Expand Down
2 changes: 1 addition & 1 deletion docs/arch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ S3

For more information about the data contained here, see :ref:`schema_ref`.

cdn-lambda
exodus-lambda
A project including Python-based implementations of `Lambda@Edge`_ functions for the CDN.

You are currently reading the documentation of this project.
Expand Down
7 changes: 3 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# -- Project information -----------------------------------------------------

project = "cdn-lambda"
project = "exodus-lambda"
copyright = "2020, Red Hat"
author = "Red Hat"

Expand Down Expand Up @@ -89,13 +89,12 @@
#
html_theme_options = {
"github_user": "release-engineering",
"github_repo": "cdn-lambda",
"github_repo": "exodus-lambda",
"github_button": False,
"github_banner": True,
"description": "AWS Lambda functions for Red Hat's Content Delivery Network",
"extra_nav_links": {
"Source": "https://github.com/release-engineering/cdn-lambda",
"PyPI": "https://pypi.org/project/cdn-lambda",
"Source": "https://github.com/release-engineering/exodus-lambda",
"Index": "genindex.html",
},
# default is 940px which seems to be a little too small to display 88 chars code
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cdn-lambda
==========
exodus-lambda
=============

AWS Lambda functions for Red Hat's Content Delivery Network

Expand Down
4 changes: 2 additions & 2 deletions cdn_lambda/__init__.py → exodus_lambda/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from cdn_lambda.functions.map_to_s3.map_to_s3 import (
from exodus_lambda.functions.map_to_s3.map_to_s3 import (
lambda_handler as origin_request,
)

from cdn_lambda.functions.origin_response.origin_response import (
from exodus_lambda.functions.origin_response.origin_response import (
lambda_handler as origin_response,
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/push-docs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

ORG=release-engineering
REPO=cdn-lambda
REPO=exodus-lambda

enabled(){
if [ "$TRAVIS_BRANCH" != "master" ] || [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ def get_requirements():


setup(
name="cdn_lambda",
name="exodus-lambda",
version="0.1.0",
packages=find_packages(exclude=["tests"]),
package_data={},
url="https://github.com/release-engineering/cdn-lambda",
url="https://github.com/release-engineering/exodus-lambda",
license="GNU General Public License",
description=get_description(),
long_description=get_long_description(),
Expand All @@ -39,7 +39,7 @@ def get_requirements():
install_requires=get_requirements(),
python_requires=">=3",
project_urls={
"Documentation": "https://release-engineering.github.io/cdn-lambda",
"Changelog": "https://github.com/release-engineering/cdn-lambda/blob/master/CHANGELOG.md",
"Documentation": "https://release-engineering.github.io/exodus-lambda",
"Changelog": "https://github.com/release-engineering/exodus-lambda/blob/master/CHANGELOG.md",
},
)
10 changes: 5 additions & 5 deletions tests/functions/test_map_to_s3.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from cdn_lambda.functions.map_to_s3.map_to_s3 import LambdaClient
from exodus_lambda.functions.map_to_s3.map_to_s3 import LambdaClient
import pytest
import mock
import json

TEST_PATH = "/origin/rpms/repo/ver/dir/filename.ext"
MOCKED_DT = "2020-02-17T15:38:05.864+00:00"
CONF_PATH = "cdn_lambda/functions/lambda_config.json"
CONF_PATH = "exodus_lambda/functions/lambda_config.json"


@pytest.mark.parametrize(
Expand Down Expand Up @@ -41,7 +41,7 @@
],
)
@mock.patch("boto3.client")
@mock.patch("cdn_lambda.functions.map_to_s3.map_to_s3.datetime")
@mock.patch("exodus_lambda.functions.map_to_s3.map_to_s3.datetime")
def test_map_to_s3(mocked_datetime, mocked_boto3_client, req_uri, real_uri):
mocked_datetime.now().isoformat.return_value = MOCKED_DT
mocked_boto3_client().query.return_value = {
Expand Down Expand Up @@ -69,7 +69,7 @@ def test_map_to_s3(mocked_datetime, mocked_boto3_client, req_uri, real_uri):


@mock.patch("boto3.client")
@mock.patch("cdn_lambda.functions.map_to_s3.map_to_s3.datetime")
@mock.patch("exodus_lambda.functions.map_to_s3.map_to_s3.datetime")
def test_map_to_s3_no_item(mocked_datetime, mocked_boto3_client):
mocked_datetime.now().isoformat.return_value = MOCKED_DT
mocked_boto3_client().query.return_value = {"Items": []}
Expand All @@ -82,7 +82,7 @@ def test_map_to_s3_no_item(mocked_datetime, mocked_boto3_client):


@mock.patch("boto3.client")
@mock.patch("cdn_lambda.functions.map_to_s3.map_to_s3.datetime")
@mock.patch("exodus_lambda.functions.map_to_s3.map_to_s3.datetime")
def test_map_to_s3_invalid_item(mocked_datetime, mocked_boto3_client, caplog):
mocked_datetime.now().isoformat.return_value = MOCKED_DT
mocked_boto3_client().query.return_value = {
Expand Down
2 changes: 1 addition & 1 deletion tests/functions/test_not_implemented.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from cdn_lambda.functions.not_implemented import lambda_handler
from exodus_lambda.functions.not_implemented import lambda_handler


def test_lambda_handler():
Expand Down
6 changes: 4 additions & 2 deletions tests/functions/test_origin_response.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from cdn_lambda.functions.origin_response.origin_response import LambdaClient
from exodus_lambda.functions.origin_response.origin_response import (
LambdaClient,
)
import json
import pytest

CONF_PATH = "cdn_lambda/functions/lambda_config.json"
CONF_PATH = "exodus_lambda/functions/lambda_config.json"

# Load max_age from conf file:
with open(CONF_PATH, "r") as json_file:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_import.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from cdn_lambda import origin_request
from exodus_lambda import origin_request


def test_have_origin_request():
"""cdn_lambda should export a function named origin_request"""
"""exodus_lambda should export a function named origin_request"""

assert callable(origin_request)
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ commands=
pip install --no-deps --target ./package .

# Always using hardcoded config for now.
cp cdn_lambda/functions/lambda_config.json package
cp exodus_lambda/functions/lambda_config.json package

sh -c 'cd package && zip -r ../package.zip .'
rm -rf ./package
Expand All @@ -40,7 +40,7 @@ deps=
commands_pre=
commands=
black --check .
sh -c 'pylint cdn_lambda; test $(( $? & (1|2|4|32) )) = 0'
sh -c 'pylint exodus_lambda; test $(( $? & (1|2|4|32) )) = 0'

[testenv:cov]
deps=
Expand All @@ -49,7 +49,7 @@ deps=
usedevelop=true
commands_pre=
commands=
pytest --cov-report=html --cov=cdn_lambda {posargs}
pytest --cov-report=html --cov=exodus_lambda {posargs}

[testenv:cov-travis]
passenv = TRAVIS TRAVIS_*
Expand All @@ -60,7 +60,7 @@ deps=
usedevelop=true
commands_pre=
commands=
pytest --cov=cdn_lambda {posargs}
pytest --cov=exodus_lambda {posargs}
coveralls

[testenv:docs]
Expand Down

0 comments on commit 53d181d

Please sign in to comment.