Skip to content

Commit ed57561

Browse files
leandrodamascenasinofseven
authored andcommitted
chore(ci): remove pdoc3 library (aws-powertools#6024)
* Removing pdoc3 * Removing pdoc3 * Removing pdoc3 * Removing pdoc3 * Removing pdoc3
1 parent f88ca79 commit ed57561

File tree

6 files changed

+410
-60
lines changed

6 files changed

+410
-60
lines changed

.github/workflows/quality_check.yml

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ jobs:
6161
python-version: ${{ matrix.python-version }}
6262
- name: Install dependencies
6363
run: make dev-quality-code
64+
- name: Checking third-party library licenses
65+
run: make check-licenses
6466
- name: Formatting and Linting
6567
run: make lint
6668
- name: Static type checking

.github/workflows/reusable_publish_docs.yml

-3
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ jobs:
8484
aws-region: us-east-1
8585
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
8686
mask-aws-account-id: true
87-
- name: Copy API Docs
88-
run: |
89-
cp -r api site/
9087
- name: Deploy Docs (Version)
9188
env:
9289
VERSION: ${{ inputs.version }}

Makefile

+7-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
.PHONY: target dev format lint test coverage-html pr build build-docs build-docs-api build-docs-website
2-
.PHONY: docs-local docs-api-local security-baseline complexity-baseline release-prod release-test release
1+
.PHONY: target dev format lint test coverage-html pr build build-docs build-docs-website check-licenses
2+
.PHONY: docs-local security-baseline complexity-baseline release-prod release-test release
33

44
target:
55
@$(MAKE) pr
@@ -21,6 +21,10 @@ dev-gitpod:
2121
poetry install --extras "all redis datamasking"
2222
pre-commit install
2323

24+
# Running licensecheck with zero to break the pipeline if there is an invalid license
25+
check-licenses:
26+
poetry run licensecheck -u poetry:dev --zero
27+
2428
format:
2529
poetry run black aws_lambda_powertools tests examples
2630

@@ -55,7 +59,7 @@ coverage-html:
5559
pre-commit:
5660
pre-commit run --show-diff-on-failure
5761

58-
pr: lint lint-docs mypy pre-commit test security-baseline complexity-baseline
62+
pr: lint lint-docs mypy pre-commit check-licenses test security-baseline complexity-baseline
5963

6064
build: pr
6165
poetry build
@@ -65,14 +69,6 @@ release-docs:
6569
rm -rf site api
6670
@echo "Updating website docs"
6771
poetry run mike deploy --push --update-aliases ${VERSION} ${ALIAS}
68-
@echo "Building API docs"
69-
@$(MAKE) build-docs-api VERSION=${VERSION}
70-
71-
build-docs-api:
72-
poetry run pdoc --html --output-dir ./api/ ./aws_lambda_powertools --force
73-
mv -f ./api/aws_lambda_powertools/* ./api/
74-
rm -rf ./api/aws_lambda_powertools
75-
mkdir ${VERSION} && cp -R api ${VERSION}
7672

7773
docs-local:
7874
poetry run mkdocs serve
@@ -81,9 +77,6 @@ docs-local-docker:
8177
docker build -t squidfunk/mkdocs-material ./docs/
8278
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material
8379

84-
docs-api-local:
85-
poetry run pdoc --http : aws_lambda_powertools
86-
8780
security-baseline:
8881
poetry run bandit --baseline bandit.baseline -r aws_lambda_powertools
8982

aws_lambda_powertools/event_handler/openapi/params.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,10 @@ def analyze_param(
931931
The type annotation and the Pydantic field representing the parameter
932932
"""
933933
field_info, type_annotation = get_field_info_and_type_annotation(
934-
annotation, value, is_path_param, is_response_param,
934+
annotation,
935+
value,
936+
is_path_param,
937+
is_response_param,
935938
)
936939

937940
# If the value is a FieldInfo, we use it as the FieldInfo for the parameter
@@ -963,7 +966,10 @@ def analyze_param(
963966

964967

965968
def get_field_info_and_type_annotation(
966-
annotation, value, is_path_param: bool, is_response_param: bool,
969+
annotation,
970+
value,
971+
is_path_param: bool,
972+
is_response_param: bool,
967973
) -> tuple[FieldInfo | None, Any]:
968974
"""
969975
Get the FieldInfo and type annotation from an annotation and value.

0 commit comments

Comments
 (0)