Skip to content

Commit c051945

Browse files
author
Michal Ploski
committed
Fix documentation and relative imports
1 parent cf39c60 commit c051945

File tree

6 files changed

+16
-25
lines changed

6 files changed

+16
-25
lines changed

.github/workflows/run-e2e-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ jobs:
1616
steps:
1717
- name: "Checkout"
1818
uses: actions/checkout@v3
19-
#########################
20-
# Release new version
21-
#########################
2219
- name: "Use Python"
2320
uses: actions/setup-python@v3
2421
with:

MAINTAINERS.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
- [Triage Bug Reports](#triage-bug-reports)
1414
- [Triage RFCs](#triage-rfcs)
1515
- [Releasing a new version](#releasing-a-new-version)
16-
- [Run end to end tests](#run-end-to-end-tests)
1716
- [Changelog generation](#changelog-generation)
1817
- [Bumping the version](#bumping-the-version)
1918
- [Drafting release notes](#drafting-release-notes)
19+
- [Run end to end tests](#run-end-to-end-tests)
2020
- [Releasing a documentation hotfix](#releasing-a-documentation-hotfix)
2121
- [Maintain Overall Health of the Repo](#maintain-overall-health-of-the-repo)
2222
- [Manage Roadmap](#manage-roadmap)
@@ -166,17 +166,6 @@ When necessary, be upfront that the time to review, approve, and implement a RFC
166166

167167
Some examples using our initial and new RFC templates: #92, #94, #95, #991, #1226
168168

169-
### Run end to end tests
170-
171-
In order to run end to end tests you need to install CDK CLI first and bootstrap your account with `cdk bootstrap` command. For additional details follow [documentation](https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html).
172-
173-
To run locally, export `AWS_PROFILE` environment variable and run `make e2e tests`. To run from GitHub Actions, use [run-e2e-tests workflow](https://github.com/awslabs/aws-lambda-powertools-python/actions/workflows/run-e2e-tests.yml) and pick the branch you want to run tests against.
174-
175-
**NOTE**: E2E tests are run as part of each merge to `develop` branch.
176-
177-
> **Q: What if there's an error?**
178-
To be agreed
179-
180169
### Releasing a new version
181170

182171
> TODO: This is an area we want to increase automation while keeping communication at human level.
@@ -220,7 +209,13 @@ The best part comes now. Replace the placeholder `[Human readable summary of cha
220209
Once you're happy, hit `Publish release`. This will kick off the [Publishing workflow](https://github.com/awslabs/aws-lambda-powertools-python/actions/workflows/publish.yml) and within a few minutes you should see the latest version in PyPi, and all issues labeled as `pending-release` will be notified.
221210

222211
> TODO: Wait for @am29d new Lambda Layers pipeline work to complete, then add how Lambda Layers are published
212+
### Run end to end tests
213+
214+
In order to run end to end tests you need to install CDK CLI first and bootstrap your account with `cdk bootstrap` command. For additional details follow [documentation](https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html).
223215

216+
To run locally, export `AWS_PROFILE` environment variable and run `make e2e tests`. To run from GitHub Actions, use [run-e2e-tests workflow](https://github.com/awslabs/aws-lambda-powertools-python/actions/workflows/run-e2e-tests.yml) and pick the branch you want to run tests against.
217+
218+
**NOTE**: E2E tests are run as part of each merge to `develop` branch.
224219
### Releasing a documentation hotfix
225220

226221
You can rebuild the latest documentation without a full release via this [GitHub Actions Workflow](https://github.com/awslabs/aws-lambda-powertools-python/actions/workflows/rebuild_latest_docs.yml). Choose `Run workflow`, keep `develop` as the branch, and input the latest Powertools version available.

tests/e2e/logger/test_logger.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import boto3
22
import pytest
3-
4-
from .. import conftest
5-
from ..utils import helpers
3+
from e2e import conftest
4+
from e2e.utils import helpers
65

76

87
@pytest.fixture(scope="module")

tests/e2e/metrics/test_metrics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ def test_basic_lambda_metric_visible(execute_lambda: conftest.InfrastructureOutp
3636
)
3737

3838
# THEN
39-
assert metrics["Timestamps"] and len(metrics["Timestamps"]) == 1
40-
assert metrics["Values"] and len(metrics["Values"]) == 1
41-
assert metrics["Values"][0] == 1
39+
assert metrics.get("Timestamps") and len(metrics.get("Timestamps")) == 1
40+
assert metrics.get("Values") and len(metrics.get("Values")) == 1
41+
assert metrics.get("Values") and metrics.get("Values")[0] == 1

tests/e2e/tracer/test_tracer.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33

44
import boto3
55
import pytest
6-
7-
from .. import conftest
8-
from ..utils import helpers
6+
from e2e import conftest
7+
from e2e.utils import helpers
98

109

1110
@pytest.fixture(scope="module")

tests/e2e/utils/helpers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from functools import lru_cache
44
from typing import Dict, List, Optional, Union
55

6+
from mypy_boto3_cloudwatch import type_defs
67
from mypy_boto3_cloudwatch.client import CloudWatchClient
78
from mypy_boto3_lambda.client import LambdaClient
89
from mypy_boto3_xray.client import XRayClient
@@ -63,7 +64,7 @@ def get_metrics(
6364
metric_name: str,
6465
service_name: str,
6566
end_date: Optional[datetime] = None,
66-
):
67+
) -> type_defs.MetricDataResultTypeDef:
6768
response = cw_client.get_metric_data(
6869
MetricDataQueries=[
6970
{

0 commit comments

Comments
 (0)