Skip to content

Add nightly observation reports#1387

Draft
Copilot wants to merge 5 commits intodevelopfrom
copilot/create-nightly-report
Draft

Add nightly observation reports#1387
Copilot wants to merge 5 commits intodevelopfrom
copilot/create-nightly-report

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

Implements automated end-of-night reports summarizing observations taken and reasons for non-observation (weather, darkness, power, disk space).

Implementation

  • Report generator (src/panoptes/pocs/utils/report.py): NightlyReport class queries database for observed list and safety checks, formats human-readable summary
  • Housekeeping state integration: Generates report before resetting observed list, saves to configurable directories.reports path (default: ~/reports)
  • Safety analysis: Extracts failure reasons from database safety records (weather unsafe, not dark, power loss, insufficient disk space)

Report Format

OBSERVATIONS SUMMARY
  Total observation sequences: 2
  Unique fields observed: 2
  
  Observations by field:
    - M42OrionNebula: 1 sequence(s)
      * Started: 2026-02-13T01:30:00, Exposures: 15/30

SAFETY SUMMARY
  AC Power Connected...................... ✓ PASS
  Weather Safe............................ ✗ FAIL
  
  Reasons for non-observation:
    - Unsafe weather conditions

Reports saved as nightly_report_YYYYMMDD.txt. Error handling ensures housekeeping continues if report generation fails.

Original prompt

This section details on the original issue you should resolve

<issue_title>Create a nightly report</issue_title>
<issue_description>Create a nightly report that describes what observations were taken and, more importantly, why observations were not conducted (bad weahter? errors?)</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits February 13, 2026 06:45
Co-authored-by: wtgee <70736+wtgee@users.noreply.github.com>
Co-authored-by: wtgee <70736+wtgee@users.noreply.github.com>
Co-authored-by: wtgee <70736+wtgee@users.noreply.github.com>
Co-authored-by: wtgee <70736+wtgee@users.noreply.github.com>
Copilot AI changed the title [WIP] Add nightly report for observations and reasons Add nightly observation reports Feb 13, 2026
Copilot AI requested a review from wtgee February 13, 2026 06:52
@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 94.38596% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.75%. Comparing base (b1d44e7) to head (8fa3c00).

Files with missing lines Patch % Lines
src/panoptes/pocs/utils/report.py 87.50% 6 Missing and 6 partials ⚠️
tests/test_housekeeping_state.py 94.73% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1387      +/-   ##
===========================================
+ Coverage    64.83%   65.75%   +0.91%     
===========================================
  Files          104      107       +3     
  Lines         9444     9729     +285     
  Branches       831      850      +19     
===========================================
+ Hits          6123     6397     +274     
- Misses        3178     3181       +3     
- Partials       143      151       +8     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Create a nightly report

2 participants