Skip to content

chore(ci): remove pdoc3 library #6024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/quality_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: make dev-quality-code
- name: Checking third-party library licenses
run: make check-licenses
- name: Formatting and Linting
run: make lint
- name: Static type checking
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/reusable_publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ jobs:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
mask-aws-account-id: true
- name: Copy API Docs
run: |
cp -r api site/
- name: Deploy Docs (Version)
env:
VERSION: ${{ inputs.version }}
Expand Down
21 changes: 7 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.PHONY: target dev format lint test coverage-html pr build build-docs build-docs-api build-docs-website
.PHONY: docs-local docs-api-local security-baseline complexity-baseline release-prod release-test release
.PHONY: target dev format lint test coverage-html pr build build-docs build-docs-website check-licenses
.PHONY: docs-local security-baseline complexity-baseline release-prod release-test release

target:
@$(MAKE) pr
Expand All @@ -21,6 +21,10 @@ dev-gitpod:
poetry install --extras "all redis datamasking"
pre-commit install

# Running licensecheck with zero to break the pipeline if there is an invalid license
check-licenses:
poetry run licensecheck -u poetry:dev --zero

format:
poetry run black aws_lambda_powertools tests examples

Expand Down Expand Up @@ -55,7 +59,7 @@ coverage-html:
pre-commit:
pre-commit run --show-diff-on-failure

pr: lint lint-docs mypy pre-commit test security-baseline complexity-baseline
pr: lint lint-docs mypy pre-commit check-licenses test security-baseline complexity-baseline

build: pr
poetry build
Expand All @@ -65,14 +69,6 @@ release-docs:
rm -rf site api
@echo "Updating website docs"
poetry run mike deploy --push --update-aliases ${VERSION} ${ALIAS}
@echo "Building API docs"
@$(MAKE) build-docs-api VERSION=${VERSION}

build-docs-api:
poetry run pdoc --html --output-dir ./api/ ./aws_lambda_powertools --force
mv -f ./api/aws_lambda_powertools/* ./api/
rm -rf ./api/aws_lambda_powertools
mkdir ${VERSION} && cp -R api ${VERSION}

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

docs-api-local:
poetry run pdoc --http : aws_lambda_powertools

security-baseline:
poetry run bandit --baseline bandit.baseline -r aws_lambda_powertools

Expand Down
10 changes: 8 additions & 2 deletions aws_lambda_powertools/event_handler/openapi/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,10 @@ def analyze_param(
The type annotation and the Pydantic field representing the parameter
"""
field_info, type_annotation = get_field_info_and_type_annotation(
annotation, value, is_path_param, is_response_param,
annotation,
value,
is_path_param,
is_response_param,
)

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


def get_field_info_and_type_annotation(
annotation, value, is_path_param: bool, is_response_param: bool,
annotation,
value,
is_path_param: bool,
is_response_param: bool,
) -> tuple[FieldInfo | None, Any]:
"""
Get the FieldInfo and type annotation from an annotation and value.
Expand Down
Loading
Loading