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

fix(python): handle non union self referencing schema dependencies #4604

Merged
merged 15 commits into from
Sep 10, 2024

Conversation

armandobelardo
Copy link
Contributor

@armandobelardo armandobelardo commented Sep 10, 2024

This PR introduces a number of changes to the codebase, including:

  • The addition of a new version, 4.0.0-rc5, with an irVersion of 53 and a changelogEntry of fix.
  • The introduction of a new function, get_non_union_types_with_self_referencing_dependencies, which returns a set of type IDs for non-union types with self-referencing dependencies.
  • The modification of the TestCaseWithExpectedResult class to use a string type for the test_case field, and the addition of a new field, expected_result, of type VariableValue.
  • The addition of a new class, TestCaseResultWithStdout, which has a result field of type TestCaseResult and a stdout field of type str.
  • The modification of the TraceResponseclass to use a string type for thestack` field.
  • The introduction of a new function, update_forward_refs, which updates forward references for a given class.

Changes

  • The generators/python/sdk/versions.yml file has been updated to include a new version, 4.0.0-rc5, with an irVersion of 53 and a changelogEntry of fix.
  • The generators/python/src/fern_python/generators/context/pydantic_generator_context_impl.py file has been modified to include a new function, get_non_union_types_with_self_referencing_dependencies, which returns a set of type IDs for non-union types with self-referencing dependencies.
  • The generators/python/src/fern_python/generators/pydantic_model/fern_aware_pydantic_model.py file has been updated to use the new get_non_union_types_with_self_referencing_dependencies function in the is_referencing_circular_reference check.
  • The seed/python-sdk/trace/src/seed/commons/types/test_case_with_expected_result.py file has been modified to use a string type for the test_case field in the TestCaseWithExpectedResult class, and to add a new field, expected_result, of type VariableValue.
  • The seed/python-sdk/trace/src/seed/problem/types/create_problem_request.py file has been updated to use a string type for the problem_description field in the CreateProblemRequest class, and to add a new field, input_params, of type typing.List["VariableTypeAndName"].
  • The seed/python-sdk/trace/src/seed/problem/types/problem_info.py file has been modified to use a string type for the problem_description field in the ProblemInfo class, and to add a new field, input_params, of type typing.List["VariableTypeAndName"].
  • The seed/python-sdk/trace/src/seed/submission/types/code_execution_update.py file has been updated to use a string type for the test_cases field in the CodeExecutionUpdate_Graded class.
  • The seed/python-sdk/trace/src/seed/submission/types/graded_response.py file has been modified to use a string type for the test_cases field in the GradedResponse class.
  • The seed/python-sdk/trace/src/seed/submission/types/stack_frame.py file has been updated to use a string type for the scopes field in the StackFrame class.
  • The seed/python-sdk/trace/src/seed/submission/types/stack_information.py file has been modified to use a string type for the top_stack_frame field in the StackInformation class.
  • The seed/python-sdk/trace/src/seed/submission/types/submission_status_for_test_case.py file has been updated to use a string type for the result field in the SubmissionStatusForTestCase_Graded class, and to add a new field, value, of type TestCaseGrade.
  • The seed/python-sdk/trace/src/seed/submission/types/submission_type_state.py file has been modified to use a string type for the default_test_cases and custom_test_cases fields in the SubmissionTypeState_Test class.
  • The seed/python-sdk/trace/src/seed/submission/types/test_case_result_with_stdout.py file has been updated to use a string type for the result field in the TestCaseResultWithStdout class.
  • The seed/python-sdk/trace/src/seed/submission/types/test_submission_state.py file has been modified to use a string type for the default_test_cases and custom_test_cases fields in the TestSubmissionState class.
  • The seed/python-sdk/trace/src/seed/submission/types/test_submission_status_v_2.py file has been updated to use a string type for the problem_info field in the TestSubmissionStatusV2 class.
  • The seed/python-sdk/trace/src/seed/submission/types/trace_response.py file has been modified to use a string type for the stack field in the TraceResponse class.
  • The seed/python-sdk/trace/src/seed/submission/types/trace_response_v_2.py file has been updated to use a string type for the stack field in the TraceResponseV2 class.
  • The seed/python-sdk/trace/src/seed/submission/types/trace_responses_page.py file has been modified to use a string type for the trace_responses field in the TraceResponsesPage class.
  • The seed/python-sdk/trace/src/seed/submission/types/trace_responses_page_v_2.py file has been updated to use a string type for the trace_responses field in the TraceResponsesPageV2 class.
  • The <co: 20>seed/python-sdk/trace/src/seed/submission/types/traced_test_case.py file has been modified to use a string type for the result field in the TracedTestCase class.</co: 2

@armandobelardo armandobelardo changed the title fix(python): handle non union self referencing schemas fix(python): handle non union self referencing schema dependencies Sep 10, 2024
Copy link

gitguardian bot commented Sep 10, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
13738502 Triggered Generic High Entropy Secret c09e77f generators/java/sdk/versions.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@dsinghvi dsinghvi merged commit 522262f into main Sep 10, 2024
22 of 23 checks passed
@dsinghvi dsinghvi deleted the ab/cycle-time branch September 10, 2024 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants