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

chore(docs): document all built-in scalar types. Closes #3404 #11

Open
wants to merge 5 commits into
base: base-sha/65142b82c9baf2aca4c533290e52cacff7e2cc33
Choose a base branch
from

Conversation

sourcery-ai-experiments-bot

Documents all scalar types which are built-in in Strawberry.

Description

  1. Added description of scalar types JSON, Base16, Base32, Base64
  2. Updated link of JSON standart definition. Old (http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf) is 404 by now. I considered two links for replacement: https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf or https://ecma-international.org/publications-and-standards/standards/ecma-404/. While the latter one is more board, which will result in less probability of resulting to 404 in future, the first one is direct PDF file. I've added the PDF link, but feel free to request a change

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).

I've updated tests which are referring to old JSON specification link

@sourcery-ai-experiments-bot
Copy link
Author

This is a benchmark review for experiment review_of_reviews_20240501.
Run ID: review_of_reviews_20240501/benchmark_2024-05-01T00-17-45_v1-16-0-221-g235b41e01.

This pull request was cloned from https://github.com/strawberry-graphql/strawberry/pull/3478. (Note: the URL is not a link to avoid triggering a notification on the original pull request.)

Experiment configuration
review_config:
  # User configuration for the review
  # - benchmark - use the user config from the benchmark reviews
  # - <value> - use the value directly
  user_config:
    enable_ai_review: true
    enable_rule_comments: false

    enable_complexity_comments: benchmark
    enable_docstring_comments: benchmark
    enable_security_comments: benchmark
    enable_tests_comments: benchmark
    enable_comment_suggestions: benchmark
    enable_functionality_review: benchmark

    enable_approvals: true

  ai_review_config:
    # The model responses to use for the experiment
    # - benchmark - use the model responses from the benchmark reviews
    # - llm - call the language model to generate responses
    model_responses:
      comments_model: benchmark
      comment_validation_model: benchmark
      comment_suggestion_model: benchmark
      complexity_model: benchmark
      docstrings_model: benchmark
      functionality_model: benchmark
      security_model: benchmark
      tests_model: benchmark

# The pull request dataset to run the experiment on
pull_request_dataset:
- https://github.com/strawberry-graphql/strawberry/pull/3478
- https://github.com/agatma/sprint1-http-server/pull/3
- https://github.com/strawberry-graphql/strawberry-django/pull/525
- https://github.com/agatma/sprint1-http-server/pull/4
- https://github.com/strawberry-graphql/strawberry/pull/3480
- https://github.com/Xmaster6y/mulsi/pull/21
- https://github.com/Xmaster6y/mulsi/pull/22
- https://github.com/LLotme/vscode/pull/4
- https://github.com/ignition-api/8.1/pull/271
- https://github.com/ignition-api/8.1/pull/272
- https://github.com/manoelhc/test-actions/pull/33
- https://github.com/tqt97/BlogForJob/pull/3
- https://github.com/tqt97/BlogForJob/pull/2
- https://github.com/tqt97/BlogForJob/pull/4
- https://github.com/ser3n7ty/Nvim/pull/1
- https://github.com/ser3n7ty/Nvim/pull/2
- https://github.com/ser3n7ty/Nvim/pull/3
- https://github.com/okisdev/ChatChat/pull/325
- https://github.com/DevCycleHQ/ios-client-sdk/pull/197
- https://github.com/DevCycleHQ/test-harness/pull/424
- https://github.com/DevCycleHQ/flutter-client-sdk/pull/150
- https://github.com/DevCycleHQ/cli/pull/382
- https://github.com/DevCycleHQ/devcycle-docs/pull/642
- https://github.com/uncscode/particula/pull/449
- https://github.com/nikhilbadyal/docker-py-revanced/pull/518
- https://github.com/ignition-incendium/incendium/pull/199
- https://github.com/rtk-rnjn/algorithms/pull/81
- https://github.com/rtk-rnjn/algorithms/pull/82
- https://github.com/rtk-rnjn/algorithms/pull/83
- https://github.com/rtk-rnjn/algorithms/pull/84
- https://github.com/suttacentral/suttacentral/pull/3151
- https://github.com/EduardSchwarzkopf/pecuny/pull/131
- https://github.com/gdsfactory/cspdk/pull/27
- https://github.com/gdsfactory/cspdk/pull/28
- https://github.com/gdsfactory/cspdk/pull/29
- https://github.com/gdsfactory/ubc/pull/376
- https://github.com/gdsfactory/ubc/pull/377
- https://github.com/gdsfactory/gdsfactory/pull/2709
- https://github.com/gdsfactory/ubc/pull/378
- https://github.com/W-zrd/unishare_mobile/pull/13
- https://github.com/Nuitka/Nuitka/pull/2830
- https://github.com/jquagga/ttt/pull/98
- https://github.com/jquagga/ttt/pull/101
- https://github.com/Idrinth/api-bench/pull/939
- https://github.com/letsdoitnowus/planium-backend/pull/41
- https://github.com/albumentations-team/albumentations.ai/pull/74
- https://github.com/albumentations-team/albumentations/pull/1695
- https://github.com/yashasvi-jain/ucron-models/pull/11
- https://github.com/nbhirud/system_update/pull/24
- https://github.com/supabase-community/postgrest-py/pull/422
review_comment_labels:
- label: correct
  question: Is this comment correct?
- label: helpful
  question: Is this comment helpful?
- label: comment-type
  question: Is the comment type correct?
- label: comment-area
  question: Is the comment area correct?
- label: llm-test
  question: |
    What type of LLM test could this comment become?
    - 👍 - this comment is really good/important and we should always make it
    - 👎 - this comment is really bad and we should never make it
    - no reaction - don't turn this comment into an LLM test

# Benchmark reviews generated by running
#   python -m scripts.experiment benchmark <experiment_name>
benchmark_reviews: []

Copy link

@sourcery-ai-bot 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 @sourcery-ai-experiments-bot - I've reviewed your changes and they look great!

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

LangSmith trace

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

Comment on lines +48 to +50
- `JSON`, a JSON value as specified in
[ECMA-404](https://ecma-international.org/publications-and-standards/standards/ecma-404/)
standard, maps to Python’s `dict`

Choose a reason for hiding this comment

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

suggestion (code_clarification): Consider adding more detail about the JSON scalar type.

The description of the JSON scalar type could be expanded to include examples or more detailed usage scenarios, which would help users understand its application more clearly.

Suggested change
- `JSON`, a JSON value as specified in
[ECMA-404](https://ecma-international.org/publications-and-standards/standards/ecma-404/)
standard, maps to Python’s `dict`
`JSON`, a JSON value as specified in
[ECMA-404](https://ecma-international.org/publications-and-standards/standards/ecma-404/)
standard. This type maps to Python’s `dict` and can represent objects, arrays,
numbers, strings, booleans, and null. For example, a JSON object `{"name": "Alice", "age": 30}`
would map to `{'name': 'Alice', 'age': 30}` in Python.

Choose a reason for hiding this comment

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

Is this comment correct?

Choose a reason for hiding this comment

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

Is this comment helpful?

Choose a reason for hiding this comment

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

Is the comment type correct?

Choose a reason for hiding this comment

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

Is the comment area correct?

Choose a reason for hiding this comment

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

What type of LLM test could this comment become?

  • 👍 - this comment is really good/important and we should always make it
  • 👎 - this comment is really bad and we should never make it
  • no reaction - don't turn this comment into an LLM test

Comment on lines +51 to +54
- `Base16`, `Base32`, `Base64`, represents hexadecimal strings encoded with
`Base16`/`Base32`/`Base64`. As specified in
[RFC4648](https://datatracker.ietf.org/doc/html/rfc4648.html). Maps to
Python’s `str`

Choose a reason for hiding this comment

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

suggestion (code_clarification): Clarify the encoding process for Base16, Base32, and Base64 in the documentation.

It would be beneficial to specify whether these encodings support both encoding and decoding operations, or if they are limited to one direction.

Suggested change
- `Base16`, `Base32`, `Base64`, represents hexadecimal strings encoded with
`Base16`/`Base32`/`Base64`. As specified in
[RFC4648](https://datatracker.ietf.org/doc/html/rfc4648.html). Maps to
Python’s `str`
`Base16`, `Base32`, `Base64`, represent hexadecimal strings that can be
encoded or decoded using `Base16`/`Base32`/`Base64` encoding schemes. As specified in
[RFC4648](https://datatracker.ietf.org/doc/html/rfc4648.html). Maps to
Python’s `str`

Choose a reason for hiding this comment

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

Is this comment correct?

Choose a reason for hiding this comment

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

Is this comment helpful?

Choose a reason for hiding this comment

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

Is the comment type correct?

Choose a reason for hiding this comment

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

Is the comment area correct?

Choose a reason for hiding this comment

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

What type of LLM test could this comment become?

  • 👍 - this comment is really good/important and we should always make it
  • 👎 - this comment is really bad and we should never make it
  • no reaction - don't turn this comment into an LLM test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants