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

Feat/project structure #8

Merged
merged 9 commits into from
Mar 11, 2024
Merged

Feat/project structure #8

merged 9 commits into from
Mar 11, 2024

Conversation

DavidSouther
Copy link
Contributor

Updates to project structure that better support internal use cases.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

aws_doc_sdk_examples_tools/doc_gen.py Outdated Show resolved Hide resolved
aws_doc_sdk_examples_tools/doc_gen.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Laren-AWS Laren-AWS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I think the organization is good, clean, and easy to read and understand. Lots of good separation of concerns, etc. I understand that there's currently some redundancy because of the yamale validator overlapping with DocGen, and that's fine until we can bring everything together.

  • I put a comment somewhere but I'll just call this out here, too--I think the biggest issue is that examples is a list and not a dict (with ID for key) and that new examples are not merged, just appended to the list. The zexi design is to merge examples with the same ID, but only to take new language sections from secondary sources (all other fields are not merged, and language sections that already exist are not overridden).
  • I saw a few fields in the dataclasses (like more_info) that aren't yet used in the metadata anywhere (nor are they included in any spec yet). I generally think it's not a good idea to include speculative code because it either never gets used or never gets tested until you need it (and find it doesn't work).
  • I'm also not too fond of TODOs left in code. I'd raise exceptions, perhaps? Or implement the TODOs. Or take them out and track them elsewhere.

aws_doc_sdk_examples_tools/sdks.py Outdated Show resolved Hide resolved
aws_doc_sdk_examples_tools/services.py Outdated Show resolved Hide resolved
aws_doc_sdk_examples_tools/metadata.py Show resolved Hide resolved
aws_doc_sdk_examples_tools/metadata.py Outdated Show resolved Hide resolved
aws_doc_sdk_examples_tools/project_validator.py Outdated Show resolved Hide resolved
aws_doc_sdk_examples_tools/spdx.py Outdated Show resolved Hide resolved
@DavidSouther
Copy link
Contributor Author

examples as dict - done.

more_info etc - this was copied from the existing example_schema.yaml, so breaking change to remove them which is not happening in this PR.

TODOs - all TODOs are architectural questions that we have flagged to discuss, and would be breaking changes. Not happening in this PR. We can find and fix them in a follow up.

from aws_doc_sdk_examples_tools.metadata_errors import MetadataErrors
from aws_doc_sdk_examples_tools.metadata_validator import validate_metadata
from aws_doc_sdk_examples_tools.project_validator import (
from .metadata import Example, parse as parse_examples
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoa, you can do this .metadata syntax? Docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aws_doc_sdk_examples_tools/doc_gen.py Show resolved Hide resolved
aws_doc_sdk_examples_tools/metadata.py Show resolved Hide resolved
@DavidSouther DavidSouther merged commit f13244d into main Mar 11, 2024
1 check passed
@DavidSouther DavidSouther added Enhancement A general update to the code base. Task A general update to the code base for language clarification, missing actions, tests, etc. labels Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A general update to the code base. Task A general update to the code base for language clarification, missing actions, tests, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants