fix: properly fill out allowed values for camera job parameter #103
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was the problem/requirement? (What/Why)
If you select a specific camera, the job would fail to create:
and if you exported the job bundle, you'd end up with:
So something is turning the renderable cameras into a set instead of a list.
I was actually able to reproduce this just by type hinting the
_get_job_template
function and runninghatch run lint
Problem 2
Also looks like the job bundle tests are now breaking on my machine since the populated value for including the
RenderSetupIncludeLights
is being set to False in all the job bundles. This appears to be a machine level setting which isn't all that nice since it'll break for users depending if they have a different set-up. Need to make it consistent for all users so that tests are repeatableWhat was the solution? (How)
I added some type hints, and cleaned up how we were handling
all_layer_selectable_cameras
which fixed the issue.For the second issue I added a context manager to set machine level options on test start, and re-apply the old settings when they finish (regardless of success/fail)
What is the impact of this change?
Users can now select a camera to submit a job!
How was this change tested?
the linting now passed. I then ran
hatch run install
from a WIP branch and verified that I could submit jobs by selecting a camera.Did you run the "Job Bundle Output Tests"? If not, why not? If so, paste the test results here.
Was this change documented?
N/A
Is this a breaking change?
fixing :)