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

Custom staging dir functionality migration #887

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

jakubjezek001
Copy link
Member

Changelog Description

The functionality of the staging directory has exceeded its original purpose of publishing. Considering its increased usage in the creation process, we need to migrate it to a dedicated module within the pipeline parent.

Additional info

Migrated development from ynput/OpenPype#5207

  • adding functionality to Creator base class
  • consistency of naming across all features
  • making sure backward compatibility to older names and locations remain in settings and api
  • anatomy templates with Staging Dir category

Testing notes:

  1. all should be working as it was before

- Added functions to handle custom staging directories
- Updated imports and removed deprecated code
- Created a new module for staging directory handling
…ging directories in the pipeline.

- Added import statement for 'os' in creator_plugins.py
- Implemented method 'apply_staging_dir' to apply staging directory with persistence to instance's transient data in creator_plugins.py
- Updated comments and added TODOs related to staging directories in various files
- Created a new plugin 'CollectManagedStagingDir' to manage staging directories in publish/lib.py
@ynbot
Copy link
Contributor

ynbot commented Sep 12, 2024

@ynbot ynbot added type: feature Adding something new and exciting to the product size/M labels Sep 12, 2024
@jakubjezek001 jakubjezek001 added the sponsored This is directly sponsored by a client or community member label Sep 12, 2024
- Renamed variables for better understanding and uniformity
- Improved readability by using more descriptive names
…g-dir-functions' into feature/AY-971_Use-custom-staging-dir-functions
prefix=kwargs.get("prefix"),
suffix=kwargs.get("suffix"),
),
"stagingDir_persistent": False,
Copy link
Member

Choose a reason for hiding this comment

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

Combination of camel case and snake case. I would rename to stagingDirPersistent or staging_dir_persistent.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is used across all hosts, and it would require separated PR for removing this. This had been inherited from previous implementation.

jakubjezek001 and others added 9 commits October 24, 2024 13:41
Imported the 'warnings' module for potential future usage in the codebase.
- Renamed function `get_staging_dir` to `get_staging_dir_info` for clarity.
- Updated variable names in multiple files to use `template_data` instead of `formatting_data`.
- Adjusted function parameters in the staging directory module for consistency and added new optional parameters.
- Improved logging by passing logger instances instead of creating new loggers within functions.
The code changes remove the unnecessary addition of roots to ctx_data in the get_staging_dir_info function.
- Updated return type in docstring
- Added a comment for clarity
- Removed unnecessary return statements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M sponsored This is directly sponsored by a client or community member type: feature Adding something new and exciting to the product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants