ayon-core icon indicating copy to clipboard operation
ayon-core copied to clipboard

Add simple Create Project Structure web action

Open MustafaJafar opened this issue 9 months ago • 16 comments

Changelog Description

resolve #914 A simple Create Project Structure web action that creates the folder structure as defined in project settings: ayon+settings://core/project_folder_structure

image

image

Testing notes:

  1. Update (create and upload) core addon
  2. Test CLI action via, it should create folders as per settings.
ayon_console.exe  createprojectstructure --project <project_name>
  1. Run the web action action, it's found on any folder in the project on the web UI, it should create folders as per settings.

MustafaJafar avatar Mar 13 '25 13:03 MustafaJafar

Does this label looks clear? Personally, it confuses me. Could we rename it to something clear maybe Additional Project Structure ? image

MustafaJafar avatar Mar 13 '25 13:03 MustafaJafar

Nice! Probably good one for @LiborBatek or @m-u-r-p-h-y to test too?

BigRoy avatar Mar 13 '25 13:03 BigRoy

Having this available on every folder seems odd. It creates a false expectation that the folder you are running the action on will be created, not just project ones.

I think there is a better place for this on right mouse click on a project. image

would it be difficult to do?

m-u-r-p-h-y avatar Apr 02 '25 12:04 m-u-r-p-h-y

Having this available on every folder seems odd. It creates a false expectation that the folder you are running the action on will be created, not just project ones.

I think there is a better place for this on right mouse click on a project. image

would it be difficult to do?

I don't believe web actions currently allow that, right @martastain @Innders ?

BigRoy avatar Apr 02 '25 12:04 BigRoy

I don't believe web actions currently allow that, right @martastain @Innders ?

Not in Web UI. And if it would be added, it would be in next release of server, which would post-pone this PR again.

iLLiCiTiT avatar Apr 02 '25 13:04 iLLiCiTiT

We are definitely going to need to run actions in the context of just a project and maybe even with no context... Just run the action on a studio.

There was this idea of having a page where you could see all of your actions in one place. Maybe this is the place you can run any action.

If the action requires some context, you must provide it before it can run.

This could probably be an addon that's created.

Innders avatar Apr 02 '25 13:04 Innders

Having this available on every folder seems odd. It creates a false expectation that the folder you are running the action on will be created, not just project ones. I think there is a better place for this on right mouse click on a project. image would it be difficult to do?

I don't believe web actions currently allow that, right @martastain @Innders ?

Should we do it in a follow up PR?

MustafaJafar avatar Apr 07 '25 16:04 MustafaJafar

@iLLiCiTiT since I've added nxtools, poetry now requires to update the lock file. I'm not able to do becasue of an issue in my dev environment.

pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock` to fix the lock file.
!!! Poetry environment installation failed

MustafaJafar avatar Apr 07 '25 17:04 MustafaJafar

@iLLiCiTiT since I've added nxtools, poetry now requires to update the lock file. I'm not able to do becasue of an issue in my dev environment.

pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock` to fix the lock file.
!!! Poetry environment installation failed

You didn't have to add it :) . You can just remove it, or lock poetry (as suggested), or remove lock file (probably is not needed) and add the filename to gitignore.

iLLiCiTiT avatar Apr 07 '25 17:04 iLLiCiTiT

You didn't have to add it :) . You can just remove it, or lock poetry (as suggested), or remove lock file (probably is not needed) and add the filename to gitignore.

I fixed my issue and updated the poetry lock for consistency. If it isn't necessary, could we clean it up it a follow-up PR? Honestly, I don't want to touch something I don't know the effects of.

MustafaJafar avatar Apr 07 '25 17:04 MustafaJafar

The poetry file has gone now :D @iLLiCiTiT what should we do with this PR?

MustafaJafar avatar Apr 15 '25 17:04 MustafaJafar

Tagging @BigRoy and @philippe-ynput for visibilty. Any further comments before merge?

MustafaJafar avatar May 27 '25 09:05 MustafaJafar

And I'm not sure where else I'd find project level actions?

It is ongoing PR. Both AYON launcher and Web UI.

iLLiCiTiT avatar May 27 '25 09:05 iLLiCiTiT

It is ongoing PR. Both AYON launcher and Web UI.

So if I were to test this - what do I need? Currently in core, it doesn't show in either for me. :) If certain dependencies are needed, please state them in the testing notes of the PR description

BigRoy avatar May 27 '25 09:05 BigRoy

So if I were to test this - what do I need? Currently in core, it doesn't show in either for me. :)

I think you need to upload the package.

MustafaJafar avatar May 27 '25 09:05 MustafaJafar

I think you need to upload the package.

I've done so, and made it active in the production bundle. To be sure, I also restarted the server after making it active, because I couldn't find the action anywhere.

BigRoy avatar May 27 '25 09:05 BigRoy

Making another test run. Tagging @iLLiCiTiT

for server ≥1.9.1

  1. I can find the action in the overview page and it works nicely. image
  2. I can't find project action in the launcher UI.

for server < 1.9.1

  • I can't find the actions list in the overview page. didn't see any errors. image

MustafaJafar avatar Jun 25 '25 10:06 MustafaJafar