Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: graphql-python/graphene
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.2
Choose a base ref
...
head repository: graphql-python/graphene
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Oct 7, 2016

  1. Fixed typos and improved language and markup

    Kalle Jepsen committed Oct 7, 2016
    Copy the full SHA
    71b4de9 View commit details

Commits on Nov 22, 2016

  1. added time type

    pizzapanther committed Nov 22, 2016
    Copy the full SHA
    dddb20a View commit details
  2. added time type

    pizzapanther committed Nov 22, 2016
    Copy the full SHA
    f089c78 View commit details

Commits on Nov 23, 2016

  1. add time query test

    pizzapanther committed Nov 23, 2016
    Copy the full SHA
    48b422e View commit details
  2. add time query test

    pizzapanther committed Nov 23, 2016
    Copy the full SHA
    ad83a7e View commit details
  3. Merge pull request #372 from pizzapanther/master

    Added Time Type
    syrusakbary authored Nov 23, 2016
    Copy the full SHA
    692d7e7 View commit details
  4. Copy the full SHA
    4653a0e View commit details
  5. Copy the full SHA
    20ca849 View commit details
  6. Merge pull request #373 from pizzapanther/master

    add time query variable test
    syrusakbary authored Nov 23, 2016
    Copy the full SHA
    51c37fe View commit details

Commits on Dec 2, 2016

  1. Copy the full SHA
    3df62d2 View commit details
  2. Copy the full SHA
    80a8092 View commit details
  3. Updated version to 1.1.3

    syrusakbary committed Dec 2, 2016
    Copy the full SHA
    4a31c5a View commit details
  4. Copy the full SHA
    da36830 View commit details
  5. Copy the full SHA
    774e9bf View commit details

Commits on Dec 8, 2016

  1. Implement JSON type

    Remove duplicated test
    
    Remove unicode for python 3
    
    Add more tests
    
    Add None case
    
    Update json type
    
    Remove unnecessary dependencies
    
    Add more test
    
    Add test
    hung-phan committed Dec 8, 2016
    Copy the full SHA
    a74c402 View commit details
  2. Add None case

    hung-phan committed Dec 8, 2016
    Copy the full SHA
    c200a08 View commit details
  3. Update test

    hung-phan committed Dec 8, 2016
    Copy the full SHA
    17ea139 View commit details

Commits on Dec 14, 2016

  1. Merge pull request #381 from riddlesio/master

    fix so partial functions can be passed to field, solves issue #316
    syrusakbary authored Dec 14, 2016
    Copy the full SHA
    7e5285d View commit details

Commits on Dec 18, 2016

  1. Copy the full SHA
    93dacda View commit details
  2. Merge pull request #391 from graphql-python/features/mounted-refactor

    Refactored mounted types logic
    syrusakbary authored Dec 18, 2016
    Copy the full SHA
    27cd00b View commit details
  3. Added Mounted type tests

    syrusakbary committed Dec 18, 2016
    Copy the full SHA
    edd090e View commit details
  4. Copy the full SHA
    dda294d View commit details
  5. Merge pull request #318 from ksonj/master

    Fixed typos and improved language and markup
    syrusakbary authored Dec 18, 2016
    Copy the full SHA
    dda3237 View commit details
  6. Copy the full SHA
    573101f View commit details

Commits on Jan 10, 2017

  1. Copy the full SHA
    a749d02 View commit details

Commits on Jan 15, 2017

  1. Copy the full SHA
    2ef0e23 View commit details

Commits on Jan 22, 2017

  1. Copy the full SHA
    888348b View commit details
  2. Merge pull request #406 from kelvintaywl/fix-small-readme-typo

    small grammar fix on readme
    syrusakbary authored Jan 22, 2017
    Copy the full SHA
    02eb685 View commit details

Commits on Jan 27, 2017

  1. Allow class methods to be used as a field source

    James Pollock committed Jan 27, 2017
    Copy the full SHA
    f728542 View commit details

Commits on Jan 28, 2017

  1. Merge pull request #410 from docmatrix/feature/source-method

    Allow class methods to be used as a field source
    syrusakbary authored Jan 28, 2017
    Copy the full SHA
    a3c3be2 View commit details

Commits on Feb 6, 2017

  1. Copy the full SHA
    1232ff3 View commit details

Commits on Feb 7, 2017

  1. fixed a few documentation bugs

    there was a warning of header underline not being long enough
    
    and code type graphql was being used intead of json
    BossGrand committed Feb 7, 2017
    Copy the full SHA
    b9d3abe View commit details
  2. fixed typo

    BossGrand authored Feb 7, 2017
    Copy the full SHA
    0ed4050 View commit details
  3. Merge pull request #412 from BossGrand/master

    Added documentation on how to accept files in a mutation
    syrusakbary authored Feb 7, 2017
    Copy the full SHA
    eb1ded2 View commit details
  4. Update mutations.rst

    syrusakbary authored Feb 7, 2017
    Copy the full SHA
    8f373cc View commit details

Commits on Feb 8, 2017

  1. Copy the full SHA
    256c84a View commit details
  2. Improved Node get_node_from_global_id

    This introduces a breaking changes for custom Nodes implementations
    syrusakbary committed Feb 8, 2017
    1
    Copy the full SHA
    e8fc58a View commit details
  3. Copy the full SHA
    8dff91d View commit details

Commits on Feb 16, 2017

  1. Update README.md

    Mention that Graphene works great with both Relay and Apollo
    helfer authored Feb 16, 2017
    Copy the full SHA
    81c1cf3 View commit details

Commits on Feb 18, 2017

  1. Merge pull request #415 from helfer/patch-1

    Update README.md
    syrusakbary authored Feb 18, 2017
    Copy the full SHA
    52e68cf View commit details
  2. Improved Docs

    syrusakbary committed Feb 18, 2017
    Copy the full SHA
    ecb1edd View commit details

Commits on Feb 20, 2017

  1. Copy the full SHA
    2f87698 View commit details
  2. Merge pull request #387 from hung-phan/master

    Implement JSON type
    syrusakbary authored Feb 20, 2017
    Copy the full SHA
    2044d29 View commit details
  3. Renamed from JSON to Generic

    As it's implementation is abstract of the serializer/unserializer used.
    syrusakbary committed Feb 20, 2017
    Copy the full SHA
    51b72d8 View commit details

Commits on Feb 21, 2017

  1. Copy the full SHA
    ba29de5 View commit details
  2. Copy the full SHA
    0e2d9be View commit details
  3. Copy the full SHA
    7440064 View commit details
  4. Copy the full SHA
    b5cc0a8 View commit details
  5. Fixed lint

    syrusakbary committed Feb 21, 2017
    Copy the full SHA
    1a52cf9 View commit details
  6. Copy the full SHA
    8b0cd48 View commit details
Showing with 12,585 additions and 4,763 deletions.
  1. +0 −1 .editorconfig
  2. +34 −0 .github/ISSUE_TEMPLATE/bug_report.md
  3. +1 −0 .github/ISSUE_TEMPLATE/config.yml
  4. +20 −0 .github/ISSUE_TEMPLATE/feature_request.md
  5. +24 −0 .github/stale.yml
  6. +21 −0 .github/workflows/build.yaml
  7. +26 −0 .github/workflows/deploy.yml
  8. +26 −0 .github/workflows/lint.yml
  9. +64 −0 .github/workflows/tests.yml
  10. +13 −2 .gitignore
  11. +29 −0 .pre-commit-config.yaml
  12. +0 −61 .travis.yml
  13. +1 −0 MANIFEST.in
  14. +28 −0 Makefile
  15. +62 −35 README.md
  16. +0 −125 README.rst
  17. +15 −0 SECURITY.md
  18. +19 −23 UPGRADE-v1.0.md
  19. +385 −0 UPGRADE-v2.0.md
  20. +0 −7 bin/autolinter
  21. +35 −56 docs/Makefile
  22. 0 graphene/pyutils/tests/__init__.py → docs/_static/.gitkeep
  23. +110 −0 docs/api/index.rst
  24. +60 −56 docs/conf.py
  25. +117 −0 docs/execution/dataloader.rst
  26. +138 −0 docs/execution/execute.rst
  27. +8 −0 docs/execution/fileuploading.rst
  28. +6 −33 docs/execution/index.rst
  29. +37 −11 docs/execution/middleware.rst
  30. +123 −0 docs/execution/queryvalidation.rst
  31. +40 −0 docs/execution/subscriptions.rst
  32. +9 −2 docs/index.rst
  33. +114 −27 docs/quickstart.rst
  34. +1 −1 docs/relay/connection.rst
  35. +5 −8 docs/relay/index.rst
  36. +31 −3 docs/relay/mutations.rst
  37. +27 −10 docs/relay/nodes.rst
  38. +4 −1 docs/requirements.txt
  39. +71 −0 docs/testing/index.rst
  40. +0 −43 docs/types/abstracttypes.rst
  41. +44 −8 docs/types/enums.rst
  42. +7 −4 docs/types/index.rst
  43. +139 −28 docs/types/interfaces.rst
  44. +71 −0 docs/types/list-and-nonnull.rst
  45. +68 −29 docs/types/mutations.rst
  46. +378 −54 docs/types/objecttypes.rst
  47. +251 −16 docs/types/scalars.rst
  48. +41 −28 docs/types/schema.rst
  49. +63 −0 docs/types/unions.rst
  50. +40 −14 examples/complex_example.py
  51. +10 −14 examples/context_example.py
  52. +8 −14 examples/simple_example.py
  53. +35 −37 examples/starwars/data.py
  54. +12 −22 examples/starwars/schema.py
  55. +104 −201 examples/starwars/tests/test_query.py
  56. +30 −64 examples/starwars_relay/data.py
  57. +23 −20 examples/starwars_relay/schema.py
  58. +39 −38 examples/starwars_relay/tests/test_connections.py
  59. +37 −61 examples/starwars_relay/tests/test_mutation.py
  60. +115 −108 examples/starwars_relay/tests/test_objectidentification.py
  61. +92 −69 graphene/__init__.py
  62. +0 −851 graphene/pyutils/enum.py
  63. +0 −41 graphene/pyutils/tests/test_enum.py
  64. +18 −20 graphene/pyutils/version.py
  65. +17 −7 graphene/relay/__init__.py
  66. +142 −97 graphene/relay/connection.py
  67. +87 −0 graphene/relay/id_type.py
  68. +47 −45 graphene/relay/mutation.py
  69. +96 −74 graphene/relay/node.py
  70. +222 −45 graphene/relay/tests/test_connection.py
  71. +121 −0 graphene/relay/tests/test_connection_async.py
  72. +140 −124 graphene/relay/tests/test_connection_query.py
  73. +325 −0 graphene/relay/tests/test_custom_global_id.py
  74. +12 −14 graphene/relay/tests/test_global_id.py
  75. +132 −61 graphene/relay/tests/test_mutation.py
  76. +90 −0 graphene/relay/tests/test_mutation_async.py
  77. +160 −56 graphene/relay/tests/test_node.py
  78. +112 −142 graphene/relay/tests/test_node_custom.py
  79. +39 −0 graphene/test/__init__.py
  80. +41 −0 graphene/tests/issues/test_1293.py
  81. +36 −0 graphene/tests/issues/test_1394.py
  82. +53 −0 graphene/tests/issues/test_1419.py
  83. +14 −9 graphene/tests/issues/test_313.py
  84. +15 −6 graphene/tests/issues/test_356.py
  85. +117 −0 graphene/tests/issues/test_425.py
  86. +24 −0 graphene/tests/issues/test_490.py
  87. +44 −0 graphene/tests/issues/test_720.py
  88. +27 −0 graphene/tests/issues/test_881.py
  89. +8 −0 graphene/tests/issues/test_956.py
  90. +44 −31 graphene/types/__init__.py
  91. +0 −41 graphene/types/abstracttype.py
  92. +74 −20 graphene/types/argument.py
  93. +48 −0 graphene/types/base.py
  94. +43 −0 graphene/types/base64.py
  95. +25 −0 graphene/types/context.py
  96. +92 −20 graphene/types/datetime.py
  97. +34 −0 graphene/types/decimal.py
  98. +32 −8 graphene/types/definitions.py
  99. +12 −8 graphene/types/dynamic.py
  100. +95 −44 graphene/types/enum.py
  101. +100 −29 graphene/types/field.py
  102. +47 −0 graphene/types/generic.py
  103. +64 −7 graphene/types/inputfield.py
  104. +92 −33 graphene/types/inputobjecttype.py
  105. +55 −41 graphene/types/interface.py
  106. +15 −7 graphene/types/json.py
  107. +20 −0 graphene/types/mountedtype.py
  108. +123 −21 graphene/types/mutation.py
  109. +139 −85 graphene/types/objecttype.py
  110. +0 −36 graphene/types/options.py
  111. +24 −0 graphene/types/resolver.py
  112. +80 −53 graphene/types/scalars.py
  113. +508 −70 graphene/types/schema.py
  114. +47 −26 graphene/types/structures.py
  115. +12 −0 graphene/types/tests/conftest.py
  116. +0 −42 graphene/types/tests/test_abstracttype.py
  117. +73 −24 graphene/types/tests/test_argument.py
  118. +63 −0 graphene/types/tests/test_base.py
  119. +97 −0 graphene/types/tests/test_base64.py
  120. +253 −20 graphene/types/tests/test_datetime.py
  121. +68 −0 graphene/types/tests/test_decimal.py
  122. +76 −76 graphene/types/tests/test_definition.py
  123. +17 −6 graphene/types/tests/test_dynamic.py
  124. +528 −26 graphene/types/tests/test_enum.py
  125. +77 −34 graphene/types/tests/test_field.py
  126. +84 −0 graphene/types/tests/test_generic.py
  127. +47 −0 graphene/types/tests/test_inputfield.py
  128. +93 −25 graphene/types/tests/test_inputobjecttype.py
  129. +128 −18 graphene/types/tests/test_interface.py
  130. +54 −13 graphene/types/tests/test_json.py
  131. +23 −0 graphene/types/tests/test_mountedtype.py
  132. +164 −26 graphene/types/tests/test_mutation.py
  133. +170 −36 graphene/types/tests/test_objecttype.py
  134. +0 −30 graphene/types/tests/test_options.py
  135. +201 −106 graphene/types/tests/test_query.py
  136. +58 −0 graphene/types/tests/test_resolver.py
  137. +308 −0 graphene/types/tests/test_scalar.py
  138. +17 −16 graphene/types/tests/test_scalars_serialization.py
  139. +38 −18 graphene/types/tests/test_schema.py
  140. +59 −13 graphene/types/tests/test_structures.py
  141. +78 −0 graphene/types/tests/test_subscribe_async.py
  142. +333 −0 graphene/types/tests/test_type_map.py
  143. +0 −185 graphene/types/tests/test_typemap.py
  144. +22 −7 graphene/types/tests/test_union.py
  145. +83 −0 graphene/types/tests/test_uuid.py
  146. +1 −0 graphene/types/tests/utils.py
  147. +0 −269 graphene/types/typemap.py
  148. +63 −34 graphene/types/union.py
  149. +55 −42 graphene/types/unmountedtype.py
  150. +29 −63 graphene/types/utils.py
  151. +37 −0 graphene/types/uuid.py
  152. +35 −0 graphene/utils/crunch.py
  153. +280 −0 graphene/utils/dataloader.py
  154. +32 −0 graphene/utils/deduplicator.py
  155. +5 −0 graphene/utils/deprecated.py
  156. +1 −1 graphene/utils/get_unbound_function.py
  157. +0 −3 graphene/utils/is_base_type.py
  158. +6 −0 graphene/utils/is_introspection_key.py
  159. +45 −0 graphene/utils/module_loading.py
  160. +2 −2 graphene/utils/orderedtype.py
  161. +2 −2 graphene/utils/props.py
  162. +5 −2 graphene/utils/resolve_only_args.py
  163. +6 −10 graphene/utils/str_converters.py
  164. +50 −0 graphene/utils/subclass_with_meta.py
  165. +51 −0 graphene/utils/tests/test_crunch.py
  166. +452 −0 graphene/utils/tests/test_dataloader.py
  167. +179 −0 graphene/utils/tests/test_deduplicator.py
  168. +9 −0 graphene/utils/tests/test_deprecated.py
  169. +69 −0 graphene/utils/tests/test_module_loading.py
  170. +1 −1 graphene/utils/tests/test_orderedtype.py
  171. +8 −7 graphene/utils/tests/test_resolve_only_args.py
  172. 0 graphene/utils/tests/test_resolver_from_annotations.py
  173. +12 −15 graphene/utils/tests/test_str_converters.py
  174. +22 −0 graphene/utils/tests/test_trim_docstring.py
  175. +25 −0 graphene/utils/thenables.py
  176. +9 −0 graphene/utils/trim_docstring.py
  177. +5 −0 graphene/validation/__init__.py
  178. +195 −0 graphene/validation/depth_limit.py
  179. +16 −0 graphene/validation/disable_introspection.py
  180. 0 graphene/validation/tests/__init__.py
  181. +254 −0 graphene/validation/tests/test_depth_limit_validator.py
  182. +37 −0 graphene/validation/tests/test_disable_introspection.py
  183. +17 −0 mypy.ini
  184. +3 −7 setup.cfg
  185. +62 −59 setup.py
  186. +18 −19 tox.ini
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -11,4 +11,3 @@ trim_trailing_whitespace = true
[*.{py,rst,ini}]
indent_style = space
indent_size = 4

34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: "\U0001F41B bug"
assignees: ''

---

**Note: for support questions, please use stackoverflow**. This repository's issues are reserved for feature requests and bug reports.

* **What is the current behavior?**



* **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem** via
a github repo, https://repl.it or similar.



* **What is the expected behavior?**



* **What is the motivation / use case for changing the behavior?**



* **Please tell us about your environment:**

- Version:
- Platform:

* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: "✨ enhancement"
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
24 changes: 24 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: false
# Number of days of inactivity before a stale issue is closed
daysUntilClose: false
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
- 🐛 bug
- 📖 documentation
- 🙋 help wanted
- ✨ enhancement
- good first issue
- work in progress
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: false
# markComment: >
# This issue has been automatically marked as stale because it has not had
# recent activity. It will be closed if no further activity occurs. Thank you
# for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
21 changes: 21 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 📦 Build

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Building package
run: python3 -m build
- name: Check package with Twine
run: twine check dist/*
26 changes: 26 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 🚀 Deploy to PyPI

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Build wheel and source tarball
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@v1.1.0
with:
user: __token__
password: ${{ secrets.pypi_password }}
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 💅 Lint

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Run lint
run: tox
env:
TOXENV: pre-commit
- name: Run mypy
run: tox
env:
TOXENV: mypy
64 changes: 64 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: 📄 Tests
on:
push:
branches:
- master
- '*.x'
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
pull_request:
branches:
- master
- '*.x'
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
jobs:
tests:
# runs the test suite
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {name: '3.13', python: '3.13', os: ubuntu-latest, tox: py313}
- {name: '3.12', python: '3.12', os: ubuntu-latest, tox: py312}
- {name: '3.11', python: '3.11', os: ubuntu-latest, tox: py311}
- {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310}
- {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39}
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: update pip
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel
- name: get pip cache dir
id: pip-cache
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: cache pip dependencies
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}
- run: pip install tox
- run: tox -e ${{ matrix.tox }}
- name: Upload coverage.xml
if: ${{ matrix.python == '3.10' }}
uses: actions/upload-artifact@v4
with:
name: graphene-coverage
path: coverage.xml
if-no-files-found: error
- name: Upload coverage.xml to codecov
if: ${{ matrix.python == '3.10' }}
uses: codecov/codecov-action@v4
15 changes: 13 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ __pycache__/

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
@@ -42,9 +41,11 @@ htmlcov/
.coverage
.coverage.*
.cache
.pytest_cache
nosetests.xml
coverage.xml
*,cover
*.cover
.pytest_cache/

# Translations
*.mo
@@ -59,6 +60,14 @@ docs/_build/
# PyBuilder
target/

# VirtualEnv
.env
.venv
env/
venv/

# Typing
.mypy_cache/

/tests/django.sqlite

@@ -80,3 +89,5 @@ target/
# Databases
*.sqlite3
.vscode
.mypy_cache
.ruff_cache
29 changes: 29 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
default_language_version:
python: python3.10

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-merge-conflict
- id: check-json
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
exclude: ^docs/.*$
- id: pretty-format-json
args:
- --autofix
- id: trailing-whitespace
exclude: README.md
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.3
hooks:
- id: pyupgrade
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.0
hooks:
- id: ruff
- id: ruff-format
args: [ --check ]
61 changes: 0 additions & 61 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -2,3 +2,4 @@ global-exclude tests/*
recursive-exclude tests *
recursive-exclude tests_py35 *
recursive-exclude examples *
include LICENSE
28 changes: 28 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.PHONY: help
help:
@echo "Please use \`make <target>' where <target> is one of"
@grep -E '^\.PHONY: [a-zA-Z_-]+ .*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = "(: |##)"}; {printf "\033[36m%-30s\033[0m %s\n", $$2, $$3}'

.PHONY: install-dev ## Install development dependencies
install-dev:
pip install -e ".[dev]"

.PHONY: test ## Run tests
test:
py.test graphene examples

.PHONY: docs ## Generate docs
docs: install-dev
cd docs && make install && make html

.PHONY: docs-live ## Generate docs with live reloading
docs-live: install-dev
cd docs && make install && make livehtml

.PHONY: format
format:
black graphene examples setup.py

.PHONY: lint
lint:
flake8 graphene examples setup.py
Loading