Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

Type-hint rename_schema.py#847

Merged
obi1kenobi merged 23 commits into
masterfrom
schema_rename_suppress_types_type_hint_prework
Jun 22, 2020
Merged

Type-hint rename_schema.py#847
obi1kenobi merged 23 commits into
masterfrom
schema_rename_suppress_types_type_hint_prework

Conversation

@LWprogramming
Copy link
Copy Markdown
Collaborator

Step 1 as outlined in PR 834

Comment thread graphql_compiler/schema_transformation/rename_schema.py Outdated
Comment thread graphql_compiler/schema_transformation/rename_schema.py Outdated
Comment thread graphql_compiler/schema_transformation/rename_schema.py Outdated
Comment thread graphql_compiler/schema_transformation/rename_schema.py Outdated
Comment thread graphql_compiler/schema_transformation/rename_schema.py Outdated
Copy link
Copy Markdown
Contributor

@obi1kenobi obi1kenobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor typing nit, otherwise looks great!

Comment thread graphql_compiler/schema_transformation/rename_schema.py
Comment thread graphql_compiler/schema_transformation/rename_schema.py
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 22, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@c38b661). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #847   +/-   ##
=========================================
  Coverage          ?   94.76%           
=========================================
  Files             ?      108           
  Lines             ?     8398           
  Branches          ?        0           
=========================================
  Hits              ?     7958           
  Misses            ?      440           
  Partials          ?        0           
Impacted Files Coverage Δ
...ql_compiler/schema_transformation/rename_schema.py 100.00% <100.00%> (ø)
graphql_compiler/compiler/helpers.py 93.63% <0.00%> (ø)
..._compiler/schema_generation/sqlalchemy/__init__.py 66.66% <0.00%> (ø)
...r/compiler/workarounds/orientdb_eval_scheduling.py 61.90% <0.00%> (ø)
...ql_compiler/compiler/ir_lowering_match/__init__.py 100.00% <0.00%> (ø)
graphql_compiler/compiler/context_helpers.py 100.00% <0.00%> (ø)
graphql_compiler/macros/macro_edge/descriptor.py 100.00% <0.00%> (ø)
...raphql_compiler/query_formatting/sql_formatting.py 100.00% <0.00%> (ø)
graphql_compiler/api/sql/mssql.py 0.00% <0.00%> (ø)
graphql_compiler/macros/macro_expansion.py 93.44% <0.00%> (ø)
... and 99 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c38b661...eece08a. Read the comment docs.

Comment thread graphql_compiler/schema_transformation/rename_schema.py Outdated
@@ -186,36 +230,35 @@ class RenameSchemaTypesVisitor(Visitor):
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we specifically need this to be a class attribute here? If not, can we move it to module-level and make it sit right adjacent to the Union definition that it duplicates?

Copy link
Copy Markdown
Collaborator Author

@LWprogramming LWprogramming Jun 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's specifically used for RenameSchemaTypesVisitor, as it explicitly leaves out renaming the schema query type (i.e. SchemaQuery). RenameQueryTypeFieldsVisitor is the visitor that modifies the schema query type. Moving this class attribute to module-level could be confusing considering that we do actually modify the schema query type, just not in this particular class.

Comment thread graphql_compiler/schema_transformation/rename_schema.py Outdated
Comment thread graphql_compiler/schema_transformation/rename_schema.py
LWprogramming and others added 4 commits June 22, 2020 16:04
Co-authored-by: Predrag Gruevski <predrag@kensho.com>
Co-authored-by: Predrag Gruevski <predrag@kensho.com>
@obi1kenobi obi1kenobi merged commit 3cbc9d2 into master Jun 22, 2020
@obi1kenobi obi1kenobi deleted the schema_rename_suppress_types_type_hint_prework branch June 22, 2020 23:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants