Skip to content

SG-43456 [Part1] Add MEDM abstractions and utilities#137

Open
carlos-villavicencio-adsk wants to merge 5 commits into
masterfrom
ticket/SG-43456_migration_1
Open

SG-43456 [Part1] Add MEDM abstractions and utilities#137
carlos-villavicencio-adsk wants to merge 5 commits into
masterfrom
ticket/SG-43456_migration_1

Conversation

@carlos-villavicencio-adsk
Copy link
Copy Markdown
Contributor

@carlos-villavicencio-adsk carlos-villavicencio-adsk commented May 22, 2026

Base branch for tk-multi-loader2 v2.0.0

MEDM Abstractions

Classes to represent models and required utilities. We will consider moving them into a directory to improve code-organization

  • Entity model
  • Latest publish model
  • Publish History model
  • Shared cache
  • Thumbnail service
  • MEDM Utils

TODO

Nothing, this PR doesn't introduce breaking changes.

ℹ️ This should not affect or break the loader functionality.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

❌ Patch coverage is 0% with 764 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.48%. Comparing base (fe5e5b9) to head (138f40f).

Files with missing lines Patch % Lines
python/tk_multi_loader/medm/latestpublish_model.py 0.00% 264 Missing ⚠️
...ython/tk_multi_loader/medm/publishhistory_model.py 0.00% 175 Missing ⚠️
python/tk_multi_loader/medm/entity_model.py 0.00% 157 Missing ⚠️
python/tk_multi_loader/medm/thumbnail_service.py 0.00% 78 Missing ⚠️
python/tk_multi_loader/medm/utils.py 0.00% 63 Missing ⚠️
python/tk_multi_loader/medm/shared_cache.py 0.00% 20 Missing ⚠️
python/tk_multi_loader/medm/__init__.py 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #137      +/-   ##
==========================================
- Coverage   19.72%   15.48%   -4.24%     
==========================================
  Files          35       42       +7     
  Lines        2794     3558     +764     
==========================================
  Hits          551      551              
- Misses       2243     3007     +764     
Flag Coverage Δ
Linux 15.48% <0.00%> (-4.24%) ⬇️
Python-3.10 15.48% <0.00%> (-4.24%) ⬇️
Python-3.11 15.48% <0.00%> (-4.24%) ⬇️
Python-3.13 15.48% <0.00%> (-4.24%) ⬇️
Python-3.9 15.48% <0.00%> (-4.24%) ⬇️
Windows 15.48% <0.00%> (-4.24%) ⬇️
macOS 15.48% <0.00%> (-4.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@carlos-villavicencio-adsk carlos-villavicencio-adsk changed the title SG-43456 Add MEDM abstractions and utilities SG-43456 [Part1] Add MEDM abstractions and utilities May 26, 2026
Copy link
Copy Markdown

@chenm1adsk chenm1adsk left a comment

Choose a reason for hiding this comment

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

Left some small comments and other looks good to me.

Comment thread python/tk_multi_loader/medm/publishhistory_model.py
Comment thread python/tk_multi_loader/medm/publishhistory_model.py Outdated
"""Background-thread worker: resolve URL then download bytes."""
# 1. Resolve the thumbnail URL (hits the API at most once per revision).
url = self._url_cache.get(revision_id)
if url is None and revision_id not in self._url_cache:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this just equivalent to if revision_id not in self._url_cache?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I believe we're checking the url value as well because it can actually contain a cached value.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Isn't that url = self._url_cache.get(revision_id)? so if revision_id not in self._url_cache url is None?

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