Skip to content

Add resume functionality and better logging#5

Open
smcguire-cmu wants to merge 19 commits intomainfrom
sean/logging
Open

Add resume functionality and better logging#5
smcguire-cmu wants to merge 19 commits intomainfrom
sean/logging

Conversation

@smcguire-cmu
Copy link
Copy Markdown
Collaborator

Adds a logging module which uses python's logging module to write all pipeline outputs to both stdout and a log file which is configurable by CLI arguments. Updates all logs in the pipeline to use python logging instead of print/typer

Adds resume functionality throughout the pipeline, with each stage touching a completed file and skipping each completed stage.

Also adds individual resuming behavior for post-process and nesting, checking for already completed work, and improves the resume functionality in import stage, and makes sure that all stages are resumable.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 21.85792% with 143 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.17%. Comparing base (caf1464) to head (60e7328).

Files with missing lines Patch % Lines
src/rubin_dash/stages/nesting.py 11.62% 38 Missing ⚠️
src/rubin_dash/pipeline.py 10.00% 27 Missing ⚠️
src/rubin_dash/stages/postprocess.py 13.33% 26 Missing ⚠️
src/rubin_dash/log.py 25.00% 15 Missing ⚠️
src/rubin_dash/cli.py 26.66% 11 Missing ⚠️
src/rubin_dash/stages/collections.py 33.33% 6 Missing ⚠️
src/rubin_dash/stages/crossmatch.py 33.33% 6 Missing ⚠️
src/rubin_dash/stages/butler.py 28.57% 5 Missing ⚠️
src/rubin_dash/stages/raw_sizes.py 33.33% 4 Missing ⚠️
src/rubin_dash/stages/import_catalogs.py 40.00% 3 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #5      +/-   ##
==========================================
- Coverage   37.11%   36.17%   -0.94%     
==========================================
  Files          14       15       +1     
  Lines         741      868     +127     
==========================================
+ Hits          275      314      +39     
- Misses        466      554      +88     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

del table
pq.write_table(arrow_table, file_path.path)
del arrow_table
pa.default_memory_pool().release_unused()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a comment here on why this is needed, for future reference?

existing = set(pq.read_schema(file_path).names)
if flux_col_prefixes and not all(f"{p}Mag" in existing for p in flux_col_prefixes):
return False
return not (add_mjds and "midpointMjdTai" not in existing)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also check if we can skip the step where we can cast to float32?

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