Skip to content
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

Update doc path #2931

Merged
merged 4 commits into from
Feb 23, 2023
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
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ include samtranslator/policy_templates_data/policy_templates.json
include samtranslator/policy_templates_data/schema.json
include samtranslator/model/connector_profiles/profiles.json
include samtranslator/internal/data/aws_managed_policies.json
include samtranslator/internal/schema_source/sam-docs.json
include README.md
include THIRD_PARTY_LICENSES

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fetch-schema-data:

update-schema-data:
# Parse docs
bin/parse_docs.py .tmp/aws-sam-developer-guide/doc_source > schema_source/docs.json
bin/parse_docs.py .tmp/aws-sam-developer-guide/doc_source > samtranslator/internal/schema_source/sam-docs.json
bin/parse_docs.py --cfn .tmp/aws-cloudformation-user-guide/doc_source > schema_source/cloudformation-docs.json

# Add CloudFormation docs to CloudFormation schema
Expand Down
5 changes: 2 additions & 3 deletions samtranslator/internal/schema_source/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ class PassThroughProp(pydantic.BaseModel):

LenientBaseModel = pydantic.BaseModel

_packagedir = os.path.dirname(os.path.abspath(__package__))
_docdir = os.path.join(_packagedir, "schema_source")
_DOCS = json.loads(Path(_docdir, "docs.json").read_bytes())
_docdir = os.path.dirname(os.path.abspath(__file__))
_DOCS = json.loads(Path(_docdir, "sam-docs.json").read_bytes())
GavinZZ marked this conversation as resolved.
Show resolved Hide resolved


def get_prop(stem: str) -> Any:
Expand Down