Skip to content

migrate fre/tests/test_fre_cmor_cli.py → fremorizer/tests/test_cli.py#62

Merged
ilaflott merged 7 commits intomainfrom
copilot/migrate-fre-cli-tests
Apr 14, 2026
Merged

migrate fre/tests/test_fre_cmor_cli.py → fremorizer/tests/test_cli.py#62
ilaflott merged 7 commits intomainfrom
copilot/migrate-fre-cli-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

  • Create fremorizer/tests/test_cli.py (migrated from fre-cli)
  • Fix CI test failures in test_cli.py:
    • Create conftest.py with session-scoped fixtures for NC file generation
    • Fix test_cli_fremor: click>=8.2 returns exit_code=2
    • Fix log tests: use yaml --help subcommand, tmp_path, extracted constants
    • Fix test_setup_test_files: use conftest fixtures
    • Fix run/varlist tests: session-scoped fixtures + tmp_path
    • Clean up unused imports; use Path objects from conftest
  • Code review addressed (tmp_path for logs, extracted constants, removed unused import)
  • CodeQL security scan: 0 alerts
  • Verify CI passes (requires workflow approval)

Copilot AI changed the title [WIP] Migrate NOAA-GFDL/fre-cli tests to fremorizer repository migrate fre/tests/test_fre_cmor_cli.py → fremorizer/tests/test_cli.py Apr 14, 2026
Copilot AI requested a review from ilaflott April 14, 2026 14:03
@ilaflott ilaflott force-pushed the copilot/migrate-fre-cli-tests branch from 0f0bdde to 0964fee Compare April 14, 2026 14:04
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@             Coverage Diff             @@
##             main      #62       +/-   ##
===========================================
+ Coverage   76.81%   93.74%   +16.93%     
===========================================
  Files           9        9               
  Lines        1199     1199               
===========================================
+ Hits          921     1124      +203     
+ Misses        278       75      -203     

see 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 212ed93...6bd72e9. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI and others added 5 commits April 14, 2026 10:41
…ttern

Fixes:
- test_cli_fremor: click>=8.2 returns exit_code=2 for group with no subcommand
- log tests: use 'yaml --help' so group callback runs before click processes --help
- run/varlist tests: use session-scoped conftest fixtures for NC file generation
- run/varlist tests: use tmp_path for outputs instead of shared directories
- config test: depend on cli_sos_nc_file fixture
- find tests: use Path objects from conftest instead of string concatenation

Agent-Logs-Url: https://github.com/ilaflott/fremorizer/sessions/8457b2f7-ba78-41c0-b74e-2ec0575b97d9

Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
Addresses code review feedback:
- Use tmp_path for log file isolation
- Extract LOG_INFO_LINE and LOG_DEBUG_LINE as module-level constants

Agent-Logs-Url: https://github.com/ilaflott/fremorizer/sessions/8457b2f7-ba78-41c0-b74e-2ec0575b97d9

Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
@ilaflott ilaflott force-pushed the copilot/migrate-fre-cli-tests branch from 4569cd3 to f2a7038 Compare April 14, 2026 14:41
@ilaflott ilaflott marked this pull request as ready for review April 14, 2026 14:45
@ilaflott ilaflott merged commit 5e35634 into main Apr 14, 2026
4 of 5 checks passed
@ilaflott ilaflott deleted the copilot/migrate-fre-cli-tests branch April 16, 2026 20:08
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.

migrate NOAA-GFDL/fre-cli's fre/tests/test_fre_cmor_cli.py to this repository

3 participants