Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Lib from illicit part 2 #700

Merged
merged 13 commits into from
Nov 12, 2020

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Nov 10, 2020

This PR should not affect PR: #697. But it may as change same files. In that case let me know please.

Changes

New file ffmpeg_utils.py - utilities for ffmpeg tools

- Personally don't like the name ffmpeg_utils but didn't came up with better. Contain only one function for ffprobe.

  • ffprobe_streams - get metadata from entered path

New file avalon_context.py - functions based on current context in avalon's Session (AVALON_PROJECT)

  • is_latest - check if representation is from latest version
  • any_outdated - checker of outdated loaded content
  • get_asset - get document of current asset by name in AVALON_ASSET
  • get_hierarchy - get hierarchy of current asset
  • get_linked_assets - get linked asset documents
  • get_latest_version - get latest version by entered arguments (asset name, subset name, etc.)
  • BuildWorkfile - logic for build workfile based on presets

Moved functions

- They're not created by me. Wanted to move them to avalon_context but their logic seems to be specific for their usage.

  • switch_item moved to fusion.lib used only in fusion host - !!! If possible test if it works, I don't have fusion to test it properly. !!!
  • get_subsets used only in celaction collector -> moved to the collector. Seems like the function does more then just "get subsets". Very uneffective way of getting documents from mongo.

@iLLiCiTiT iLLiCiTiT self-assigned this Nov 10, 2020
@iLLiCiTiT iLLiCiTiT requested a review from a team November 10, 2020 12:21
@mkolar
Copy link
Member

mkolar commented Nov 11, 2020

switch_item moved to fusion.lib used only in fusion host - !!! If possible test if it works, I don't have fusion to test it properly. !!!

yeah I saw that too, We need to test I agree.

get_subsets used only in celaction collector -> moved to the collector. Seems like the function does more than just "get subsets". Very ineffective way of getting documents from mongo.

Agreed that this should be moved to the collector. We could however kill two birds with one stone, and re-write for efficiency.

@mkolar mkolar requested a review from kalisp November 11, 2020 17:56
@mkolar mkolar added the backend label Nov 11, 2020
kalisp added a commit that referenced this pull request Nov 12, 2020
@kalisp kalisp merged commit 0353a83 into feature/664-3-0-lib-refactor Nov 12, 2020
@mkolar mkolar deleted the feature/lib_from_illicit_part_2 branch December 1, 2020 15:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants