From 67bc80f1085a9a40c26dcf6a3dab11384c7c35b8 Mon Sep 17 00:00:00 2001 From: Denis Artyushin Date: Mon, 19 Feb 2024 16:18:36 +0300 Subject: [PATCH] Docs/update metainfo (#34) * Update meta-info * Update requirements * Update readme * Update readme title * Add links to docs --- README.md | 6 ++--- docs/index.md | 6 ++--- docs/intro.md | 2 +- docs/usage.md | 8 +++--- pyproject.toml | 23 +++++++++------- requirements/requirements-dev.txt | 42 ++++++++---------------------- requirements/requirements-docs.txt | 24 ++++++++--------- requirements/requirements-test.txt | 14 +++++----- requirements/requirements.txt | 8 +++--- 9 files changed, 58 insertions(+), 75 deletions(-) diff --git a/README.md b/README.md index 376a511..649cef4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# GraphQL-Query +# graphql-query [![tag](https://img.shields.io/github/v/tag/denisart/graphql-query)](https://github.com/denisart/graphql-query) [![last-commit](https://img.shields.io/github/last-commit/denisart/graphql-query/master)](https://github.com/denisart/graphql-query/commits/master) @@ -6,7 +6,7 @@ --- -**graphql_query** is a complete Domain Specific Language (DSL) for GraphQL query in python. With **graphql_query** +**graphql_query** is a complete Domain Specific Language (DSL) for GraphQL query in Python. With this package you can to - generate a correct GraphQL query string from a python classes; @@ -78,7 +78,7 @@ query Hero($episode: Episode, $withFriends: Boolean!) { } ``` -we have +we can use the following python code ```python from graphql_query import Argument, Directive, Field, Operation, Query, Variable diff --git a/docs/index.md b/docs/index.md index 376a511..649cef4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -# GraphQL-Query +# graphql-query [![tag](https://img.shields.io/github/v/tag/denisart/graphql-query)](https://github.com/denisart/graphql-query) [![last-commit](https://img.shields.io/github/last-commit/denisart/graphql-query/master)](https://github.com/denisart/graphql-query/commits/master) @@ -6,7 +6,7 @@ --- -**graphql_query** is a complete Domain Specific Language (DSL) for GraphQL query in python. With **graphql_query** +**graphql_query** is a complete Domain Specific Language (DSL) for GraphQL query in Python. With this package you can to - generate a correct GraphQL query string from a python classes; @@ -78,7 +78,7 @@ query Hero($episode: Episode, $withFriends: Boolean!) { } ``` -we have +we can use the following python code ```python from graphql_query import Argument, Directive, Field, Operation, Query, Variable diff --git a/docs/intro.md b/docs/intro.md index b5d0b40..ee385a0 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -7,7 +7,7 @@ For install you can to use **pip** with the following command ```bash -pip install graphql-query +pip install graphql_query ``` After installation, you can start using GRAPHQL_QUERY by importing from the top-level graphql_query package. diff --git a/docs/usage.md b/docs/usage.md index c7f3ec6..1990329 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -2,12 +2,12 @@ **graphql_query** provides special python classes for generate of GraphQL queries. Below are examples of using these classes for queries from GraphQL documentation -https://graphql.org/learn/queries/ +[https://graphql.org/learn/queries/](https://graphql.org/learn/queries/) ## First query **Operation** it is the general class for render of your GraphQL query or mutation. -For the first query from https://graphql.org/learn/queries/#fields +For the first query from [https://graphql.org/learn/queries/#fields](https://graphql.org/learn/queries/#fields) ```graphql { @@ -80,7 +80,7 @@ query { ## Arguments -For arguments in your query or fields (https://graphql.org/learn/queries/#arguments) +For arguments in your query or fields ([https://graphql.org/learn/queries/#arguments](https://graphql.org/learn/queries/#arguments)) you can use **graphql_query.Argument**: ```python @@ -425,7 +425,7 @@ mutation CreateReviewForEpisode( ## Inline Fragments -For union types you can use inline fragments https://graphql.org/learn/queries/#inline-fragments +For union types you can use inline fragments [https://graphql.org/learn/queries/#inline-fragments](https://graphql.org/learn/queries/#inline-fragments) ```python from graphql_query import Argument, Operation, Query, Variable, InlineFragment diff --git a/pyproject.toml b/pyproject.toml index c42f730..24137d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,36 +7,39 @@ path = "graphql_query/__version__.py" [project] name = "graphql_query" -description = "Complete GraphQL query string generation for python." +description = "Complete Domain Specific Language (DSL) for GraphQL query in Python." readme = "README.md" authors = [ {name = "Denis A. Artyushin", email = "artyushinden@gmail.com"}, ] keywords = [ - "python", "graphql", "graphql-query", + "python", "graphql", "graphql-query", "dsl", "query-builder", "code-generation", "codegen", - "query-generator", "graphql-query-builder", "query-generation", + "query-generator", "pydantic", "graphql-query-builder", + "query-generation", ] license = "MIT" +# list of classifiers +# https://pypi.org/classifiers/ classifiers = [ "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "License :: OSI Approved :: MIT License", - "Operating System :: Unix", - "Operating System :: POSIX :: Linux", - "Environment :: Console", + "Operating System :: OS Independent", "Environment :: MacOS X", "Framework :: Pydantic", + "Framework :: Pydantic :: 2", + "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", ] -requires-python = ">=3.7" +requires-python = ">=3.8" dependencies = [ "pydantic>=2", "jinja2>=3.1, <3.2", @@ -49,7 +52,7 @@ Documentation = "https://denisart.github.io/graphql-query/" Source = "https://github.com/denisart/graphql-query" [project.optional-dependencies] -# all requirements for linting, building and etc. +# all requirements for linting, building e.t.c. dev = [ "mypy", "ruff", @@ -76,7 +79,7 @@ line-length = 120 flake8-quotes = {inline-quotes = 'single', multiline-quotes = 'double'} mccabe = { max-complexity = 14 } isort = { known-first-party = ['graphql_core', 'tests'] } -target-version = "py37" +target-version = "py38" [tool.black] color = true diff --git a/requirements/requirements-dev.txt b/requirements/requirements-dev.txt index 22079de..60b9648 100644 --- a/requirements/requirements-dev.txt +++ b/requirements/requirements-dev.txt @@ -4,43 +4,25 @@ # # pip-compile --extra=dev --output-file=requirements/requirements-dev.txt pyproject.toml # -aiohttp==3.9.1 - # via black -aiosignal==1.3.1 - # via aiohttp annotated-types==0.6.0 # via pydantic -astroid==3.0.2 +astroid==3.0.3 # via pylint -async-timeout==4.0.3 - # via aiohttp -attrs==23.1.0 - # via aiohttp -black==23.12.0 +black==24.2.0 # via graphql_query (pyproject.toml) click==8.1.7 # via black -dill==0.3.7 +dill==0.3.8 # via pylint -frozenlist==1.4.0 - # via - # aiohttp - # aiosignal -idna==3.6 - # via yarl isort==5.13.2 # via pylint -jinja2==3.1.2 +jinja2==3.1.3 # via graphql_query (pyproject.toml) -markupsafe==2.1.3 +markupsafe==2.1.5 # via jinja2 mccabe==0.7.0 # via pylint -multidict==6.0.4 - # via - # aiohttp - # yarl -mypy==1.7.1 +mypy==1.8.0 # via graphql_query (pyproject.toml) mypy-extensions==1.0.0 # via @@ -50,15 +32,15 @@ packaging==23.2 # via black pathspec==0.12.1 # via black -platformdirs==4.1.0 +platformdirs==4.2.0 # via # black # pylint -pydantic==2.5.2 +pydantic==2.6.1 # via # graphql_query (pyproject.toml) # pylint-pydantic -pydantic-core==2.14.5 +pydantic-core==2.16.2 # via pydantic pylint==3.0.3 # via @@ -66,9 +48,9 @@ pylint==3.0.3 # pylint-pydantic pylint-plugin-utils==0.8.2 # via pylint-pydantic -pylint-pydantic==0.3.1 +pylint-pydantic==0.3.2 # via graphql_query (pyproject.toml) -ruff==0.1.8 +ruff==0.2.2 # via graphql_query (pyproject.toml) tomli==2.0.1 # via @@ -86,5 +68,3 @@ typing-extensions==4.9.0 # pydantic-core wheel==0.42.0 # via graphql_query (pyproject.toml) -yarl==1.9.4 - # via aiohttp diff --git a/requirements/requirements-docs.txt b/requirements/requirements-docs.txt index a695886..25ba0a0 100644 --- a/requirements/requirements-docs.txt +++ b/requirements/requirements-docs.txt @@ -8,7 +8,7 @@ annotated-types==0.6.0 # via pydantic babel==2.14.0 # via mkdocs-material -certifi==2023.11.17 +certifi==2024.2.2 # via requests charset-normalizer==3.3.2 # via requests @@ -20,17 +20,17 @@ ghp-import==2.1.0 # via mkdocs idna==3.6 # via requests -jinja2==3.1.2 +jinja2==3.1.3 # via # graphql_query (pyproject.toml) # mkdocs # mkdocs-material -markdown==3.5.1 +markdown==3.5.2 # via # mkdocs # mkdocs-material # pymdown-extensions -markupsafe==2.1.3 +markupsafe==2.1.5 # via # jinja2 # mkdocs @@ -40,7 +40,7 @@ mkdocs==1.5.3 # via # graphql_query (pyproject.toml) # mkdocs-material -mkdocs-material==9.5.2 +mkdocs-material==9.5.10 # via graphql_query (pyproject.toml) mkdocs-material-extensions==1.3.1 # via mkdocs-material @@ -50,15 +50,15 @@ paginate==0.5.6 # via mkdocs-material pathspec==0.12.1 # via mkdocs -platformdirs==4.1.0 +platformdirs==4.2.0 # via mkdocs -pydantic==2.5.2 +pydantic==2.6.1 # via graphql_query (pyproject.toml) -pydantic-core==2.14.5 +pydantic-core==2.16.2 # via pydantic pygments==2.17.2 # via mkdocs-material -pymdown-extensions==10.5 +pymdown-extensions==10.7 # via mkdocs-material python-dateutil==2.8.2 # via ghp-import @@ -69,7 +69,7 @@ pyyaml==6.0.1 # pyyaml-env-tag pyyaml-env-tag==0.1 # via mkdocs -regex==2023.10.3 +regex==2023.12.25 # via mkdocs-material requests==2.31.0 # via mkdocs-material @@ -79,7 +79,7 @@ typing-extensions==4.9.0 # via # pydantic # pydantic-core -urllib3==2.1.0 +urllib3==2.2.1 # via requests -watchdog==3.0.0 +watchdog==4.0.0 # via mkdocs diff --git a/requirements/requirements-test.txt b/requirements/requirements-test.txt index 311d2eb..b6cacef 100644 --- a/requirements/requirements-test.txt +++ b/requirements/requirements-test.txt @@ -6,7 +6,7 @@ # annotated-types==0.6.0 # via pydantic -coverage[toml]==7.3.3 +coverage[toml]==7.4.1 # via # coverage # pytest-cov @@ -14,19 +14,19 @@ exceptiongroup==1.2.0 # via pytest iniconfig==2.0.0 # via pytest -jinja2==3.1.2 +jinja2==3.1.3 # via graphql_query (pyproject.toml) -markupsafe==2.1.3 +markupsafe==2.1.5 # via jinja2 packaging==23.2 # via pytest -pluggy==1.3.0 +pluggy==1.4.0 # via pytest -pydantic==2.5.2 +pydantic==2.6.1 # via graphql_query (pyproject.toml) -pydantic-core==2.14.5 +pydantic-core==2.16.2 # via pydantic -pytest==7.4.3 +pytest==8.0.1 # via # graphql_query (pyproject.toml) # pytest-cov diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 86126cd..62fcc70 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -6,13 +6,13 @@ # annotated-types==0.6.0 # via pydantic -jinja2==3.1.2 +jinja2==3.1.3 # via graphql_query (pyproject.toml) -markupsafe==2.1.3 +markupsafe==2.1.5 # via jinja2 -pydantic==2.5.2 +pydantic==2.6.1 # via graphql_query (pyproject.toml) -pydantic-core==2.14.5 +pydantic-core==2.16.2 # via pydantic typing-extensions==4.9.0 # via