-
Notifications
You must be signed in to change notification settings - Fork 15
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
List/Load Projects #5
Conversation
This PR is all done as far as I know, and ready to be merged. |
I'm currently getting a validation warning on the schema, which I'm struggling to figure out why: (avalon-environment) C:\Users\admin\avalon-environment>avalon
avalon.py: Forwarding 'C:\Users\admin\avalon-environment\bin\miniconda\windows\envs\avalon-environment\python.exe -u -m launcher --root C:\Users\admin\avalon-environment\bin\avalon-setup\git\avalon-examples\projects'..
Using Python @ 'C:\Users\admin\avalon-environment\bin\miniconda\windows\envs\avalon-environment\python.exe'
Using PyQt5 @ 'C:\Users\admin\avalon-environment\bin\miniconda\windows\envs\avalon-environment\lib\site-packages\PyQt5'
Using core @ 'C:\Users\admin\avalon-environment\bin\avalon-setup\git\avalon-core'
Using launcher @ 'C:\Users\admin\avalon-environment\bin\avalon-setup\git\avalon-launcher'
Using root @ 'C:\Users\admin\avalon-environment\bin\avalon-setup\git\avalon-examples\projects'
Using config: 'polly'
Starting avalon-launcher
WARNING:avalon.io:'AVALON_PROJECT' is a required property
Failed validating 'required' in schema:
{'$schema': 'http://json-schema.org/schema#',
'additionalProperties': True,
'description': 'The Avalon environment',
'properties': {'AVALON_APP': {'description': 'Name of application',
'example': 'maya2016',
'pattern': '^\\w*$',
'type': 'string'},
'AVALON_ASSET': {'description': 'Name of asset',
'example': 'Bruce',
'pattern': '^\\w*$',
'type': 'string'},
'AVALON_CONFIG': {'description': 'Name of Avalon '
'configuration',
'example': 'polly',
'pattern': '^\\w*$',
'type': 'string'},
'AVALON_CONTAINER_ID': {'default': 'avalon.container',
'description': 'Unique '
'identifier for '
'a loaded '
'representation '
'in a working '
'file',
'example': 'avalon.container',
'pattern': '^[\\w.]*$',
'type': 'string'},
'AVALON_DB': {'default': 'avalon',
'description': 'Name of database',
'example': 'avalon',
'pattern': '^\\w*$',
'type': 'string'},
'AVALON_DEADLINE': {'default': None,
'description': 'Address to '
'Deadline',
'example': 'http://192.168.99.101',
'pattern': '^http[\\w/@:.]*$',
'type': 'string'},
'AVALON_DEBUG': {'default': None,
'description': 'Enable debugging '
'mode. Some '
'applications may use '
'this for e.g. '
'extended verbosity or '
'mock plug-ins.',
'example': 'True',
'type': 'string'},
'AVALON_INSTANCE_ID': {'default': 'avalon.instance',
'description': 'Unique '
'identifier for '
'instances in a '
'working file',
'example': 'avalon.instance',
'pattern': '^[\\w.]*$',
'type': 'string'},
'AVALON_LABEL': {'default': 'Avalon',
'description': 'Nice name of Avalon, '
'used in e.g. '
'graphical user '
'interfaces',
'example': 'Mindbender',
'type': 'string'},
'AVALON_MONGO': {'default': 'mongodb://localhost:27017',
'description': 'Address to the asset '
'database',
'example': 'mongodb://localhost:27017',
'pattern': '^mongodb://[\\w/@:.]*$',
'type': 'string'},
'AVALON_PASSWORD': {'default': 'secret',
'description': 'Generic password',
'example': 'abc123',
'pattern': '^\\w*$',
'type': 'string'},
'AVALON_PROJECT': {'description': 'Name of project',
'example': 'Hulk',
'pattern': '^\\w*$',
'type': 'string'},
'AVALON_PROJECTS': {'description': 'Absolute path to '
'root of project '
'directories',
'example': '/nas/projects',
'type': 'string'},
'AVALON_SENTRY': {'default': None,
'description': 'Address to Sentry',
'example': 'https://5b872b280de742919b115bdc8da076a5:[email protected]/2',
'pattern': '^http[\\w/@:.]*$',
'type': 'string'},
'AVALON_SILO': {'description': 'Name of asset group or '
'container',
'example': 'assets',
'pattern': '^\\w*$',
'type': 'string'},
'AVALON_TASK': {'description': 'Name of task',
'example': 'modeling',
'pattern': '^\\w*$',
'type': 'string'},
'AVALON_TIMEOUT': {'default': '1000',
'description': 'Wherever there is a '
'need for a timeout, '
'this is the default '
'value.',
'example': '1000',
'pattern': '^[0-9]*$',
'type': 'string'},
'AVALON_UPLOAD': {'default': None,
'description': 'Boolean of whether '
'to upload published '
'material to central '
'asset repository',
'example': 'True',
'type': 'string'},
'AVALON_USERNAME': {'default': 'avalon',
'description': 'Generic username',
'example': 'myself',
'pattern': '^\\w*$',
'type': 'string'}},
'required': ['AVALON_PROJECTS',
'AVALON_PROJECT',
'AVALON_ASSET',
'AVALON_SILO',
'AVALON_CONFIG'],
'title': 'avalon-core:session-1.0',
'type': 'object'}
On instance:
{'AVALON_CONFIG': 'polly',
'AVALON_CONTAINER_ID': 'avalon.container',
'AVALON_DB': 'avalon',
'AVALON_DEBUG': 'True',
'AVALON_INSTANCE_ID': 'avalon.instance',
'AVALON_LABEL': 'Avalon',
'AVALON_LOCATION': 'http://127.0.0.1',
'AVALON_MONGO': 'mongodb://localhost:27017',
'AVALON_PASSWORD': 'secret',
'AVALON_PROJECTS': 'C:\\Users\\admin\\avalon-environment\\bin\\avalon-setup\\git\\avalon-examples\\projects',
'AVALON_TIMEOUT': '1000',
'AVALON_USERNAME': 'avalon',
'schema': 'avalon-core:session-1.0'}
initialising..
ready
Success
avalon.py: Finishing up.. |
Yeah, those validation messages can get quite long. The key is here:
|
Yeah, I can see that for some reason the |
My guess is that it's happening here. |
That validation is new for avalon-setup. Avalon-setup uses this io.py: https://github.com/getavalon/core/blob/ce9de34794f05359000f4c452ce47b278b56af80/avalon/io.py, in the last version. It seems because I'm upgrading avalon-core, that I suddenly see this validation warning without having dealt with the Can I ignore this? Also its not just
It seems odd to have to specify these variables when I dont have any projects in the database. |
Yeah, can ignore. Need to find a better way to handle these variables missing. It's a warnings at the moment, because there's a transition being made from environment to this Session object. The goal is being able to rely on what variables are available at run-time, but this is obviously a different case to e.g. launching Maya from an existing project. Happy to solve one problem at a time. |
How do we feel about this PR then? It'll introduce this warning, but will implement #4 . |
Hm, I can't reproduce this. $ git clone https://github.com/tokejepsen/setup.git --recursive
$ setup\avalon.bat
Using Python @ 'C:\python36\python.exe'
Using PyQt5 @ 'C:\python36\lib\site-packages\PyQt5'
Using core @ 'C:\Users\marcus\github\setup\git\avalon-core'
Using launcher @ 'C:\Users\marcus\github\setup\git\avalon-launcher'
Using root @ 'C:\Users\marcus\github\setup\git\avalon-examples\projects'
Using config: 'polly'
Starting avalon-launcher
initialising..
ready
Success |
You don't seem to check out the "#4" branch? |
Ahh sorry, it's on a branch. Looking now. |
Checking it out gets me this commit which does contain the io.py referenced above, and removing the validation does clear the error. So the "problem" is that you're updated avalon-core in your avalon-setup fork. The original avalon-core of avalon-setup is quite old (and stable) you can find it here (hash It's a little risky to update, so before merging this it would be good if you could take it through the ropes; launch, create, publish and load. If all is OK, then it may be safe to consider it stable, though ideally I'd like it in production first. Another option is for your Another option is to make a new |
I would certainly like to take it through the ropes, but I'm also trying to document and solve issues as I go along, so I have as newbie eyes as possible.
How about maybe a "dev" branch on this repository? It would hold the bleeding edge until tested to satisfaction. The only concern would be the amount of changes to document when merging the "dev" branch. |
Ah, yes a branch is a good idea. Let's try that! |
Are you able to make a "development" branch? Should we document the changes that are different from the "master" branch somehow? |
Created.
I think it's fairly self-explanatory. Especially if we let master remain the default branch. |
Have updated to merge into "development" branch. |
This PR adds the flag "ls" for listing available projects in the database:
It also forwards CLI commands for
avalon --load
correctly, so you can load projects by name:avalon --load myProject
.This is related to #4