Skip to content

Add duplicate_dependencies strategy to move_to_file #238

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

Conversation

EdwardJXLi
Copy link
Contributor

Motivation

Content

Testing

Please check the following before marking your PR as ready for review

  • I have added tests for my changes
  • I have updated the documentation or added new documentation as needed

@EdwardJXLi EdwardJXLi changed the title Eli cg 10618 add duplicate dependencies strategy to move to file Add duplicate_dependencies strategy to move_to_file Jan 31, 2025
Copy link

codecov bot commented Jan 31, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
43 1 42 0
View the full list of 1 ❄️ flaky tests
tests.unit.codegen.sdk.code_generation.test_api_doc_generation test_mdx_api_doc_generation_sanity@codegen

Flake rate in main: 5.88% (Passed 32 times, Failed 2 times)

Stack Traces | 82.4s run time
codebase = <Codebase(name=codegen-sdk, language=PYTHON, path=/codegen-sdk)>

    @pytest.mark.timeout(120)
    @pytest.mark.xdist_group("codegen")
    def test_mdx_api_doc_generation_sanity(codebase) -> None:
>       docs_json = generate_docs_json(codebase, "HEAD")

.../sdk/code_generation/test_api_doc_generation.py:53: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../code_generation/doc_utils/generate_docs_json.py:156: in generate_docs_json
    method_doc = process_method(method, cls, cls_doc, seen_methods)
.../code_generation/doc_utils/generate_docs_json.py:84: in process_method
    return_type = replace_multiple_types(
.../code_generation/doc_utils/utils.py:337: in replace_multiple_types
    return process_parts(input_str)
.../code_generation/doc_utils/utils.py:320: in process_parts
    processed_bracket = process_parts(bracket_content)
.../code_generation/doc_utils/utils.py:324: in process_parts
    replacement = find_symbol(codebase=codebase, symbol_name=part, resolved_types=resolved_types, parent_class=parent_class, parent_symbol=parent_symbol, types_cache=types_cache)
.../code_generation/doc_utils/utils.py:224: in find_symbol
    cls_obj = safe_get_class(codebase, symbol_name)
.../code_generation/doc_utils/utils.py:188: in safe_get_class
    symbols = codebase.get_symbols(class_name)
.../sdk/core/codebase.py:599: in get_symbols
    return sort_editables(x for x in self.symbols if x.name == symbol_name)
.../sdk/core/codebase.py:325: in symbols
    return self._symbols()
.../sdk/core/codebase.py:218: in _symbols
    return [x for x in matches if x.is_top_level and (symbol_type is None or x.symbol_type == symbol_type)]
.../sdk/core/symbol.py:400: in is_top_level
    while not isinstance(parent, Symbol | Argument):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'codegen.sdk.core.detached_symbols.argument.Argument'>
instance = PyCodeBlock(source='"""Extracts a code block from its parent wrapper container by removing the wrapping\n        state...\n    Enables various types of queries and operations on...(truncated from 597 characters)., level=2, start_byte=19351)

>   ???
E   Failed: Timeout >120.0s

<frozen abc>:117: Failed

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@EdwardJXLi EdwardJXLi marked this pull request as ready for review February 4, 2025 20:01
@EdwardJXLi EdwardJXLi requested review from codegen-team and a team as code owners February 4, 2025 20:01
@EdwardJXLi EdwardJXLi requested review from caroljung-cg and removed request for a team February 4, 2025 20:02
Copy link
Contributor

@tawsifkamal tawsifkamal left a comment

Choose a reason for hiding this comment

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

lgtm

@EdwardJXLi EdwardJXLi merged commit 4294f86 into develop Feb 4, 2025
23 of 29 checks passed
@EdwardJXLi EdwardJXLi deleted the eli-cg-10618-add-duplicate_dependencies-strategy-to-move_to_file branch February 4, 2025 23:08
jayhack pushed a commit that referenced this pull request Feb 9, 2025
# Motivation
<!-- Why is this change necessary? -->

# Content
<!-- Please include a summary of the change -->
# Testing
<!-- How was the change tested? -->
# Please check the following before marking your PR as ready for review

- [ ] I have added tests for my changes
- [ ] I have updated the documentation or added new documentation as
needed
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.

2 participants