Skip to content

Rename to pqn-node; extract hardware to pqn-hardware dependency#144

Merged
marcosfrenkel merged 3 commits intomasterfrom
removing_hardware_code
May 8, 2026
Merged

Rename to pqn-node; extract hardware to pqn-hardware dependency#144
marcosfrenkel merged 3 commits intomasterfrom
removing_hardware_code

Conversation

@marcosfrenkel
Copy link
Copy Markdown
Collaborator

Summary

  • Extract hardware code into a new pqn-hardware repo (already merged there, pinned here by commit SHA).
  • Rename the Python package: src/pqnstack/src/pqn_node/ (the app/ level is dropped since the whole repo is now the Node).
  • Rename the distribution: pqnstackpqn-node. Entry point: pqnpqn-node.
  • Rewrite every import that used pqnstack.{base,network,pqn} to pull from pqn_hardware.*; the hardware package is now a git-pinned dep in pyproject.toml.

What's in here

  • src/pqn_node/ — renamed package (FastAPI app, config, cli, cron_manager, daily_report, constants).
  • pyproject.toml — new distribution name, entry point, and dependency on pqn-hardware @ git+...@6440be2; drops numpy, pyfirmata2, pyzmq, thorlabs-apt-device (they come transitively via pqn-hardware).
  • README.md — rewritten to describe the node-only scope and point at pqn-hardware for router/provider docs.
  • src/pqn_node/cli.py — keeps toggle-game and daily-report; start-provider/start-router moved to pqn-hw in the hardware repo. InvalidNetworkConfigurationError usage in toggle_game replaced with typer.BadParameter (app-level input validation, not a network config error).

Test plan

  • uv sync succeeds and resolves pqn-hardware from the pinned SHA.
  • uv run python -c "from pqn_node.main import app; from pqn_hardware.measurement import MeasurementConfig; from pqn_hardware.network.client import Client" imports cleanly.
  • uv run pqn-node --help lists toggle-game and daily-report.
  • All 9 route modules (chsh, coordination, debug, games, health, qkd, rng, serial, timetagger) import cleanly.
  • pytest tests/ passes.
  • git grep "pqnstack" returns no hits in tracked source (only binary PNG metadata remains).

Notes for reviewers

  • The rename preserves git rename detection: git log --follow src/pqn_node/main.py (and every other file under the new path) traces back to the original src/pqnstack/app/ location.
  • MeasurementConfig was moved into pqn-hardware (it's hardware-adjacent and shared); it is imported here via pqn_hardware.measurement.
  • cron_manager.py and daily_report.py stayed in this repo because they're exercised only through the CLI and aren't part of the web app runtime.

🤖 Generated with Claude Code

marcosfrenkel and others added 3 commits April 20, 2026 15:36
Renames src/pqnstack → src/pqn_node, rewrites all imports that used
pqnstack.{base,network,pqn} to pull from the new pqn-hardware package,
and pins pqn-hardware via a git URL in pyproject.toml.

- Distribution: pqnstack → pqn-node
- Entry point: pqn → pqn-node
- Drops hardware deps (numpy, pyfirmata2, pyzmq, thorlabs-apt-device) —
  they now come transitively via pqn-hardware.
- CLI retains app-only commands (toggle-game, daily-report); provider
  and router commands live in pqn-hardware's pqn-hw CLI.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@marcosfrenkel marcosfrenkel merged commit 10d51b7 into master May 8, 2026
8 of 12 checks passed
@marcosfrenkel marcosfrenkel deleted the removing_hardware_code branch May 8, 2026 14:53
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.

1 participant