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

WEB-1053 Create helpers for testing automate functions #339

Merged
merged 4 commits into from
Jun 6, 2024

Conversation

cdriesler
Copy link
Member

The process for testing a function in an automation has changed recently and we're updating the SDKs to reflect the new process.

  • Replaces old helpers
  • Updates relevant test fixtures (almost fully, they're still not runnable so there's some placeholder values)

I think special attention to the pydantic usage is a good idea. This works! But I don't have enough time with it to say this is the best or most python-y way to accomplish what it's trying to do.

@cdriesler cdriesler requested a review from gjedlicska June 5, 2024 15:50
Copy link

codecov bot commented Jun 5, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 9 lines in your changes missing coverage. Please review.

Project coverage is 87.76%. Comparing base (e6b822b) to head (c5b339d).

Current head c5b339d differs from pull request most recent head ede9591

Please upload reports for the commit ede9591 to get more accurate results.

Files Patch % Lines
src/speckle_automate/helpers.py 66.66% 6 Missing ⚠️
...ration/speckle_automate/test_automation_context.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #339      +/-   ##
==========================================
+ Coverage   87.58%   87.76%   +0.18%     
==========================================
  Files          95       95              
  Lines        5646     5648       +2     
==========================================
+ Hits         4945     4957      +12     
+ Misses        701      691      -10     

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

def get_test_automation_environment() -> TestAutomationEnvironment:
"""Get known environment variables from local `.env` file"""

return TestAutomationEnvironment().model_dump()
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should return the instance, not the json dump

@cdriesler cdriesler merged commit d6843b9 into main Jun 6, 2024
3 checks passed
@cdriesler cdriesler deleted the chuck/testAutomationHelpers branch June 6, 2024 11:03
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.

None yet

2 participants