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

Status change on user action #73

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

Conversation

timsergeeff
Copy link
Contributor

App start status change

Now we have ability to change status on users starting app action.

1-ezgif com-video-to-gif-converter

Pause other tasks with WIP status

We can turn off pausing all other WIP tasks. This logic made of state: only one task can be WIP at a time.

2-ezgif com-video-to-gif-converter

Farm render status change

Previosly task was getting status change (WFA) only at publishing state in deadline so in between of publishing job to farm and publishing to kitsu we have nothing indicating current task status. Now we have FARM status change when farm rendering is on

3-ezgif com-video-to-gif-converter

Additional info

The settings allow to configure status change conditions so statuses will not double. And some other changes to settings needed to be done to make all logic work and ahve opportunity to swith in on or off
image

Testing notes:

  1. Add nessesary statuses to your kitsu production
  2. configure status changes in addon
  3. mark some statuses in kitsu as WIP (only for test)
  4. start other task
  5. see all other tasks now was PAUSED
  6. publish a job on farm
  7. see status change to FARM status

@timsergeeff timsergeeff changed the title Stsus change on user action Status change on user action Sep 6, 2024
@timsergeeff
Copy link
Contributor Author

timsergeeff commented Sep 6, 2024

I have doubts about code style and some decisions i've made to make it work, bot it works now help me please to make code and logic pretty please) Hope you like it!

@MustafaJafar MustafaJafar added type: enhancement Improvement of existing functionality or minor addition community Issues and PRs coming from the community members labels Sep 9, 2024
@MustafaJafar
Copy link
Contributor

could you create an issue for your enhancement request/suggestion and link it to this PR ?
https://github.com/ynput/ayon-kitsu/issues/new/choose

Copy link
Contributor

@MustafaJafar MustafaJafar left a comment

Choose a reason for hiding this comment

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

I didn't test run the PR yet.
I'd recommend adding settings in multiple places. so that we have them near to each other so that we know that these settings belongs to the same feature.

client/ayon_kitsu/hooks/pre_status_cahnge.py Outdated Show resolved Hide resolved
client/ayon_kitsu/hooks/pre_status_cahnge.py Outdated Show resolved Hide resolved
client/ayon_kitsu/version.py Outdated Show resolved Hide resolved
package.py Outdated Show resolved Hide resolved
Copy link
Contributor

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

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

@timsergeeff could you please install a linter for your IDE that matches the code style of the repo, mostly PEP08. There's a lot of invalid blank lines.

Also, a spell-checker may also help since the log messages contain typos.

client/ayon_kitsu/hooks/pre_status_cahnge.py Outdated Show resolved Hide resolved
client/ayon_kitsu/hooks/pre_status_cahnge.py Outdated Show resolved Hide resolved
client/ayon_kitsu/hooks/pre_status_cahnge.py Outdated Show resolved Hide resolved
client/ayon_kitsu/hooks/pre_status_cahnge.py Outdated Show resolved Hide resolved
client/ayon_kitsu/hooks/pre_status_cahnge.py Outdated Show resolved Hide resolved
client/ayon_kitsu/plugins/publish/integrate_kitsu_note.py Outdated Show resolved Hide resolved
client/ayon_kitsu/plugins/publish/integrate_kitsu_note.py Outdated Show resolved Hide resolved
server/settings/app_start.py Outdated Show resolved Hide resolved
server/settings/app_start.py Outdated Show resolved Hide resolved
server/settings/publish_plugins.py Outdated Show resolved Hide resolved
timsergeeff and others added 15 commits September 9, 2024 15:57
Co-authored-by: Mustafa Jafar <[email protected]>
server/settings/app_start.py Outdated Show resolved Hide resolved
@timsergeeff
Copy link
Contributor Author

@MustafaJafar i think i cant connect pr with issue because of rules of repo

@BigRoy BigRoy linked an issue Sep 9, 2024 that may be closed by this pull request
2 tasks
@dee-ynput
Copy link

Hello there.

First, many thanks @timsergeeff for sharing your work 🙏😍 !!!

I like the goal of it, and it aligns with some of the ability we want to offer in AYON.
But... 😬
We wouldn't have it dedicated to Kitsu.
If we were to adopt this behavior, it whould need to be available for all prodution tracker servives we support.

To achieve this, the implementation should only deal with AYON statuses, and the propagation to Kitsu and other production trackers should be handled transparently by their synchronisation addons.

There is very little chance we will merge this. But I'm pretty sure we can find a way to leverage your work and turn it into a contribution.

What about transfering this to a dedicated addon of yours, which would affect AYON statuses instead of kitsu. And we'd take care of the synchronisation between AYON and kitsu, updating ayon-kitsu as needed.
Would that be something you'd be interested in?

FYI, there are similar explorations going on from FTrack users, and we definitely will have something similar in AYON (and it's amazing to see the concept live before we do it <3)
Whether or not it can be a community contribution is yet unknown.

Comment on lines +80 to +82
if not gazu.task.get_task_status_by_short_name(self.app_start_status_shortname):
self.log.info("Failed to recieve kitsu status instance for shortname. Skipping Status change.")
return
Copy link
Contributor

Choose a reason for hiding this comment

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

A “line too long” happens when the number of the characters per line exceeds the maximum number specified in repo.

line-length = 79

personally, I prefer to have some display in my IDE to tell me the number of characters in my line.
image

Fixes are mostly like

Suggested change
if not gazu.task.get_task_status_by_short_name(self.app_start_status_shortname):
self.log.info("Failed to recieve kitsu status instance for shortname. Skipping Status change.")
return
if not gazu.task.get_task_status_by_short_name(
self.app_start_status_shortname
):
self.log.info(
"Failed to recieve kitsu status instance for shortname."
" Skipping Status change."
)
return

Copy link
Contributor

Choose a reason for hiding this comment

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

Also even better - if you setup strict linter rules in an IDE (code editor) you can have it auto-correct the formatting for you. That way you don't need to do this manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Issues and PRs coming from the community members type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Status change on user action
4 participants