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 README.md #3679

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

HmbleCreator
Copy link

@HmbleCreator HmbleCreator commented Oct 24, 2024


Description

This pull request updates the README file to ensure that all code snippets can be copied and executed without modifications. The changes enhance clarity and usability for users, providing complete examples and detailed instructions for setting up and using Strawberry GraphQL. Additionally, a new section on testing utilities has been added, along with links to various example projects.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Summary by Sourcery

Update the README.md to improve documentation clarity and usability by ensuring code snippets are executable as-is, adding a section on testing utilities, and revising installation and setup instructions.

Documentation:

  • Revise README.md to ensure all code snippets are executable without modifications, enhancing clarity and usability.
  • Add a new section on testing utilities, including examples using httpx, requests, and aiohttp.
  • Update installation and setup instructions for Strawberry GraphQL, including sections on Quick Start, Features, and Development.

Copy link
Contributor

sourcery-ai bot commented Oct 24, 2024

Reviewer's Guide by Sourcery

This PR updates the README.md file to improve documentation clarity and usability. The changes include reorganizing content, adding comprehensive testing examples, and enhancing code snippets to be directly executable. The documentation has been restructured with better section organization and more detailed explanations of features.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Updated project description and reorganized main sections
  • Enhanced project description to highlight modern Python features
  • Restructured Quick Start section with clearer installation steps
  • Improved section headings and organization for better readability
  • Added Features section to highlight key capabilities
README.md
Added comprehensive testing documentation
  • Added new section on testing utilities
  • Included example implementations for httpx client
  • Added example implementation for requests client
  • Added example implementation for aiohttp client with async support
  • Provided complete, runnable test examples with assertions
README.md
Enhanced examples and resources section
  • Reorganized external resources and examples
  • Improved formatting of example project links
  • Added clearer descriptions for each example project
README.md
Streamlined development and support sections
  • Reorganized community and support information
  • Simplified development setup instructions
  • Consolidated licensing and security information
README.md

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @HmbleCreator - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The PR checklist indicates tests haven't been added, but this is marked as required. Either add relevant tests or update the checklist to indicate tests aren't needed for documentation changes.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟡 Documentation: 1 issue found

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

README.md Outdated Show resolved Hide resolved
@HmbleCreator HmbleCreator marked this pull request as draft October 24, 2024 11:24
HmbleCreator and others added 7 commits October 24, 2024 16:58
I've reorganized the README with the testing section now featuring three separate, clearly labeled code snippets for different HTTP clients:

A section for httpx, showing basic query testing
A section for requests, demonstrating testing with variables
A section for aiohttp, showing async testing capabilities

Each section is self-contained with its own imports and example usage. The rest of the README remains unchanged, maintaining all the other important information about installation, features, development setup, and community resources.
several formatting improvements to ensure the README passes the pre-commit hooks:

Removed all trailing whitespace
Properly formatted all code blocks ensuring consistent indentation
Fixed GraphQL query formatting to be consistent
Removed unnecessary comments and whitespace in the code examples
Ensured proper line endings
Made sure all Python code follows black formatting guidelines

The code examples are now more readable and consistently formatted. Would you like me to explain any of the specific formatting changes or make additional adjustments?
Key changes made to satisfy Black formatting:

Added type hints to __init__ methods
Added consistent double line breaks between classes and functions
Properly formatted multiline function arguments with trailing commas
Consistent indentation for multiline strings
Added proper spacing around class definitions
Fixed string formatting to match Black's standards
Properly formatted imports with spacing
@HmbleCreator HmbleCreator marked this pull request as ready for review October 24, 2024 11:44
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @HmbleCreator - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟡 Documentation: 3 issues found

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Key improvements in this version:

Added MyPy documentation links
Added comprehensive test data setup section
Updated test examples to use the defined test data
Added Discord community information in the Community & Support section
Ensured consistent formatting throughout the document
Improved code examples with proper type hints and formatting
Made the testing section more cohesive with a clear progression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant