-
Notifications
You must be signed in to change notification settings - Fork 235
[cueman] Add comprehensive test infrastructure and update documentation for Cueman #1954
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
[cueman] Add comprehensive test infrastructure and update documentation for Cueman #1954
Conversation
|
@ramonfigueiredo Could you please suggest what changes are needed to resolve these check failures? I think I might be missing something. |
Hi @Aniketsy, the lint issues are straightforward: Remove trailing spaces on lines 10 and 22. Add a module docstring at the top of tests/test_integration_workflows.py. Change the import to from cueman import main. For the test failures: the CLI is raising SystemExit because of argparse and a protobuf request is built incorrectly (JobGetLayersRequest needs keyword args/dict). You’ll need to fix the request init and/or mock the job-layers call in your tests so the CLI doesn’t exit with error codes. |
…on for cueman - Fix pylint issues in `test_integration_workflows.py` * Add module docstring and fix import style * Remove trailing whitespace and add proper spacing * Achieve 10/10 pylint rating - Fix SystemExit test failures in integration tests: * Update test_batch_operation_workflow to use comma-separated job format * Mock displayLayers function properly in workflow tests * Remove incorrect SystemExit expectations where not applicable * All tests now pass successfully - Add pytest and test dependencies to pyproject.toml: * Add test optional dependencies: pytest, pytest-cov, pytest-mock, mock, pyfakefs * Add dev optional dependencies including pylint, black, isort * Configure pytest.ini_options with test discovery and execution settings * Add coverage configuration with HTML/XML report generation * Include test markers for unit, integration, and slow tests - Create test infrastructure tools: * Add `run_tests.sh` convenience script for running tests with coverage options * Add `tox.ini` for multi-Python version testing and code quality checks * Include GitHub Actions workflow example in pyproject.toml comments - Update documentation comprehensively: * Enhance README.md with detailed testing section covering tests * Add test infrastructure description and development workflow * Update docs/reference/tools/cueman.md with development and testing section * Enhance docs/tutorials/cueman-tutorial.md with contribution information - Improve development experience: * Document coverage reporting capabilities * Provide clear testing and development guidelines * Include CI/CD integration documentation * Add code quality tool usage instructions All tests pass with comprehensive coverage reporting and lint-free code.
|
Hi @Aniketsy I fixed. I will submit new changes soon. Please way for the final version. Thanks |
|
Hi @Aniketsy I submitted the fixes for pylint issues, resolves SystemExit failures in integration tests, and adds full test infrastructure (pytest, tox, run_tests.sh, coverage). It also updates documentation (README, reference, tutorials) with testing and contribution guidelines. All tests now pass with 10/10 pylint and comprehensive coverage. Ready for merge soon. |
faba875 to
7bd5455
Compare
|
All tests now passed! cd cueman/1) Running Cueman testspytestcueman % ./run_tests.sh
Running: python -m pytest tests/
----------------------------------------
=============================================================================================================================================== test session starts ===============================================================================================================================================
configfile: pyproject.toml
plugins: pyfakefs-5.9.3
collected 42 items
tests/test_integration_workflows.py::TestCuemanIntegrationWorkflows::test_batch_operation_workflow PASSED [ 2%]
tests/test_integration_workflows.py::TestCuemanIntegrationWorkflows::test_complex_filter_combination_workflows PASSED [ 4%]
tests/test_integration_workflows.py::TestCuemanIntegrationWorkflows::test_error_recovery_scenarios PASSED [ 7%]
tests/test_integration_workflows.py::TestCuemanIntegrationWorkflows::test_frame_management_workflow PASSED [ 9%]
tests/test_integration_workflows.py::TestCuemanIntegrationWorkflows::test_help_text_and_version_display PASSED [ 11%]
tests/test_integration_workflows.py::TestCuemanIntegrationWorkflows::test_invalid_command_handling PASSED [ 14%]
tests/test_main.py::TestCuemanMain::test_buildFrameSearch_default PASSED [ 16%]
tests/test_main.py::TestCuemanMain::test_buildFrameSearch_with_layer PASSED [ 19%]
tests/test_main.py::TestCuemanMain::test_buildFrameSearch_with_memory_range PASSED [ 21%]
tests/test_main.py::TestCuemanMain::test_buildFrameSearch_with_page PASSED [ 23%]
tests/test_main.py::TestCuemanMain::test_buildFrameSearch_with_range PASSED [ 26%]
tests/test_main.py::TestCuemanMain::test_buildFrameSearch_with_state PASSED [ 28%]
tests/test_main.py::TestCuemanMain::test_format_nargs_input_comma_separated PASSED [ 30%]
tests/test_main.py::TestCuemanMain::test_format_nargs_input_single_job PASSED [ 33%]
tests/test_main.py::TestCuemanMain::test_format_nargs_input_with_spaces PASSED [ 35%]
tests/test_main.py::TestCuemanMain::test_reorderJob_with_invalid_order PASSED [ 38%]
tests/test_main.py::TestCuemanMain::test_reorderJob_with_valid_order PASSED [ 40%]
tests/test_main.py::TestCuemanMain::test_staggerJob_with_layers PASSED [ 42%]
tests/test_main.py::TestCuemanMain::test_staggerJob_without_layers PASSED [ 45%]
tests/test_main.py::TestCuemanMain::test_terminateJobs PASSED [ 47%]
tests/test_main.py::TestCuemanHandleArgs::test_handleArgs_info PASSED [ 50%]
tests/test_main.py::TestCuemanHandleArgs::test_handleArgs_list_frames PASSED [ 52%]
tests/test_main.py::TestCuemanHandleArgs::test_handleArgs_no_command PASSED [ 54%]
tests/test_main.py::TestCuemanHandleArgs::test_handleArgs_pause PASSED [ 57%]
tests/test_suite.py::TestCuemanMain::test_buildFrameSearch_default PASSED [ 59%]
tests/test_suite.py::TestCuemanMain::test_buildFrameSearch_with_layer PASSED [ 61%]
tests/test_suite.py::TestCuemanMain::test_buildFrameSearch_with_memory_range PASSED [ 64%]
tests/test_suite.py::TestCuemanMain::test_buildFrameSearch_with_page PASSED [ 66%]
tests/test_suite.py::TestCuemanMain::test_buildFrameSearch_with_range PASSED [ 69%]
tests/test_suite.py::TestCuemanMain::test_buildFrameSearch_with_state PASSED [ 71%]
tests/test_suite.py::TestCuemanMain::test_format_nargs_input_comma_separated PASSED [ 73%]
tests/test_suite.py::TestCuemanMain::test_format_nargs_input_single_job PASSED [ 76%]
tests/test_suite.py::TestCuemanMain::test_format_nargs_input_with_spaces PASSED [ 78%]
tests/test_suite.py::TestCuemanMain::test_reorderJob_with_invalid_order PASSED [ 80%]
tests/test_suite.py::TestCuemanMain::test_reorderJob_with_valid_order PASSED [ 83%]
tests/test_suite.py::TestCuemanMain::test_staggerJob_with_layers PASSED [ 85%]
tests/test_suite.py::TestCuemanMain::test_staggerJob_without_layers PASSED [ 88%]
tests/test_suite.py::TestCuemanMain::test_terminateJobs PASSED [ 90%]
tests/test_suite.py::TestCuemanHandleArgs::test_handleArgs_info PASSED [ 92%]
tests/test_suite.py::TestCuemanHandleArgs::test_handleArgs_list_frames PASSED [ 95%]
tests/test_suite.py::TestCuemanHandleArgs::test_handleArgs_no_command PASSED [ 97%]
tests/test_suite.py::TestCuemanHandleArgs::test_handleArgs_pause PASSED [100%]
=============================================================================================================================================== 42 passed in 0.45s ================================================================================================================================================
2) Install with development dependenciespip install -e ".[dev]"3) Run the test suitepytest --cov=cueman --cov-report=term-missing=============================================================================================================================================== test session starts ===============================================================================================================================================
configfile: pyproject.toml
testpaths: tests
plugins: mock-3.15.1, pyfakefs-5.9.3, cov-7.0.0
collected 42 items
.
.
.
================================================================================================================================================= tests coverage ==================================================================================================================================================
________________________________________________________________________________________________________________________________ coverage: platform darwin, python 3.13.2-final-0 _________________________________________________________________________________________________________________________________
Name Stmts Miss Cover Missing
---------------------------------------------------
cueman/__init__.py 12 8 33.33% 22-31
cueman/__main__.py 11 11 0.00% 19-37
cueman/main.py 377 221 41.38% 40-41, 49-55, 193, 200-201, 206-210, 244-249, 251-261, 266-271, 276-281, 295, 300-457, 469-513, 545, 584, 591, 601-620
---------------------------------------------------
TOTAL 400 240 40.00%
=============================================================================================================================================== 42 passed in 0.22s ================================================================================================================================================4) Format and lint codeblack cueman tests && isort cueman testsAll done! ✨ 🍰 ✨
7 files left unchanged.pylint cueman tests.
.
.
==tests.test_main:[285:301]
"lf",
"lp",
"ll",
"info",
"pause",
"resume",
"term",
"eat",
"kill",
"retry",
"done",
"stagger",
"reorder",
"retries",
"autoeaton",
"autoeatoff", (duplicate-code)
.
.
.
-----------------------------------
Your code has been rated at 8.76/10 |
2e7af24 to
f3eb248
Compare
…on for cueman - Fix pylint issues in `test_integration_workflows.py` * Add module docstring and fix import style * Remove trailing whitespace and add proper spacing * Achieve 10/10 pylint rating - Fix SystemExit test failures in integration tests: * Update test_batch_operation_workflow to use comma-separated job format * Mock displayLayers function properly in workflow tests * Remove incorrect SystemExit expectations where not applicable * All tests now pass successfully - Add pytest and test dependencies to pyproject.toml: * Add test optional dependencies: pytest, pytest-cov, pytest-mock, mock, pyfakefs * Add dev optional dependencies including pylint, black, isort * Configure pytest.ini_options with test discovery and execution settings * Add coverage configuration with HTML/XML report generation * Include test markers for unit, integration, and slow tests - Create test infrastructure tools: * Add `run_tests.sh` convenience script for running tests with coverage options * Add `tox.ini` for multi-Python version testing and code quality checks * Include GitHub Actions workflow example in pyproject.toml comments - Update documentation comprehensively: * Enhance README.md with detailed testing section covering tests * Add test infrastructure description and development workflow * Update docs/reference/tools/cueman.md with development and testing section * Enhance docs/tutorials/cueman-tutorial.md with contribution information - Improve development experience: * Document coverage reporting capabilities * Provide clear testing and development guidelines * Include CI/CD integration documentation * Add code quality tool usage instructions All tests pass with comprehensive coverage reporting and lint-free code.
f3eb248 to
0a31c6e
Compare
…on for cueman - Fix pylint issues in `test_integration_workflows.py` * Add module docstring and fix import style * Remove trailing whitespace and add proper spacing * Achieve 10/10 pylint rating - Fix SystemExit test failures in integration tests: * Update test_batch_operation_workflow to use comma-separated job format * Mock displayLayers function properly in workflow tests * Remove incorrect SystemExit expectations where not applicable * All tests now pass successfully - Add pytest and test dependencies to pyproject.toml: * Add test optional dependencies: pytest, pytest-cov, pytest-mock, mock, pyfakefs * Add dev optional dependencies including pylint, black, isort * Configure pytest.ini_options with test discovery and execution settings * Add coverage configuration with HTML/XML report generation * Include test markers for unit, integration, and slow tests - Create test infrastructure tools: * Add `run_tests.sh` convenience script for running tests with coverage options * Add `tox.ini` for multi-Python version testing and code quality checks * Include GitHub Actions workflow example in pyproject.toml comments - Update documentation comprehensively: * Enhance README.md with detailed testing section covering tests * Add test infrastructure description and development workflow * Update docs/reference/tools/cueman.md with development and testing section * Enhance docs/tutorials/cueman-tutorial.md with contribution information - Improve development experience: * Document coverage reporting capabilities * Provide clear testing and development guidelines * Include CI/CD integration documentation * Add code quality tool usage instructions All tests pass with comprehensive coverage reporting and lint-free code.
Signed-off-by: Ramon Figueiredo <[email protected]>
90c3c15
into
AcademySoftwareFoundation:master
|
@Aniketsy |
|
@lithorus Sure I will do that . |
|
@ramonfigueiredo Just want to confirm before I proceed and make the changes as per suggestions. |
Link the Issue(s) this Pull Request is related to.
Summarize your change.
1) Integration tests
Implement integration tests that cover complete Cueman workflows from argument parsing through execution, simulating real-world usage scenarios.
Created
/cueman/tests/test_integration_workflows.pywith end-to-end tests for:2) Lint and Code quality
pylintissues intest_integration_workflows.py3) Test fixes
test_batch_operation_workflowto use comma-separated job formatdisplayLayersfunction properly in workflow tests4) Test infrastructure
pyproject.toml:pytest.ini_optionswith discovery and execution settingsrun_tests.shscript for coverage optionstox.inifor multi-Python testing and lint checkspyproject.tomlcomments5) Documentation updates
docs/reference/tools/cueman.mdwith dev and testing infodocs/tutorials/cueman-tutorial.mdwith contribution guidelines6) Developer experience
All tests pass with comprehensive coverage reporting and lint-free code.
Co-authored-by: Ramon Figueiredo [email protected]
Co-authored-by: Aniket Singh Yadav [email protected]