Skip to content

Commit

Permalink
gql v3.6.0b4
Browse files Browse the repository at this point in the history
  • Loading branch information
leszekhanusz authored Feb 19, 2025
2 parents c0c1776 + e92f847 commit 05d620c
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 82 deletions.
8 changes: 2 additions & 6 deletions .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@ channel_targets:
- conda-forge gql_beta
docker_image:
- quay.io/condaforge/linux-anvil-x86_64:alma9
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.12.* *_cpython
python_min:
- '3.9'
3 changes: 3 additions & 0 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

130 changes: 54 additions & 76 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,86 +1,77 @@
{% set version = "3.6.0b3" %}
{% set min_python = "python >=3.8" %}
{% set version = "3.6.0b4" %}

{% set python_min = python_min | default("3.9") %}

{% set PYTHON = PYTHON | default("$PYTHON") %}

package:
name: gql-split
name: gql
version: {{ version }}

source:
url: https://pypi.org/packages/source/g/gql/gql-{{ version }}.tar.gz
sha256: 5376e4d8eed4d052bcfb35fdcfccf0db1145ea250e14516ceface2611e0b5e19
sha256: 6781f00de33cd2049d064124ba5ffd821124e2fd6e87c557c6f592958c979d96

build:
number: 5
noarch: python
number: 2
script:
- {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation --disable-pip-version-check
entry_points:
- gql-cli = gql.cli:gql_cli

requirements:
host:
- {{ min_python }}
- pip
- python {{ python_min }}
- setuptools
run:
- {{ min_python }}
- python >={{ python_min }}
- graphql-core >=3.3.0a3,<3.4
- yarl >=1.6,<2.0
- backoff >=1.11.1,<3.0
- anyio >=3.0,<5
run_constrained:
# aiohttp
- aiohttp >=3.8.0,<4
# httpx
- httpx >=0.27,<1
# requests
- requests >=2.26,<3
- requests-toolbelt >=1.0.0,<2
# websockets
- websockets >=10.1,<14
# boto
- botocore >=1.21,<2

test:
requires:
- pip
- python {{ python_min }}
imports:
- gql
commands:
- echo "tests in outputs"
- pip check
- gql-cli --help
- gql-cli --version

outputs:
- name: gql
build:
noarch: python
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
entry_points:
- gql-cli = gql.cli:gql_cli

requirements:
host:
- {{ min_python }}
- setuptools
- pip
run:
- {{ min_python }}
- graphql-core >=3.3.0a3,<3.4
- yarl >=1.6,<2.0
- backoff >=1.11.1,<3.0
- anyio >=3.0,<5
run_constrained:
# aiohttp
- aiohttp>=3.8.0,<4
# httpx
- httpx >=0.23.1,<1
# requests
- requests >=2.26,<3
- requests-toolbelt >=1.0.0,<2
# websockets
- websockets >=10,<12
# boto
- botocore >=1.21,<2
test:
imports:
- gql
requires:
- pip
commands:
- pip check
- gql-cli --help
- gql-cli --version

- name: gql-with-aiohttp
build:
noarch: python
noarch: generic
requirements:
host:
- {{ min_python }}
run:
- {{ pin_subpackage('gql', exact=True) }}
- {{ min_python }}
- aiohttp
test:
imports:
- gql
- gql.transport.aiohttp
requires:
- pip
- python {{ python_min }}
commands:
- pip check
- gql-cli --help
Expand All @@ -90,20 +81,18 @@ outputs:

- name: gql-with-httpx
build:
noarch: python
noarch: generic
requirements:
host:
- {{ min_python }}
run:
- {{ pin_subpackage('gql', exact=True) }}
- {{ min_python }}
- httpx
test:
imports:
- gql
- gql.transport.httpx
requires:
- pip
- python {{ python_min }}
commands:
- pip check
- gql-cli --help
Expand All @@ -113,13 +102,10 @@ outputs:

- name: gql-with-requests
build:
noarch: python
noarch: generic
requirements:
host:
- {{ min_python }}
run:
- {{ pin_subpackage('gql', exact=True) }}
- {{ min_python }}
- requests
- requests-toolbelt
- urllib3
Expand All @@ -129,6 +115,7 @@ outputs:
- gql.transport.requests
requires:
- pip
- python {{ python_min }}
commands:
- pip check
- gql-cli --help
Expand All @@ -138,20 +125,18 @@ outputs:

- name: gql-with-websockets
build:
noarch: python
noarch: generic
requirements:
host:
- {{ min_python }}
run:
- {{ pin_subpackage('gql', exact=True) }}
- {{ min_python }}
- websockets
test:
imports:
- gql
- gql.transport.websockets
requires:
- pip
- python {{ python_min }}
commands:
- pip check
- gql-cli --help
Expand All @@ -161,20 +146,18 @@ outputs:

- name: gql-with-botocore
build:
noarch: python
noarch: generic
requirements:
host:
- {{ min_python }}
run:
- {{ pin_subpackage('gql', exact=True) }}
- {{ min_python }}
- botocore
test:
imports:
- gql
- gql.transport.appsync_auth
requires:
- pip
- python {{ python_min }}
commands:
- pip check
- gql-cli --help
Expand All @@ -184,19 +167,18 @@ outputs:

- name: gql-with-all
build:
noarch: python
noarch: generic
requirements:
host:
- {{ min_python }}
run:
- {{ pin_subpackage('gql-with-aiohttp', exact=True) }}
- {{ pin_subpackage('gql-with-httpx', exact=True) }}
- {{ pin_subpackage('gql-with-botocore', exact=True) }}
- {{ pin_subpackage('gql-with-requests', exact=True) }}
- {{ pin_subpackage('gql-with-websockets', exact=True) }}
- {{ pin_subpackage('gql', exact=True) }}
- {{ min_python }}
test:
files:
- run_gql_with_all.py
source_files:
- tests
requires:
Expand All @@ -209,16 +191,12 @@ outputs:
- pytest-console-scripts
- pytest-cov
- vcrpy
- python {{ python_min }}
commands:
- pip check
- gql-cli --help
- gql-cli --version
{% set skips = [
"appsync_subscription_api_key_unauthorized",
"appsync_subscription_server_sending_an_error_without_an_id",
"websocket_connect_failed_with_authentication_in_connection_init",
] %}
- pytest -vv --color=yes --tb=long --cov=gql --cov-report=term-missing:skip-covered --no-cov-on-fail -k "not ({{ skips | join(" or ") }})" --cov-fail-under=99
- python run_gql_with_all.py

about:
home: https://github.com/graphql-python/gql
Expand Down
24 changes: 24 additions & 0 deletions recipe/run_gql_with_all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import sys
from subprocess import call

FAIL_UNDER = "95"
COV = ["coverage"]
RUN = ["run", "--source=gql", "--branch", "-m"]
PYTEST = ["pytest", "-vv", "--color=yes", "--tb=long"]
REPORT = ["report", "--show-missing", "--skip-covered", f"--fail-under={FAIL_UNDER}"]

SKIPS = [
]


SKIP_OR = " or ".join(SKIPS)
K = ["-k", f"not ({SKIP_OR})"] if SKIPS else []


if __name__ == "__main__":
sys.exit(
# run the tests
call([*COV, *RUN, *PYTEST, *K])
# maybe run coverage
or call([*COV, *REPORT])
)

0 comments on commit 05d620c

Please sign in to comment.