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

test: add deployer tests for method with api request #112

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

julesbertrand
Copy link
Collaborator

@julesbertrand julesbertrand commented Nov 24, 2023

Description

Related Issue

Type of Change

  • 🚀 New feature (non-breaking change which adds functionality)
  • 🔧 Bug fix (non-breaking change which fixes an issue)
  • 🥂 Improvement (non-breaking change which improves an existing feature)
  • 🔐 Security fix
  • 📚 Examples / docs / tutorials / dependencies update
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I've read the CONTRIBUTING.md guide.
  • I've updated the code style using make format-code.
  • I've written tests for all new methods and classes that I created.
  • I've written the docstring in Google format for all the methods and classes that I used.
  • If my change requires a change to docs, I have updated the documentation accordingly.

Copy link

github-actions bot commented Nov 24, 2023

PR Analysis

(review updated until commit f00e626)

  • 🎯 Main theme: Adding tests and updating configuration for Vertex Deployer
  • 📝 PR summary: This PR focuses on adding new tests for the Vertex Deployer, specifically for methods with API requests. It also includes updates to the configuration and renaming of certain fixtures and methods for clarity.
  • 📌 Type of PR: Tests
  • 🧪 Relevant tests added: Yes
  • ⏱️ Estimated effort to review [1-5]: 3, because the PR includes a significant amount of new test code and changes to existing code, which requires a thorough review to ensure that the tests are comprehensive and the changes are appropriate.
  • 🔒 Security concerns: No security concerns found

PR Feedback

  • 💡 General suggestions: The PR is well-structured and includes a good amount of tests, which is a positive aspect. However, it would be beneficial to ensure that the tests cover all edge cases and potential error scenarios. Additionally, it would be helpful to include comments in the code to explain the purpose and functionality of complex or non-obvious code sections.

  • 🤖 Code feedback:

    • relevant file: tests/integration_tests/test_configuration.py
      suggestion: Consider using a library like deepdiff for comparing dictionaries. It can provide more detailed output and handle more complex scenarios. [medium]
      relevant line: def compare_dicts(d1, d2):

    • relevant file: tests/unit_tests/test_pipeline_deployer.py
      suggestion: It's recommended to use more descriptive variable names instead of 'd1' and 'd2'. This can improve code readability. [medium]
      relevant line: def compare_dicts(d1, d2):

    • relevant file: deployer/configuration.py
      suggestion: It seems like the class 'DeployerConfig' is defined twice. If these are meant to be two different classes, they should have different names. If they are the same, the duplicate should be removed. [important]
      relevant line: class DeployerConfig(CustomBaseModel):

    • relevant file: tests/unit_tests/test_pipeline_deployer.py
      suggestion: Consider using pytest's tmpdir fixture for creating temporary directories and files. It's a more concise and pytest idiomatic way. [medium]
      relevant line: def test_create_pipeline_job_with_all_parameters(self, test_pipeline_fixture, tmp_path):

How to use

Instructions

To invoke the PR-Agent, add a comment using one of the following commands:
/review: Request a review of your Pull Request.
/describe: Update the PR title and description based on the contents of the PR.
/improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
/ask <QUESTION>: Ask a question about the PR.
/update_changelog: Update the changelog based on the PR's contents.
/add_docs: Generate docstring for new components introduced in the PR.
/generate_labels: Generate labels for the PR based on the PR's contents.
see the tools guide for more details.

To edit any configuration parameter from the configuration.toml, add --config_path=new_value.
For example: /review --pr_reviewer.extra_instructions="focus on the file: ..."
To list the possible configuration parameters, add a /config comment.

@julesbertrand
Copy link
Collaborator Author

/review

Copy link

Persistent review updated to latest commit f00e626

@julesbertrand
Copy link
Collaborator Author

/review -i

@julesbertrand julesbertrand force-pushed the test/add-google-wrappers-and-config-tests branch from f7d8a0a to e5004bb Compare January 2, 2024 09:54
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.

Test VertexPipelineDeployer with mocks for commands making google api requests
1 participant