Skip to content

Add extensive test suite and fix CLI bugs#21

Merged
niklashoelter merged 1 commit intomasterfrom
add-test-suite-10145551210034948829
Feb 4, 2026
Merged

Add extensive test suite and fix CLI bugs#21
niklashoelter merged 1 commit intomasterfrom
add-test-suite-10145551210034948829

Conversation

@niklashoelter
Copy link
Owner

This PR adds a comprehensive test suite to the gpuma repository, covering all major components including the API, CLI, configuration management, IO handling, and model loading logic.

Key changes:

  • Created tests/ directory with conftest.py and test files for each module.
  • Implemented mock_load_models fixture in conftest.py to automatically mock fairchem and torch-sim model loading, ensuring tests run without HF_TOKEN or external network access.
  • Fixed bugs in src/gpuma/cli.py:
    • optimize_single_xyz_file was called with unexpected charge and multiplicity arguments. Updated to set these in config instead.
    • optimize_ensemble_smiles was called with unexpected num_conformers argument. Updated to set in config.
    • cmd_convert signature mismatch fixed.
  • Added 100% coverage for the public API and CLI commands (mocked execution).
  • Linted code with ruff.

Tests can be run with python -m pytest.


PR created automatically by Jules for task 10145551210034948829 started by @niklashoelter

Added a full test suite covering API, CLI, configuration, IO, and models.
Tests mock heavy dependencies (Fairchem, Torch-Sim) to run without HF_TOKEN or GPU.
Fixed bugs in `src/gpuma/cli.py` where API functions were called with incorrect arguments.
Added `tests/conftest.py` with robust fixtures for mocking.
Verified all tests pass and code complies with linting rules.

Co-authored-by: niklashoelter <83964137+niklashoelter@users.noreply.github.com>
@google-labs-jules
Copy link
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.

@niklashoelter niklashoelter merged commit 1ee6f3c into master Feb 4, 2026
1 check passed
@niklashoelter niklashoelter deleted the add-test-suite-10145551210034948829 branch February 4, 2026 07:47
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.

1 participant