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

Using rez-search to list out or filter packages for specific keywords or attribute #101

Open
jmartin83 opened this issue May 3, 2020 · 6 comments

Comments

@jmartin83
Copy link

So using the following

rez-search --format='{KEYWORD}' rez_pkg
where :
KEYWORD is the string of text in the package you're looking for
rez_pkg is the actual name of the rez package .

Will return the actual value assigned to that string of text , be it a variable or a function

ex :
rez-search --format='{_environ}' base
will return
{'GITLAB_URI': 'https://gitlab.mycompany.co.jp', 'PROJECTS_PATH': '{this.projects_path}'}

however this only works per package .
Whereas rez-search b* , will return all packages names starting with the letter b .

combining both will return per package value ..
in that manner
rez-search -t variant --format='{timestamp} | {name} '

1565007418 | aftereffects
1565007423 | alita
1565007424 | alita
1565007424 | alita
etc..

Is there a direct way to filter out and list packages straight from rez-search with a specific attribute value , other than doing some iterative/matching workaround ?

@mottosso
Copy link
Owner

mottosso commented May 3, 2020

Hm, I'm not sure. You can have a look at how search works here, from the looks of it it isn't doing much fancy. Odds are you can either call those yourself from Python, or upgrade the command to support something like that.

As it's stricly Rez-related, I'd try dropping a query in that project as well. There isn't much that can be done to Allzpark to solve this.

@jmartin83
Copy link
Author

jmartin83 commented May 3, 2020

Thanks for the reply , yup i had a look into the search.py as well . Was just curious to see if i was missing anything as the behavior of the rez-search isn't that obviously described in the --help .

I agree that it's more rez related than allzpark , but as both are pretty strongly intertwined , i wondered if you had extended or already built in similar functions in allzpark somewhere .

I've just done a small wrapper for now of the shell command , seems to be doing the trick .
Basically allowing for arbitrary tagging of packages , to differentiate them easily ( profiles pkg vs tools pkg vs software pkg ).
As i'm not using ftrack or shotgun to retrieve a list of profiles / project and to avoid much hardcoding in the allzparkconfig.py (either as a python list of directory trolling ) , i thought that listing specific packages could be a bit more flexible . Leaving rez to deal with wherever the packages lives as well as having per user package ability .

@jmartin83
Copy link
Author

jmartin83 commented May 4, 2020

in the end it's always a question of scope and resources .

And i can see how the lines do blur a bit between project management , software launcher , package dependencies , controlled environment .
While trying to have a clean , iterative and safe development cycle .

@mottosso
Copy link
Owner

mottosso commented May 4, 2020

i wondered if you had extended or already built in similar functions in allzpark somewhere .

That's a good idea. There isn't anything like that right now, but ultimately I'd like Allzpark to wrap most of what Rez offers, and search is one important but almost entirely missing aspect of the Rez command-line interface. Would be interested to hear your ideas on how that could look like and work.

to avoid much hardcoding in the allzparkconfig.py

Keep in mind that it's a Python script, and that you could implement logic there to generate the list of profiles for you, rather than typing them out specifically.

@jmartin83
Copy link
Author

Keep in mind that it's a Python script, and that you could implement logic there to generate the list of profiles for you, rather than typing them out specifically.

Oh yeah that's exactly what i did .

Would be interested to hear your ideas on how that could look like and work.

Well i'm not quite sure myself yet , still playing around and seeing what the extend of allzpark is .
Considering that profiles , application versions , and tools are all rez packages , being able to differentiate / filter them to me seems essential . I think one of your demo profile had the attribute category = 'proj' , which is what i've been using as a reference .

But this depends on how you're seeing the scope of allzpark in the future , if you want to do profile creation / package management directly in it as well , providing with a friendly GUI , listing out available applications per category ( renderer , 2D packages , 3D packages , simulation , compositing , lookdev etc .. )

What i'm interested in at the moment is a clean , scalable and controlled development environment , with a focus on tool deployment and collaboration with other artists for vfx / game production .
Something that can be quickly installed on the user side without much fiddling around .
And so far allzpark ticks all the boxes , starting to step into the world of project management and pipeline .
Even though it's "just" a profile based software launcher with package dependencies / resolution and managed environment .

@mottosso
Copy link
Owner

mottosso commented May 8, 2020

if you want to do profile creation / package management directly in it as well

I've considered this, and I think there's room for that. Would it an additional feature of Allzpark, or an entirely separate project? I can't say for sure. The audience to Allzpark is firtst and foremost the artists, and they won't be creating packages. But creating packages is hard, and incredibly technical, so an interface is a good idea, and there's already features that mostly related to developers, like visualising dependencies and swapping versions of packages at run-time and such.

I'd be interested in your take on it. How do you see package creation work visually? Maybe a form of sorts, something to fill out?

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

No branches or pull requests

2 participants