Skip to content

Add unit tests#3

Merged
XZman merged 12 commits intomainfrom
add_unit_tests
Jan 30, 2026
Merged

Add unit tests#3
XZman merged 12 commits intomainfrom
add_unit_tests

Conversation

@XZman
Copy link
Collaborator

@XZman XZman commented Jan 30, 2026

Add unit tests (pytest), coverage test, python language linting, and CI workflow.

Copy link

Copilot AI left a comment

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 adds comprehensive unit testing infrastructure, including pytest configuration, code coverage tracking, linting with ruff and mypy, and CI/CD workflows via GitHub Actions. The changes include new test files for various components, test fixtures (JSON files), code refactoring to improve testability, and automation scripts.

Changes:

  • Added unit tests for frontend operators, utilities, and configuration classes
  • Configured pytest with coverage tracking and test discovery options
  • Integrated ruff and mypy for code quality and type checking
  • Set up GitHub Actions workflows for automated testing and linting

Reviewed changes

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

Show a summary per file
File Description
pyproject.toml Added dev dependencies (pytest-cov, ruff, mypy) and tool configurations
neusim/npusim/frontend/tests/test_operator.py New unit tests for Operator classes and CSV serialization
neusim/npusim/frontend/tests/test_frontend_util.py New tests for frontend utility functions
neusim/npusim/frontend/tests/assets/raw/* Test fixture JSON files for various models
neusim/npusim/backend/util.py Moved parse_input/output_tensor_shapes functions here
neusim/npusim/backend/tests/test_util.py Deleted old test file
neusim/npusim/backend/npusim_lib.py Updated to use moved utility functions
neusim/configs/tests/* New unit tests for configuration classes
neusim/configs/models/LLMConfig.py Fixed default value handling bug
lint.sh New shell script for running linting checks
.github/workflows/*.yml GitHub Actions workflows for CI/CD
README.md Added CI status badges

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

@XZman XZman merged commit 7eca3ff into main Jan 30, 2026
4 checks passed
@XZman XZman deleted the add_unit_tests branch January 30, 2026 02:33
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