Skip to content

feat: Gaia deep star charts on NixOS#382

Open
mrosseel wants to merge 145 commits intobrickbots:mainfrom
mrosseel:deepchart-nixos
Open

feat: Gaia deep star charts on NixOS#382
mrosseel wants to merge 145 commits intobrickbots:mainfrom
mrosseel:deepchart-nixos

Conversation

@mrosseel
Copy link
Collaborator

Summary

Test plan

  • Label with testable to trigger CI build
  • Verify PiFinder SOFTWARE UI discovers this PR
  • Test deep chart rendering on device

🤖 Generated with Claude Code

mrosseel added 30 commits March 17, 2025 22:19
This reverts commit c872394.
The reformatting in b8d65d4 changed:
- solution.pop('key', None) → del solution['key'] (unsafe, fails if key missing)
- Added logging that referenced 'solution' before it could be assigned

This caused UnboundLocalError when solve_from_centroids() raised exceptions,
as 'solution' was never assigned but later code tried to check it.

Reverting to the previous working version (parent of b8d65d4).
mrosseel and others added 26 commits February 13, 2026 04:46
nix copy --from uses only the specified source store. If Cachix
doesn't have every transitive dependency (e.g. shadow from nixos
cache), the copy fails. nix build with --max-jobs 0 uses all
configured substituters (Cachix + cache.nixos.org) as fallbacks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename nox.yml to lint.yml, use nix develop for ruff/mypy/pytest
- Move ruff builtins config into pyproject.toml, target py313
- Add notebook lint exclusions (E402, F841)
- Fix ambiguous variable name in software.py (l -> lbl)
- Remove unused import in sys_utils.py
- Delete noxfile.py, requirements.txt, requirements_dev.txt
- Add DEPENDENCIES.md (auto-generated from nix) and generation script
- Update .pre-commit-config.yaml with ruff lint+format hooks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
native-wait job polls build-native for 15 min on ubuntu-latest.
If the self-hosted aarch64 runner doesn't pick up the job in time,
build-emulated kicks in with QEMU instead of queuing forever.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add openFirewall = true to samba service
- Remove manual port 22 (openssh.openFirewall defaults to true)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Avahi fails to start after switch-to-configuration because the old
PID file persists at /run/avahi-daemon/pid. Add ExecStartPre to
remove it, preventing mDNS (pifinder.local) from breaking on upgrades.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
DeterminateSystems/nix-installer-action defaults to determinate: true
which requires FlakeHub auth. This fails on forks (brickbots/PiFinder)
because OIDC tokens don't work cross-repo. Use upstream Nix instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Validate hostnames (DNS-safe: alphanumeric + hyphens, max 63 chars)
- Add sudo to avahi-set-host-name call with fallback to restart avahi
- Add avahi-set-host-name to sudoers NOPASSWD rules
- Add avahi restart fallback to pifinder-hostname boot service
- Replace hardcoded 128x128 in status.py with display class constants

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
switch-to-configuration stops changed services, which kills the
pifinder-upgrade service mid-switch. Move activation (test, health
check, bootloader persist, cleanup) into a systemd-run scope that
survives the service being stopped.

Poll /run/pifinder/upgrade-status file instead of relying solely on
systemctl is-active, which falsely reported failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The systemd-run --scope approach failed — switch-to-configuration
deactivated the transient scope during daemon-reload. Instead, set
restartIfChanged=false and stopIfChanged=false on pifinder-upgrade
so it survives switch-to-configuration without being killed.

Also add granular upgrade phases (downloading, activating, verifying,
persisting) to the status file for future progress display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Compares top-level keys in default_config.json between base and head
on pull requests. Emits ::warning:: annotations for any removed keys
to catch accidental breakage of user preferences across releases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
version.txt was manually maintained and redundant. Now:
- CI stamps branch-sha as version for non-release builds
- Release workflow already sets version from input
- Python reads version from pifinder-build.json via utils.get_version()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This function was never called in production code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Multiple queued runs for the same branch compete for the single
self-hosted runner and can stall the GitHub Actions dispatcher.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Save the unlock state to config so users don't have to tap
square 7 times after every reboot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merge mrosseel's deepchart branch which adds:
- Gaia star catalog support with binary tile format
- Generated star chart images (alternative to POSS downloads)
- Limiting magnitude calculations (Feijth & Comello formula)
- LM entry UI for fixed limiting magnitude
- Image provider abstraction (POSS + chart providers)
- SQM noise floor calibration improvements

Conflicts resolved:
- catalogs.py: kept nixos refactored build
- gps_ubx_parser.py: kept nixos version
- sqm.py: kept nixos adaptive noise + deepchart debug log
- requirements.txt: removed (nixos uses nix)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mrosseel mrosseel added the testable Ready for testing via PiFinder software update label Feb 14, 2026
mrosseel and others added 2 commits February 14, 2026 20:35
- Add gaia_stars.tar.zst (454MB) to SD card image via populateRootCommands,
  placed in writable PiFinder_data/ for rsync-able updates
- Switch gaia_chart/chart_provider to read from utils.data_dir instead of
  astro_data_dir (Nix store is read-only)
- Add NM dispatcher script for WiFi policy routing: fixes asymmetric routing
  when ethernet and WiFi are on the same subnet

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add healpy 1.19.0 as aarch64 wheel from PyPI. The HEALPix tile lookup
in star_catalog.py requires it for spatial queries on the Gaia data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testable Ready for testing via PiFinder software update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant