Skip to content

enhancement(AutomationCOntext): add workspace ID support - #491

Open
jsdbroughton wants to merge 6 commits into
mainfrom
jonathon/automate_run_workspace_aware
Open

enhancement(AutomationCOntext): add workspace ID support#491
jsdbroughton wants to merge 6 commits into
mainfrom
jonathon/automate_run_workspace_aware

Conversation

@jsdbroughton

Copy link
Copy Markdown
Contributor

Description & motivation

Enhances the automation context by introducing workspace ID support. The changes facilitate improved identification and management of workspaces associated with automation runs.

Changes:

  • Adds a workspace_id property to the AutomationContext class.
  • Implements logic to resolve workspace ID using run data or project lookup fallback.
  • Updates the AutomationRunData and TestAutomationRunData models to include workspace ID with optional typing.
  • Updates fixtures to handle workspace ID in test automation runs.

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

@netlify

netlify Bot commented Apr 7, 2026

Copy link
Copy Markdown

Deploy Preview for specklepy ready!

Name Link
🔨 Latest commit 7a4700b
🔍 Latest deploy log https://app.netlify.com/projects/specklepy/deploys/6a00ac678f0b410009429e3f
😎 Deploy Preview https://deploy-preview-491--specklepy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jsdbroughton jsdbroughton changed the title Adds workspace ID support to automation context enhancement(AutomationCOntext): add workspace ID support Apr 7, 2026
@codecov

codecov Bot commented May 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 26.08696% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.66%. Comparing base (ceab6f9) to head (7a4700b).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
src/speckle_automate/automation_context.py 15.00% 17 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #491      +/-   ##
==========================================
- Coverage   91.88%   91.66%   -0.22%     
==========================================
  Files         154      154              
  Lines        7069     7091      +22     
==========================================
+ Hits         6495     6500       +5     
- Misses        574      591      +17     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

return self.automation_run_data.workspace_id

def resolve_workspace_id(self) -> Optional[str]:
"""Return workspace id from run data or project lookup fallback."""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

When would the fallback be required?

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