Skip to content

chore: ignore *.egg-info build artifacts - #38

Merged
dapiced merged 4 commits into
mainfrom
dapiced-cosmic-daily-prompt
Sep 7, 2026
Merged

chore: ignore *.egg-info build artifacts#38
dapiced merged 4 commits into
mainfrom
dapiced-cosmic-daily-prompt

Conversation

@dapiced

@dapiced dapiced commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Empêche les artefacts de build Python (*.egg-info/) d'être commités par erreur, comme ce fut le cas dans la PR générée automatiquement #37.

dapiced and others added 4 commits September 6, 2026 21:30
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
DEMO_KEY is a globally shared, rate-limited key that can respond slowly
under load. The previous 20s timeout caused the GitHub Actions workflow
to fail with a read timeout. Use a (10s connect, 45s read) timeout and
retry up to 3 times with backoff before failing.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
# Conflicts:
#	tools/cosmic-daily/cosmic_daily/nasa_client.py
Also removed the tools/cosmic-daily/cosmic_daily.egg-info directory that
was accidentally tracked from a local pip install -e . run.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 7, 2026 01:41
@dapiced
dapiced merged commit 4958d21 into main Sep 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The PR includes an unscoped behavior change in nasa_client.py (retry/backoff) without corresponding tests and doesn’t match the stated PR intent.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR aims to prevent Python build artifacts (*.egg-info/) from being accidentally committed (as previously happened in PR #37). In addition, it modifies the Cosmic Daily NASA APOD client to add retry/backoff behavior and adjust request timeouts.

Changes:

  • Add *.egg-info/ to the root .gitignore.
  • Update fetch_apod to use a (connect, read) timeout tuple and retry on requests.RequestException with backoff.
File summaries
File Description
tools/cosmic-daily/cosmic_daily/nasa_client.py Adds retry/backoff + new timeout constants for APOD fetch requests.
.gitignore Ignores *.egg-info/ directories to prevent committing Python build artifacts.
Review details
  • Files reviewed: 1/2 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +62 to +66
for attempt in range(1, MAX_ATTEMPTS + 1):
try:
response = requests.get(
APOD_ENDPOINT,
params={"api_key": configured_key, "date": target_day},
Comment on lines +14 to +18
# DEMO_KEY is a shared, rate-limited key; requests can be slow under load, so
# use a generous read timeout and retry a couple of times before giving up.
REQUEST_TIMEOUT = (10, 45)
MAX_ATTEMPTS = 3
RETRY_BACKOFF_SECONDS = 5
Comment on lines +75 to +78
if response is None:
raise RuntimeError(
f"Failed to fetch APOD for {target_day} after {MAX_ATTEMPTS} attempts: {last_error}"
) from last_error
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