Skip to content

Commit

Permalink
missed dependency fix, doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikikuzi committed Mar 18, 2024
1 parent 41b3419 commit 0fabfaa
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pip install graphql-dataclass
To generate the code execute the following command:

```
pgmcodegen generate ./pathToOutputFolder -apiArgs ./<pathToArgsFile>/generatorArgs.json
gqldataclass generate ./pathToOutputFolder -apiArgs ./<pathToArgsFile>/generatorArgs.json
```

This command requires a json file containing the parameters needed to get the GraphQL schema
Expand Down
4 changes: 2 additions & 2 deletions codegen/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ _generate_code_ function will create the following python files containing the G
Example of schema retrieval command:

```
pgmcodegen download ./cmd_output/Github/schema.json -apiArgs ./downloaderArgs.json
gqldataclass download ./cmd_output/Github/schema.json -apiArgs ./downloaderArgs.json
```

This command will create the file in _./cmd_output/Github/schema.json_ containing the schema in json version using the [information](#json-args-file) given in _./downloaderArgs.json_.
Expand All @@ -101,7 +101,7 @@ A few examples can be seen [here](https://github.com/nikikuzi/graphql-dataclass/
Classes can be generated alternatively using the CLI command:

```
pgmcodegen generate ./gdbc -apiArgs ./generatorArgs.json -v
gqldataclass generate ./gdbc -apiArgs ./generatorArgs.json -v
```

This command will generate python files in _./gdbc/_ relative folder using the [information](#json-args-file) given in _./generatorArgs.json_.
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ build-backend = "setuptools.build_meta"
[project]
name = "graphql-dataclass"
authors = [
{ name="Alex Dap", email="[email protected]" },
{ name="Mikita Kuzniatsou", email="[email protected]" },
{ name="Alex Dap", email="[email protected]" },
]
readme = "README.md"
keywords = ["python", "graphql", "mapping", "dataclass"]
Expand All @@ -20,7 +20,7 @@ classifiers = [
dynamic = ["version", "description"]

[project.scripts]
pgmcodegen = "codegen.__main__:main"
gqldataclass = "codegen.__main__:main"

[project.urls]
"Homepage" = "https://github.com/nikikuzi/graphql-dataclass/"
Expand Down
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
from setuptools import setup

from pathlib import Path
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()
setup(
name='gqldataclass',
version='1.0.0',
url='https://github.com/nikikuzi/graphql-dataclass/tree/1.0.0',
author='Alex Dap, Mikita Kuzniatsou',
author_email='shlisi2017@gmail.com, nikikuzi@gmail.com',
author='Mikita Kuzniatsou, Alex Dap',
author_email='nikikuzi@gmail.com, shlisi2017@gmail.com',
description='A python library to generate dataclasses for GraphQL types',
long_description=long_description,
include_package_data=True,
packages=['pygqlmap', 'pygqlmap.src', 'codegen', 'codegen.src', 'codegen.src.templates'],
data_files=[('', ['pygqlmap/config.ini'])],
install_requires=['clean-py==0.5'],
python_requires='>=3.10',
classifiers=[
'Intended Audience :: Developers',
Expand Down
16 changes: 8 additions & 8 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_generate_cmd_gh_file(self):

def run_download_cmd_ra_file_rel():
logger.debug('\nRunning run_download_cmd_ra_file_rel...')
command = "pgmcodegen download ./tests/cmd_output/rapidapi/schema.json -apiArgs ./tests/cli_input/rapid_api/downloaderArgs.json -v" #command to be executed
command = "gqldataclass download ./tests/cmd_output/rapidapi/schema.json -apiArgs ./tests/cli_input/rapid_api/downloaderArgs.json -v" #command to be executed
logger.debug("Launching: " + command)

res = os.system(command)
Expand All @@ -50,7 +50,7 @@ def run_download_cmd_ra_file_rel():

def run_generate_cmd_ra_api_abs():
logger.debug('\nRunning run_generate_cmd_ra_api_abs...')
command = "pgmcodegen generate ./tests/cmd_output/rapidapi -v -apiArgs ./tests/cli_input/rapid_api/generatorArgs.json -v" #command to be executed
command = "gqldataclass generate ./tests/cmd_output/rapidapi -v -apiArgs ./tests/cli_input/rapid_api/generatorArgs.json -v" #command to be executed
logger.debug("Launching: " + command)

res = os.system(command)
Expand All @@ -59,7 +59,7 @@ def run_generate_cmd_ra_api_abs():

def run_download_cmd_gdbc_file_rel():
logger.debug('\nRunning run_download_cmd_gh_file_rel...')
command = "pgmcodegen download ./tests/cmd_output/gdbc/schema.json -apiArgs ./tests/cli_input/gdbc_api/downloaderArgs.json -v" #command to be executed
command = "gqldataclass download ./tests/cmd_output/gdbc/schema.json -apiArgs ./tests/cli_input/gdbc_api/downloaderArgs.json -v" #command to be executed
logger.debug("Launching: " + command)

res = os.system(command)
Expand All @@ -68,7 +68,7 @@ def run_download_cmd_gdbc_file_rel():

def run_generate_cmd_gdbc_file_rel():
logger.debug('\nRunning run_generate_cmd_gdbc_file_rel...')
command = "pgmcodegen generate ./tests/cmd_output/gdbc -apiArgs tests/cli_input/gdbc_api/schema.json -v" #command to be executed
command = "gqldataclass generate ./tests/cmd_output/gdbc -apiArgs tests/cli_input/gdbc_api/schema.json -v" #command to be executed
logger.debug("Launching: " + command)

res = os.system(command)
Expand All @@ -77,7 +77,7 @@ def run_generate_cmd_gdbc_file_rel():

def run_generate_cmd_gdbc_api_rel():
logger.debug('\nRunning run_generate_cmd_gdbc_api_rel...')
command = "pgmcodegen generate ./tests/cmd_output/gdbc -apiArgs ./tests/cli_input/gdbc_api/generatorArgs.json -v" #command to be executed
command = "gqldataclass generate ./tests/cmd_output/gdbc -apiArgs ./tests/cli_input/gdbc_api/generatorArgs.json -v" #command to be executed
logger.debug("Launching: " + command)

res = os.system(command)
Expand All @@ -87,7 +87,7 @@ def run_generate_cmd_gdbc_api_rel():

def run_download_cmd_gh_file_rel():
logger.debug('\nRunning run_download_cmd_gh_file_rel...')
command = "pgmcodegen download ./tests/cmd_output/github/schema.json -apiArgs ./tests/cli_input/gh_api/downloaderArgs.json -v" #command to be executed
command = "gqldataclass download ./tests/cmd_output/github/schema.json -apiArgs ./tests/cli_input/gh_api/downloaderArgs.json -v" #command to be executed
logger.debug("Launching: " + command)

res = os.system(command)
Expand All @@ -96,7 +96,7 @@ def run_download_cmd_gh_file_rel():

def run_generate_cmd_gh_api_abs():
logger.debug('\nRunning run_generate_cmd_gh_api_abs...')
command = "pgmcodegen generate ./tests/cmd_output/github -v -apiArgs ./tests/cli_input/gh_api/generatorArgs.json -v" #command to be executed
command = "gqldataclass generate ./tests/cmd_output/github -v -apiArgs ./tests/cli_input/gh_api/generatorArgs.json -v" #command to be executed
logger.debug("Launching: " + command)

res = os.system(command)
Expand All @@ -105,7 +105,7 @@ def run_generate_cmd_gh_api_abs():

def run_generate_cmd_gh_file():
logger.debug('\nRunning run_generate_cmd_gh_api_abs...')
command = "pgmcodegen generate ./tests/cmd_output/github -v -apiArgs ./tests/cli_input/gh_api/generatorArgs.json -v" #command to be executed
command = "gqldataclass generate ./tests/cmd_output/github -v -apiArgs ./tests/cli_input/gh_api/generatorArgs.json -v" #command to be executed
logger.debug("Launching: " + command)

res = os.system(command)
Expand Down

0 comments on commit 0fabfaa

Please sign in to comment.