Skip to content

documentation: add SDK cheat sheet#1268

Open
jamilahmadzai wants to merge 3 commits into
amazon-braket:mainfrom
jamilahmadzai:documentation/update-cheat-sheet-1255
Open

documentation: add SDK cheat sheet#1268
jamilahmadzai wants to merge 3 commits into
amazon-braket:mainfrom
jamilahmadzai:documentation/update-cheat-sheet-1255

Conversation

@jamilahmadzai

Copy link
Copy Markdown

Issue #, if available:

Closes #1255

Description of changes:

  • Add a GitHub Pages-ready Amazon Braket SDK cheat sheet built from ordered Jekyll sections.
  • Update the SDK snippets and include program sets, emulators, experimental capabilities, reservations, and hybrid job decorator usage.
  • Add contributor instructions plus a generator for the plain Markdown companion file.

Testing done:

  • python3 doc/cheat_sheet/_scripts/generate_markdown.py
  • python3 -m compileall doc/cheat_sheet/_scripts/generate_markdown.py
  • Verified doc/genai_cheat_sheet.md matches the generator output.
  • Verified every ordered block in doc/cheat_sheet/_data/blocks.yml has a matching English include.
  • git diff --check
  • .venv/bin/tox -e docs
  • .venv/bin/tox -e linters_check

unitaryHACK26:

I used GPT-5 Codex to help draft and check the documentation structure and snippets, then manually verified them against the current SDK source/examples and ran the checks above.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jamilahmadzai jamilahmadzai requested a review from a team as a code owner June 3, 2026 17:51
@github-actions github-actions Bot added documentation Improvements or additions to documentation CI labels Jun 3, 2026
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ec31c80) to head (92cdf86).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1268   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          169       169           
  Lines        10964     10964           
  Branches      1413      1413           
=========================================
  Hits         10964     10964           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@peterkomar-aws

Copy link
Copy Markdown
Contributor

The jekyll bundle is failing. Please include detailed instructions in the Readme on how to make it work.

@jamilahmadzai

Copy link
Copy Markdown
Author

Thanks for flagging this. I pushed a follow-up in e7f044a7 that adds doc/cheat_sheet/Gemfile and expands doc/cheat_sheet/README.md with Ruby/Bundler setup plus both root-level and in-directory Jekyll build commands.

I also re-ran the markdown generator locally and confirmed the generated output matches doc/genai_cheat_sheet.md. Local Jekyll execution is still blocked on my machine by Ruby 2.6.10, so the README now documents Ruby 3.1+ for the bundle path.

@peterkomar-aws

Copy link
Copy Markdown
Contributor

Thanks. I installed Ruby 4.0.5, but this command

BUNDLE_GEMFILE=doc/cheat_sheet/Gemfile bundle exec jekyll build --source doc/cheat_sheet --destination build/cheat_sheet

gave me an error:

/opt/homebrew/lib/ruby/gems/4.0.0/gems/jekyll-3.9.0/lib/jekyll.rb:28: warning: csv used to be loaded from the standard library, but is not part of the default gems since Ruby 3.4.0.
You can add csv to your Gemfile or gemspec to fix this error.

Please add more details to the instructions so I can follow them.

@jamilahmadzai

Copy link
Copy Markdown
Author

Thanks for testing it on Ruby 4. I pushed a follow-up in 412ced0c that should make this path clearer and reproducible.

What changed:

  • Added an explicit Gemfile Ruby constraint of >= 3.1, < 4.0, because the current GitHub Pages dependency stack does not resolve cleanly on Ruby 4.
  • Added explicit csv and bigdecimal Gemfile dependencies for newer Ruby/Jekyll behavior.
  • Split the README into root-level and doc/cheat_sheet-directory workflows, plus a Homebrew Ruby 3.x example.

Validation I ran locally:

  • With Ruby 4.0.2, BUNDLE_GEMFILE=doc/cheat_sheet/Gemfile bundle install now fails immediately with the Gemfile Ruby-version constraint instead of getting to the csv/Jekyll failure.
  • With Ruby 3.3.11:
    • BUNDLE_GEMFILE=doc/cheat_sheet/Gemfile bundle install
    • BUNDLE_GEMFILE=doc/cheat_sheet/Gemfile bundle exec jekyll build --source doc/cheat_sheet --destination build/cheat_sheet
    • bundle exec jekyll build --source . --destination ../../build/cheat_sheet from doc/cheat_sheet
    • python3 doc/cheat_sheet/_scripts/generate_markdown.py --output build/cheat_sheet/genai_cheat_sheet.md
    • python3 doc/cheat_sheet/_scripts/generate_markdown.py
    • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Complete a Braket SDK Cheat sheet

2 participants