Skip to content

Commit

Permalink
Last Fixes before release
Browse files Browse the repository at this point in the history
Background
=========

As the release for v5.1.0 of the solution is getting ready
we are ensuring that all of the quality-bar items
such as SonarQube are running as expected.
Additionally, we are ensuring that proper license information
is noted on all our source codes.
  • Loading branch information
dch90 committed Feb 22, 2023
1 parent e4fa9fd commit fe30bbd
Show file tree
Hide file tree
Showing 69 changed files with 247 additions and 123 deletions.
123 changes: 52 additions & 71 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ information to effectively respond to your bug report or contribution.

We welcome you to use the GitHub issue tracker to report bugs or suggest features.

When filing an issue, please check [existing open](https://github.com/aws-solutions/media-insights-on-aws/issues), or [recently closed](https://github.com/aws-solutions/media-insights-on-aws/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
When filing an issue, please check [open issues](https://github.com/aws-solutions/media-insights-on-aws/issues), or [closed issues](https://github.com/aws-solutions/media-insights-on-aws/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:

* A reproducible test case or series of steps
Expand Down Expand Up @@ -54,7 +54,7 @@ [email protected] with any additional questions or comments.
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.


## Licensing
## License

See the [LICENSE](https://github.com/aws-solutions/media-insights-on-aws/blob/mainline/LICENSE.txt) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

Expand Down
9 changes: 7 additions & 2 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ This software includes third party software subject to the following copyrights:

aws-amplify under the Apache License Version 2.0
aws-amplify-vue under the Apache License Version 2.0
aws_xray_sdk under the Apache License Version 2.0
aws-xray-sdk under the Apache License Version 2.0
boto3 under the Apache License Version 2.0
botocore under the Apache License Version 2.0
chalice under the Apache License Version 2.0
docker under the Apache License Version 2.0
docopt under the Massachusetts Institute of Technology license
jsonpickle under the BSD 3-Clause "New" or "Revised" License
jsonschema under the Massachusetts Institute of Technology license
nltk under the Apache License Version 2.0
pymediainfo under the Massachusetts Institute of Technology license
pytest under the Massachusetts Institute of Technology license
pytest-cov under the Massachusetts Institute of Technology license
requests under the Apache License Version 2.0
requests_aws4auth under the Massachusetts Institute of Technology license
simplejson under the Massachusetts Institute of Technology license
urllib3 under the Massachusetts Institute of Technology license

webvtt-py under the Massachusetts Institute of Technology license
3 changes: 3 additions & 0 deletions deployment/build-s3-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ popd || exit 1

zip -g ./dist/webcaptions.zip ./webcaptions.py
cp "./dist/webcaptions.zip" "$regional_dist_dir/webcaptions.zip"
rm -rf ./dist ./package

# ------------------------------------------------------------------------------"
# Translate Operations
Expand Down Expand Up @@ -659,6 +660,7 @@ popd || exit 1

zip -q -g dist/workflowstream.zip ./*.py
cp "./dist/workflowstream.zip" "$regional_dist_dir/workflowstream.zip"
rm -rf ./dist ./package

echo "------------------------------------------------------------------------------"
echo "Dataplane API Stack"
Expand Down Expand Up @@ -723,6 +725,7 @@ fi
popd || exit 1
zip -q -g ./dist/anonymous-data-logger.zip ./anonymous-data-logger.py
cp "./dist/anonymous-data-logger.zip" "$regional_dist_dir/anonymous-data-logger.zip"
rm -rf ./dist ./package

echo "------------------------------------------------------------------------------"
echo "CloudFormation Templates"
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sonar.exclusions= \
source/operators/test, \
source/lib/**/*, \
source/operators/captions/dist/*, \
source/operators/captions/package/**/*, \
**/package/**, \
source/operators/captions/requirements.txt, \
source/operators/captions/setup.cfg

Expand Down
18 changes: 2 additions & 16 deletions source/anonymous-data-logger/anonymous-data-logger.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
##############################################################################
# Copyright 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. #
# A copy of the License is located at #
# #
# http://www.apache.org/licenses/ #
# #
# or in the "license" file accompanying this file. This file is distributed #
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, #
# express or implied. See the License for the specific language governing #
# permissions and limitations under the License. #
##############################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#
# PURPOSE:
# This function sends anonymous performance data to the AWS
# Solutions metrics API. This information is anonymous and helps improve the
# quality of the solution.
#
##############################################################################

import uuid
import lib.cfnresponse as cfn
Expand Down
16 changes: 2 additions & 14 deletions source/anonymous-data-logger/lib/cfnresponse.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
##############################################################################
# Copyright 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. #
# A copy of the License is located at #
# #
# http://www.apache.org/licenses/ #
# #
# or in the "license" file accompanying this file. This file is distributed #
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, #
# express or implied. See the License for the specific language governing #
# permissions and limitations under the License. #
##############################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import requests
import json
Expand Down
16 changes: 2 additions & 14 deletions source/anonymous-data-logger/lib/metrics.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
##############################################################################
# Copyright 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. #
# A copy of the License is located at #
# #
# http://www.apache.org/licenses/ #
# #
# or in the "license" file accompanying this file. This file is distributed #
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, #
# express or implied. See the License for the specific language governing #
# permissions and limitations under the License. #
##############################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import datetime
import json
Expand Down
3 changes: 3 additions & 0 deletions source/lib/MediaInsightsEngineLambdaHelper/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import setuptools

with open("README.md", "r") as fh:
Expand Down
2 changes: 1 addition & 1 deletion source/workflowapi/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

# SPDX-License-Identifier: Apache-2.0

from chalice import Chalice
from chalice import IAMAuthorizer
from chalice import NotFoundError, BadRequestError, ChaliceViewError, ConflictError
Expand Down
1 change: 0 additions & 1 deletion test/e2e/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0


import pytest
import boto3
import json
Expand Down
1 change: 0 additions & 1 deletion test/integ/dataplaneapi/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0


import pytest
import boto3
import requests
Expand Down
3 changes: 3 additions & 0 deletions test/unit/anonymous-data-logger/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest

@pytest.fixture(autouse=True)
Expand Down
3 changes: 3 additions & 0 deletions test/unit/anonymous-data-logger/lib/test_cfnresponse.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

from unittest.mock import MagicMock
import requests, json, unittest

Expand Down
3 changes: 3 additions & 0 deletions test/unit/anonymous-data-logger/lib/test_metrics.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import unittest
from unittest.mock import MagicMock
import json, datetime, urllib.request as request
Expand Down
3 changes: 3 additions & 0 deletions test/unit/anonymous-data-logger/test_anonymous-data-logger.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import re, unittest, importlib
from unittest.mock import MagicMock

Expand Down
3 changes: 3 additions & 0 deletions test/unit/dataplaneapi/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest
from chalice.test import Client
from botocore.stub import Stubber
Expand Down
3 changes: 3 additions & 0 deletions test/unit/dataplaneapi/test_dataplaneapi_app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import botocore.stub
import botocore.exceptions
import json
Expand Down
3 changes: 3 additions & 0 deletions test/unit/dataplanestream/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest
from botocore.stub import Stubber

Expand Down
3 changes: 3 additions & 0 deletions test/unit/dataplanestream/test_stream.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

def test_deserialize_non_list_dict():
# imports
import stream
Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/captions/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest
from botocore.stub import Stubber

Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/captions/test_webcaptions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest
import json
from unittest.mock import MagicMock
Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/comprehend/entities/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest
from botocore.stub import Stubber

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import io, pytest
import tarfile as tar
from botocore.response import StreamingBody
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest, json
from botocore.response import StreamingBody
from io import BytesIO
Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/comprehend/key_phrases/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest
from botocore.stub import Stubber

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import io, pytest
import tarfile as tar
from botocore.response import StreamingBody
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest, json
from unittest.mock import MagicMock
from botocore.response import StreamingBody
Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/helper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

def get_operator_parameter(metadata = {}, input = {}, media = {}):
return {
'Name': 'testName',
Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/mediaconvert/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest
from botocore.stub import Stubber

Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/mediaconvert/test_get_media_convert.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest

def test_input_parameter():
Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/mediaconvert/test_start_media_convert.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest

def test_input_parameter():
Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/mediainfo/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest
from botocore.stub import Stubber

Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/mediainfo/test_mediainfo.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest, json
from pymediainfo import MediaInfo
from unittest.mock import MagicMock
Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/operator_failed/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest
from botocore.stub import Stubber

Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/operator_failed/test_operator_failed.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest

def get_input_parameter():
Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/polly/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest
from botocore.stub import Stubber

Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/polly/test_get_polly.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest

def test_input_parameter():
Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/polly/test_start_polly.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest, json
from botocore.response import StreamingBody
from io import BytesIO
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest
from botocore.stub import Stubber
from unittest.mock import MagicMock
Expand Down
3 changes: 3 additions & 0 deletions test/unit/operators/rekognition/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest
from botocore.stub import Stubber

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import pytest
from botocore.stub import Stubber
from unittest.mock import MagicMock
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

from check_rekognition_test_tool import CheckRekognitionTestTool


Expand Down
Loading

0 comments on commit fe30bbd

Please sign in to comment.