{"id":18469797,"url":"https://github.com/awsdocs/aws-doc-sdk-examples-tools","last_synced_at":"2025-09-12T03:19:27.946Z","repository":{"id":219977196,"uuid":"748835971","full_name":"awsdocs/aws-doc-sdk-examples-tools","owner":"awsdocs","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-08T14:50:23.000Z","size":32774,"stargazers_count":12,"open_issues_count":10,"forks_count":16,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-08T16:39:58.518Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/awsdocs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-26T21:02:02.000Z","updated_at":"2025-09-08T14:49:21.000Z","dependencies_parsed_at":"2024-02-07T18:29:31.189Z","dependency_job_id":"80d365d1-591b-47ea-a5fb-159781228a71","html_url":"https://github.com/awsdocs/aws-doc-sdk-examples-tools","commit_stats":null,"previous_names":["awsdocs/aws-doc-sdk-examples-tools"],"tags_count":86,"template":false,"template_full_name":null,"purl":"pkg:github/awsdocs/aws-doc-sdk-examples-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awsdocs%2Faws-doc-sdk-examples-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awsdocs%2Faws-doc-sdk-examples-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awsdocs%2Faws-doc-sdk-examples-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awsdocs%2Faws-doc-sdk-examples-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awsdocs","download_url":"https://codeload.github.com/awsdocs/aws-doc-sdk-examples-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awsdocs%2Faws-doc-sdk-examples-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274747686,"owners_count":25341936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T10:11:46.935Z","updated_at":"2025-09-12T03:19:27.906Z","avatar_url":"https://github.com/awsdocs.png","language":"Python","readme":"## AWS Doc SDK Examples Tools\n\nThis python library is a set of tools to manage [AWS Doc SDK Example metadata](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/.doc_gen).\nIt is used by the AWS Doc SDK Examples team, as well as tributary sources of\nexample snippets.\n\n-tools:\n\n- Validates example metadata.\n- Provides an API to program against example metadata.\n- Hydrates additional derived data not explicitly written by engineers into example metadata.\n\n## Check-in tests\n\n### Purpose\n\nThe check-in tests are run whenever a pull request is submitted or changed. They\ncan be included in a Github Action with a job like this:\n\n```\njobs:\n  validate:\n    runs-on: ubuntu-latest\n    steps:\n      - name: checkout repo content\n        uses: actions/checkout@v4\n      - name: validate metadata\n        uses: awsdocs/aws-doc-sdk-examples-tools@main\n```\n\nThe check-in tests walk the full repository and scan code files to look for\nthe following issues.\n\n- Disallow a list of specified words.\n- Disallow any 20- or 40- character strings that fit a specified regex profile\n  that indicates they might be secret access keys. Allow strings that fit the\n  regex profile if they are in the allow list.\n- Disallow file names that contain 20- or 40- character strings that fit the same\n  regex profile, unless the filename is in the allow list.\n- Verify that snippet-start and snippet-end tags are in matched pairs. You are\n  not required to include these tags, but if you do they must be in pairs.\n- Ensures any snippet_file in metadata excerpts are present in the repo.\n\nA count of errors found is returned. When CI receives a non-zero return code,\nit treats the checks as failed and displays a message in the pull request.\n\n### Updating validations\n\nThe above configuration tracks the `main` branch directly. To follow more stable releases, use the most recent release tag in the github action.\n\n```\nuses: awsdocs/aws-doc-sdk-examples-tools@2024-08-26-A\n```\n\n### Running during development\n\n```\npython3.8 -m venv .venv\n# With a python 3.8 venv in .venv\nsource .venv/bin/activate # Adjust for windows as necessary\npython -m pip install -r requirements.txt\npython -m pip install -e .\npython -m mypy aws_doc_sdk_examples_tools\npython -m pytest -vv\npython -m black --check aws_doc_sdk_examples_tools\n```\n\n## Validation Extensions\n\nSome validation options can be extended by creating `.doc_gen/validation.yaml`.\n\n- `allow_list`: The 40-character check is _very_ sensitive. To allow certain patterns, add them as a string to the `allow_list` key, which will be loaded as a set of strings to allow.\n- `sample_files`: Sample files are only allowed with certain names. To allow additional sample files, add their file name (with extension, but not path) to this list.\n\n## New Releases\n\nThere are two stages, testing and deployment.\n\n### 1. Testing\n\n1. **Merge your changes into** [aws-doc-sdk-examples-tools/commits/main](https://github.com/awsdocs/aws-doc-sdk-examples-tools/commits/main).\n2. **Create a testing branch** from [aws-doc-sdk-examples@main](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main).\n3. **Find the commit SHA that matches the latest change from [aws-doc-sdk-examples-tools/commits/main](https://github.com/awsdocs/aws-doc-sdk-examples-tools/commits/main)**.\n4. **Update the following files in your testing branch** with the commit SHA (format: `org/repo@hash`, e.g. `awsdocs/aws-doc-sdk-examples-tools@e7c283e916e8efc9113277e2f38c8fa855a79d0a`):\n   - In [.github/workflows/validate-doc-metadata.yml](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/.github/workflows/validate-doc-metadata.yml), replace the current tag with the SHA.\n   - Add only the commit SHA to the `allow_list` field in [.doc_gen/validation.yaml](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/.doc_gen/validation.yaml).\n5. **Open a Draft PR to main branch**: Do not publish for review. Wait for checks/tests to pass on the PR.\n\n### 2. Deployment\n\n1. **Run `stamp.sh --release` from the `main` branch to automatically perform the following actions**:\n   - Update the `setup.py` version.\n   - Create a tag in the -tools repository at the same SHA you identified earlier.\n     - stamp.sh will create the next [stamp](https://blog.aspect.build/versioning-releases-from-a-monorepo) (which is valid [semver](https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers)) number as appropriate for the changes in this release. e.g. `2024.40.2`.\n   - Push the new tag to `main`\n1. **Update your testing PR branch**\n   - Remove SHA and add tag to [validate-doc-metadata.yml](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/.github/workflows/validate-doc-metadata.yml)\n   - Remove the SHA from [.doc_gen/validation.yaml](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/.doc_gen/validation.yaml)\n   - This is easily accomplished in the Github UI.\n1. **Create a release**: Use the automated [\"Create release from tag\" button](https://github.com/awsdocs/aws-doc-sdk-examples-tools/releases/new) to create a new release with the new tag.\n1. **Perform internal update process**.\n   - See `update.sh` script in internal package.\n\n## Security\n\nSee [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.\n\n## License\n\nThis project is licensed under the Apache-2.0 License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawsdocs%2Faws-doc-sdk-examples-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawsdocs%2Faws-doc-sdk-examples-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawsdocs%2Faws-doc-sdk-examples-tools/lists"}