Skip to content

fix codecov upload and refine coverage measurements, general improvements#53

Merged
ilaflott merged 53 commits intomainfrom
further-development
Jan 27, 2026
Merged

fix codecov upload and refine coverage measurements, general improvements#53
ilaflott merged 53 commits intomainfrom
further-development

Conversation

@ilaflott
Copy link
Member

@ilaflott ilaflott commented Jan 20, 2026

Describe your changes

Testing

  • All unit tests passing via CI
  • Integration tests now run individually (guarded where unstable)
  • Coverage successfully uploading to Codecov
  • epmt check now runs verify_papiex_options in a guarded manner since it doesn't work, but otherwise epmt checks pass
  • pylint failure threshold for epmt (without epmt-dash/ui) adjusted from 6.1 --> 6.5

CI/CD & Coverage Improvements

  • .github/workflows/build_and_test_epmt.yml: syntax fixes, coverage now uses coveragerc, codecov upload now successful via use_pypi: true
  • coveragerc: Added to omit specific directories from coverage (ui, test)
  • Integration tests now broken out individually for better debugging and granular CI runs
  • Added PAPI configuration options to Makefile (CONFIG_PAPIEX_PAPI, CONFIG_PAPIEX_DEBUG)

Bug Fixes

  • src/epmt/epmt_cmd_dbcare.py: Fixed bug comparing list to int when counting post-processed jobs
  • src/epmt/epmt_daemon.py: Fixed nitersmaxiters bug in daemon loop iteration logic
  • src/epmt/epmt_cmds.py: Re-enabled verify_papiex_options() call (guarded)

Code Quality (PEP 8 / Pylint)

  • Whitespace cleanup, superfluous parentheses removal across multiple modules
  • Import ordering improvements (per PEP 8 guidelines)
  • Refactored complex boolean logic to use all() / any() for readability
  • Converted inline comments to proper docstrings where appropriate
  • Added sqlalchemy.orm.scoping.scoped_session to pylintrc ignored-classes (known pylint/SQLAlchemy clash)

Configuration Changes

  • src/epmt/epmt_default_settings.py: Bumped retire_jobs_ndays from 13 → 14
  • Makefile: Updated remote URLs to NOAA-GFDL GitHub, cleaned up commented-out code, syntax consistency

Deprecations/Removals

  • Commented out risky epmt python subcommand (uses exec())
  • Removed 012-python.bats integration test

Files Changed

  • 25 files modified across source, tests, CI, and configuration

@codecov
Copy link

codecov bot commented Jan 22, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@ilaflott ilaflott marked this pull request as ready for review January 22, 2026 13:53
@ilaflott ilaflott self-assigned this Jan 22, 2026
@ilaflott ilaflott added enhancement New feature or request cleanup labels Jan 22, 2026
Added --cov-config=coveragerc option to pytest commands for better coverage reporting.
@ilaflott ilaflott changed the title update remote URLs in Makefile fix codecov upload and refine coverage measurements, general improvements Jan 22, 2026
@ilaflott ilaflott requested a review from Copilot January 22, 2026 15:55
Copy link
Contributor

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 improves coverage tooling and CI integration, cleans up style/docstrings across several modules, and fixes a couple of functional bugs in job post-processing and daemon behavior. The main functional changes are in the database care workflow, daemon loop control, and coverage reporting pipeline.

Changes:

  • Wire coverage runs to a shared coveragerc (excluding UI/tests) and enable reliable uploads to Codecov from CI.
  • Clean up and refactor utility modules (epmtlib, epmt_job, epmt_concat, epmt_daemon, epmt_cmds) for clearer docstrings, simpler boolean logic, and minor bug fixes (e.g., dbcare post-processing count).
  • Adjust default retention settings and Makefile URLs/scripts for the current hosting setup and build workflow.

Reviewed changes

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

Show a summary per file
File Description
.github/workflows/build_and_test_epmt.yml Adds --cov-config=coveragerc to all pytest invocations, fixes a typo in COVERAGE_FILE, and configures Codecov v5 upload using the generated coverage.xml.
coveragerc New coverage configuration omitting UI and test modules from coverage stats, aligning CI runs with intended measurement scope.
src/epmt/epmtlib.py Converts many inline comments into docstrings and simplifies conditionals; introduces a notable issue where check_none still incorrectly checks membership against the characters of 'NONE' instead of the token 'NONE' itself.
src/epmt/epmt_job.py Minor whitespace and readability tweaks (including use of all()/any() and simplified comparisons) in job ETL and post-processing code, with no apparent logic changes.
src/epmt/epmt_default_settings.py Bumps retire_jobs_ndays from 13 to 14 days to adjust the default job retirement window.
src/epmt/epmt_daemon.py Adds docstrings, cleans up logging and conditionals, and attempts to fix the niters behavior in daemon_loop, but the new termination condition (if 0 < iters <= niters) exits one iteration too early when niters > 1 and contradicts the documented semantics.
src/epmt/epmt_concat.py Refactors conditionals for readability, improves docstrings, and slightly clarifies CLI argument parsing and CSV joining logic without changing behavior.
src/epmt/epmt_cmds.py Whitespace and comment cleanup plus some boolean simplifications; functional behavior remains the same, including daemon-related tests that exercise daemon_loop(niters=1).
src/epmt/epmt_cmd_dbcare.py Fixes the post-processing count bug by correctly taking len(post_process_jobs(jobs=job_list)) so the comparison against 0 uses an integer rather than a list.
Makefile Cleans up commented-out variables, improves echo messaging, switches source URLs to NOAA-GFDL GitHub, and slightly refactors shell command sequencing while preserving overall build/release semantics.

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

ilaflott and others added 8 commits January 22, 2026 11:23
`niters` read like, "number of iterations", which evokes the current number of iterations rather than a maximum. so renamed to `maxiters`, and restore older logical condition that did make sense
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…lls in pipeline, deprecate epmt python test and functionality- too dangerous
…, also lets put the daemon integration test guard back on for now...
@ilaflott ilaflott merged commit 7166a58 into main Jan 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant