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

🚑 fixes graphql parser --use-standard-collections --use-union-operator --use-annotated #2016

Merged
merged 25 commits into from
Jul 4, 2024

Conversation

bpsoos
Copy link
Contributor

@bpsoos bpsoos commented Jun 27, 2024

resolves #1941

Copy link

codecov bot commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (202c0b8) to head (7a33cd8).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2016   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           38        38           
  Lines         4197      4199    +2     
  Branches       967       967           
=========================================
+ Hits          4197      4199    +2     
Flag Coverage Δ
unittests 99.66% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


from typing import List, Optional

from pydantic import AnyUrl, BaseModel, Field

Check notice

Code scanning / CodeQL

Unused import Note test

Import of 'Field' is not used.
Copy link

codspeed-hq bot commented Jun 28, 2024

CodSpeed Performance Report

Merging #2016 will create unknown performance changes

Comparing bpsoos:fix/1941-graphql-options (7a33cd8) with main (202c0b8)

Summary

🆕 29 new benchmarks
⁉️ 29 dropped benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main bpsoos:fix/1941-graphql-options Change
🆕 test_main_all_of_ref N/A 52.2 ms N/A
🆕 test_main_autodetect N/A 72.4 ms N/A
🆕 test_main_external_definitions N/A 55.9 ms N/A
🆕 test_main_inheritance_forward_ref N/A 138 ms N/A
🆕 test_main_inheritance_forward_ref_keep_model_order N/A 139.4 ms N/A
🆕 test_main_json_reuse_enum_default_member N/A 99.2 ms N/A
🆕 test_main_jsonschema_complex_any_of N/A 71.5 ms N/A
🆕 test_main_jsonschema_external_files N/A 53.1 ms N/A
🆕 test_main_jsonschema_field_include_all_keys N/A 71.2 ms N/A
🆕 test_main_jsonschema_id N/A 59.7 ms N/A
🆕 test_main_jsonschema_multiple_files N/A 96 ms N/A
🆕 test_main_jsonschema_nested_deep N/A 87.6 ms N/A
🆕 test_main_jsonschema_special_field_name N/A 73.9 ms N/A
🆕 test_main_nested_directory N/A 279.1 ms N/A
🆕 test_main_root_id_jsonschema_self_refs_with_local_file N/A 100.1 ms N/A
🆕 test_main_root_id_jsonschema_self_refs_with_remote_file N/A 99.5 ms N/A
🆕 test_main_strict_types N/A 93.4 ms N/A
🆕 test_main_strict_types_all_with_field_constraints N/A 88.3 ms N/A
🆕 test_force_optional N/A 161.5 ms N/A
🆕 test_main N/A 148.6 ms N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Signed-off-by: bpsoos <soos.peter.96@gmail.com>
Signed-off-by: bpsoos <soos.peter.96@gmail.com>
Signed-off-by: bpsoos <soos.peter.96@gmail.com>
Signed-off-by: bpsoos <soos.peter.96@gmail.com>
Signed-off-by: bpsoos <soos.peter.96@gmail.com>
Signed-off-by: bpsoos <soos.peter.96@gmail.com>
Signed-off-by: bpsoos <soos.peter.96@gmail.com>
Signed-off-by: bpsoos <soos.peter.96@gmail.com>
Signed-off-by: bpsoos <soos.peter.96@gmail.com>
@bpsoos
Copy link
Contributor Author

bpsoos commented Jun 28, 2024

Hello @koxudaxi,

Sorry for the large diff. Most of it is just refactor. The actual fix is contained in these commits.

The rest of the changes included (only refactor of tests/test data):

  • separated test_main.py into independent test files (test_main_openapi.py, test_main_jsonschema.py, etc.)
  • grouped the expectations in tests/data/expectation/main into groups (openapi, jsonschema, json, etc.)
  • updated the tests to use the path of the grouped expectations

My aim here was to reduce directory sizes and LoC/file, in order to improve maintainability.

Let me know what you think!

bpsoos and others added 6 commits June 29, 2024 00:19
* Fix test coverage

* Fix test coverage

* Update output.py

* Fix test coverage

* Fix coverage

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix coverage

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix coverage

* Fix coverage

* Fix coverage

* Fix coverage

* Fix coverage

* Fix coverage

* Fix coverage

* Fix coverage

* Fix coverage

* Fix coverage

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix coverage

* Fix coverage
Co-authored-by: Koudai Aono <koxudaxi@gmail.com>
@koxudaxi
Copy link
Owner

koxudaxi commented Jul 1, 2024

@bpsoos
Thanks for the great PR.
Sorry, the test coverage was broken, but I have fixed it.
The PR has quite a few conflicts. Can you please fix them?

@bpsoos
Copy link
Contributor Author

bpsoos commented Jul 1, 2024

@koxudaxi I think I have fixed all of the conflicts

@koxudaxi koxudaxi merged commit e4fa23a into koxudaxi:main Jul 4, 2024
91 of 92 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI options use-standard-collections and use-union-operator are not being applied for input file type graphql
3 participants