From a7ef9365002fddf41e001ab824725ab930e08934 Mon Sep 17 00:00:00 2001 From: Jules Authier <55801833+authierj@users.noreply.github.com> Date: Fri, 30 Jan 2026 17:22:01 +0100 Subject: [PATCH 1/3] "Claude PR Assistant workflow" --- .github/workflows/claude.yml | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/claude.yml diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml new file mode 100644 index 0000000000..d300267f18 --- /dev/null +++ b/.github/workflows/claude.yml @@ -0,0 +1,50 @@ +name: Claude Code + +on: + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + issues: + types: [opened, assigned] + pull_request_review: + types: [submitted] + +jobs: + claude: + if: | + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || + (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || + (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + issues: read + id-token: write + actions: read # Required for Claude to read CI results on PRs + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Run Claude Code + id: claude + uses: anthropics/claude-code-action@v1 + with: + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + + # This is an optional setting that allows Claude to read CI results on PRs + additional_permissions: | + actions: read + + # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it. + # prompt: 'Update the pull request description to include a summary of changes.' + + # Optional: Add claude_args to customize behavior and configuration + # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md + # or https://code.claude.com/docs/en/cli-reference for available options + # claude_args: '--allowed-tools Bash(gh pr:*)' + From ea81280b41b218c3bc62a9b3a4c14b1561fabfe7 Mon Sep 17 00:00:00 2001 From: Jules Authier <55801833+authierj@users.noreply.github.com> Date: Fri, 30 Jan 2026 17:22:03 +0100 Subject: [PATCH 2/3] "Claude Code Review workflow" --- .github/workflows/claude-code-review.yml | 44 ++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/claude-code-review.yml diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml new file mode 100644 index 0000000000..b5e8cfd4dc --- /dev/null +++ b/.github/workflows/claude-code-review.yml @@ -0,0 +1,44 @@ +name: Claude Code Review + +on: + pull_request: + types: [opened, synchronize, ready_for_review, reopened] + # Optional: Only run on specific file changes + # paths: + # - "src/**/*.ts" + # - "src/**/*.tsx" + # - "src/**/*.js" + # - "src/**/*.jsx" + +jobs: + claude-review: + # Optional: Filter by PR author + # if: | + # github.event.pull_request.user.login == 'external-contributor' || + # github.event.pull_request.user.login == 'new-developer' || + # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' + + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + issues: read + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Run Claude Code Review + id: claude-review + uses: anthropics/claude-code-action@v1 + with: + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + plugin_marketplaces: 'https://github.com/anthropics/claude-code.git' + plugins: 'code-review@claude-code-plugins' + prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}' + # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md + # or https://code.claude.com/docs/en/cli-reference for available options + From 8460e7726737febe90492f43319818ffc4e3c39d Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 2 Feb 2026 14:46:06 +0000 Subject: [PATCH 3/3] Add pizza recipe scaler script Creates a Python script that takes flour amount in grams as input and calculates all other pizza dough ingredients in European units. Features: - Interactive and command-line modes - Calculates water, salt, yeast, olive oil, and sugar quantities - Estimates number of pizzas based on flour amount - Includes step-by-step baking instructions https://claude.ai/code/session_011hiQmWK9Hij7aed3Gz7Km9 --- pizza_recipe_scaler.py | 158 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 pizza_recipe_scaler.py diff --git a/pizza_recipe_scaler.py b/pizza_recipe_scaler.py new file mode 100644 index 0000000000..3120d20327 --- /dev/null +++ b/pizza_recipe_scaler.py @@ -0,0 +1,158 @@ +#!/usr/bin/env python3 +""" +Pizza Recipe Scaler + +Takes the amount of flour in grams as input and calculates +the quantities of other ingredients needed for pizza dough. +All measurements are in European units (grams, ml). + +Usage: + python pizza_recipe_scaler.py # Interactive mode + python pizza_recipe_scaler.py 500 # Direct mode with 500g flour +""" + +import sys + +# Base recipe ratios (per 100g of flour) +BASE_RATIOS = { + "water": 0.65, # 65% hydration (ml per g flour) + "salt": 0.02, # 2% salt (g per g flour) + "yeast": 0.01, # 1% fresh yeast or 0.3% dry yeast (g per g flour) + "olive_oil": 0.04, # 4% olive oil (ml per g flour) + "sugar": 0.01, # 1% sugar (g per g flour) +} + + +def calculate_ingredients(flour_grams: float) -> dict: + """ + Calculate pizza dough ingredients based on flour amount. + + Args: + flour_grams: Amount of flour in grams + + Returns: + Dictionary with all ingredient quantities + """ + ingredients = { + "flour": flour_grams, + "water": round(flour_grams * BASE_RATIOS["water"], 1), + "salt": round(flour_grams * BASE_RATIOS["salt"], 1), + "fresh_yeast": round(flour_grams * BASE_RATIOS["yeast"], 1), + "dry_yeast": round(flour_grams * BASE_RATIOS["yeast"] * 0.33, 1), + "olive_oil": round(flour_grams * BASE_RATIOS["olive_oil"], 1), + "sugar": round(flour_grams * BASE_RATIOS["sugar"], 1), + } + return ingredients + + +def estimate_pizzas(flour_grams: float, pizza_size: str = "medium") -> int: + """ + Estimate how many pizzas can be made with the given flour amount. + + Args: + flour_grams: Amount of flour in grams + pizza_size: Size of pizza ('small', 'medium', 'large') + + Returns: + Estimated number of pizzas + """ + flour_per_pizza = { + "small": 100, # ~25cm pizza + "medium": 150, # ~30cm pizza + "large": 200, # ~35cm pizza + } + return int(flour_grams // flour_per_pizza.get(pizza_size, 150)) + + +def display_recipe(flour_grams: float) -> None: + """ + Display the complete pizza recipe with scaled ingredients. + + Args: + flour_grams: Amount of flour in grams + """ + ingredients = calculate_ingredients(flour_grams) + num_pizzas = estimate_pizzas(flour_grams) + + print("\n" + "=" * 50) + print(" PIZZA DOUGH RECIPE") + print("=" * 50) + print(f"\nFor {flour_grams}g of flour, you will need:\n") + print("-" * 30) + print(f" Flour: {ingredients['flour']:.0f} g") + print(f" Water: {ingredients['water']:.0f} ml (lukewarm)") + print(f" Salt: {ingredients['salt']:.1f} g") + print(f" Olive oil: {ingredients['olive_oil']:.0f} ml") + print(f" Sugar: {ingredients['sugar']:.1f} g") + print("-" * 30) + print(f" Fresh yeast: {ingredients['fresh_yeast']:.1f} g") + print(f" OR") + print(f" Dry yeast: {ingredients['dry_yeast']:.1f} g") + print("-" * 30) + + print(f"\nThis makes approximately {num_pizzas} medium pizza(s) (~30cm)") + + print("\n" + "=" * 50) + print(" INSTRUCTIONS") + print("=" * 50) + print(""" +1. Dissolve yeast and sugar in lukewarm water (35-40°C) +2. Mix flour and salt in a large bowl +3. Add the yeast mixture and olive oil +4. Knead for 10-15 minutes until smooth and elastic +5. Cover and let rise for 1-2 hours at room temperature +6. Divide into portions and shape your pizzas +7. Add toppings and bake at 250°C for 10-15 minutes + (or as hot as your oven goes!) +""") + + +def main(): + """Main function to run the pizza recipe scaler.""" + print("\nšŸ• PIZZA RECIPE SCALER šŸ•") + print("All measurements in European units (g, ml)\n") + + # Check for command-line argument + if len(sys.argv) > 1: + try: + flour_grams = float(sys.argv[1]) + if flour_grams <= 0: + print("Please enter a positive number.") + sys.exit(1) + if flour_grams < 50: + print("Warning: Less than 50g of flour may be too little for good results.") + display_recipe(flour_grams) + return + except ValueError: + print(f"Invalid input: '{sys.argv[1]}'. Please enter a valid number.") + sys.exit(1) + + # Interactive mode + while True: + try: + user_input = input("Enter the amount of flour in grams (or 'q' to quit): ") + + if user_input.lower() in ('q', 'quit', 'exit'): + print("\nBuon appetito! šŸ•\n") + break + + flour_grams = float(user_input) + + if flour_grams <= 0: + print("Please enter a positive number.") + continue + + if flour_grams < 50: + print("Warning: Less than 50g of flour may be too little for good results.") + + display_recipe(flour_grams) + + except ValueError: + print("Please enter a valid number.") + except KeyboardInterrupt: + print("\n\nBuon appetito! šŸ•\n") + break + + +if __name__ == "__main__": + main()