Skip to content

🧪 Improve texture ingestion tests#61

Open
skurtyyskirts wants to merge 1 commit into
mainfrom
tests/ingest-texture-coverage-961368186393042931
Open

🧪 Improve texture ingestion tests#61
skurtyyskirts wants to merge 1 commit into
mainfrom
tests/ingest-texture-coverage-961368186393042931

Conversation

@skurtyyskirts

Copy link
Copy Markdown
Owner

🎯 What: Missing tests for texture ingestion via RemixAPIClient, and implemented a fix for invalid argument errors (if not texture_file_path or not pbr_type block was missing in ingest_texture).
📊 Coverage:

  • Tested invalid arguments to ingest_texture
  • Tested API request fails and properly propagates errors
  • Tested file missing before and after ingestion
  • Tested parsing paths with expected PBR suffixes
  • Tested fallback path extraction for suffixes
    Result: ingest_texture function logic is fully tested, adding critical validation to the tests/test_remix_api.py unit testing suite, resulting in higher confidence during refactors and deployments.

PR created automatically by Jules for task 961368186393042931 started by @skurtyyskirts

…e ingestion via RemixAPIClient and invalid_arguments error block\n📊 Coverage: Tested API request fails, file missing after success, and expected/fallback suffixes\n✨ Result: ingest_texture function is now fully covered with unit tests

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI review requested due to automatic review settings May 3, 2026 04:20
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR expands the RemixAPIClient.ingest_texture() unit tests and adds an early invalid-argument check in remix_api.py. It fits into the codebase by strengthening the Remix API integration layer and improving confidence in the texture push/ingestion workflow that core.py depends on.

Changes:

  • Add new ingest_texture() tests covering invalid args, request failures, output-path parsing, and missing output files.
  • Update the test-side mocked requests exceptions so retry handling matches production behavior.
  • Add an early guard in RemixAPIClient.ingest_texture() for missing pbr_type / texture_file_path.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
tests/test_remix_api.py Adds texture-ingestion test coverage and adjusts the mocked requests exception hierarchy.
remix_api.py Adds early argument validation to ingest_texture().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread remix_api.py

def ingest_texture(self, pbr_type, texture_file_path, project_output_dir_abs):

if not texture_file_path or not pbr_type:
Comment thread remix_api.py
def ingest_texture(self, pbr_type, texture_file_path, project_output_dir_abs):

if not texture_file_path or not pbr_type:
return False, "Invalid arguments to ingest_texture"
Comment thread tests/test_remix_api.py
Comment on lines +224 to +226
self.assertIsNotNone(res)
self.assertIsNone(err)
self.assertTrue(res.endswith("test.a.rtex.dds"))
Comment thread tests/test_remix_api.py
Comment on lines +257 to +259
self.assertIsNotNone(res)
self.assertIsNone(err)
self.assertTrue(res.endswith("test.x.rtex.dds"))

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread remix_api.py
Comment on lines 353 to 360
def ingest_texture(self, pbr_type, texture_file_path, project_output_dir_abs):

if not texture_file_path or not pbr_type:
return False, "Invalid arguments to ingest_texture"

self._log_info(f"Ingesting {pbr_type}: {self.safe_basename(texture_file_path)}")

if not os.path.isfile(texture_file_path):
Comment thread tests/test_remix_api.py
Comment on lines +170 to +173
ok, err = client.ingest_texture(None, "", "/out")
self.assertFalse(ok)
self.assertEqual(err, "Invalid arguments to ingest_texture")

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

Successfully merging this pull request may close these issues.

2 participants