fix codecov upload and refine coverage measurements, general improvements#53
Merged
fix codecov upload and refine coverage measurements, general improvements#53
codecov upload and refine coverage measurements, general improvements#53Conversation
… daemon loop- the wrong order is used in the less-than and greater-than-or-equal logic block
…ticulary in epmt_concat
… are turned into docstrings
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 ☂️ |
Added --cov-config=coveragerc option to pytest commands for better coverage reporting.
codecov upload and refine coverage measurements, general improvements
Contributor
There was a problem hiding this comment.
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.
`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>
…tion flags at the epmt level
…lls in pipeline, deprecate epmt python test and functionality- too dangerous
…e enough to do it
…, also lets put the daemon integration test guard back on for now...
…ython shell epmt integration test
This was referenced Jan 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
Testing
epmt checknow runsverify_papiex_optionsin a guarded manner since it doesn't work, but otherwiseepmt checks passpylintfailure threshold forepmt(withoutepmt-dash/ui) adjusted from6.1-->6.5CI/CD & Coverage Improvements
.github/workflows/build_and_test_epmt.yml: syntax fixes, coverage now usescoveragerc, codecov upload now successful viause_pypi: truecoveragerc: Added to omit specific directories from coverage (ui,test)CONFIG_PAPIEX_PAPI,CONFIG_PAPIEX_DEBUG)Bug Fixes
src/epmt/epmt_cmd_dbcare.py: Fixed bug comparinglisttointwhen counting post-processed jobssrc/epmt/epmt_daemon.py: Fixedniters→maxitersbug in daemon loop iteration logicsrc/epmt/epmt_cmds.py: Re-enabledverify_papiex_options()call (guarded)Code Quality (PEP 8 / Pylint)
all()/any()for readabilitysqlalchemy.orm.scoping.scoped_sessiontopylintrcignored-classes (known pylint/SQLAlchemy clash)Configuration Changes
src/epmt/epmt_default_settings.py: Bumpedretire_jobs_ndaysfrom 13 → 14Makefile: Updated remote URLs to NOAA-GFDL GitHub, cleaned up commented-out code, syntax consistencyDeprecations/Removals
epmt pythonsubcommand (usesexec())012-python.batsintegration testFiles Changed