Skip to content

refactor!: remove the bundled catalogs and read APC files directly - #22

Merged
karakayahuseyin merged 1 commit into
mainfrom
feat/remove-bundled-catalogs
Nov 18, 2026
Merged

karakayahuseyin merged 1 commit into
mainfrom
feat/remove-bundled-catalogs

Conversation

@karakayahuseyin

Copy link
Copy Markdown
Contributor

Summary

PyThrust shipped 15 MB of motor and propeller catalogs inside the package. It now ships no catalog data: users bring their own files and PyThrust reads them. The motor catalog moved to Setuav/motor-data.

  • APC reader: pythrust.io.read_apc(path) reads an APC PER3_*.dat performance file into a TablePropeller. It replaces the JSON + CSV format and scripts/convert_apc_dat.py.
  • TablePropeller holds its diameter and coefficient table itself. scaled(diameter_m) gives the propeller at another diameter.
  • MotorSpec moves to pythrust.motor. Motor constants come from a datasheet.
  • Tests read one APC file, tests/data/PER3_13x65E.dat, and keep motor values in the test code.
  • Docs: a Data Files page replaces Component Databases. The motor-selection example is removed; the mission example takes an APC file path.
  • AGENTS.md: PR titles follow Conventional Commits and PRs are squash-merged.

Breaking changes

  • Removed: PropellerDatabase, PropellerEntry, PropellerMetadata, MotorDatabase, MotorEntry, the pythrust.motors package, the bundled motor and propeller data, and scripts/convert_apc_dat.py.
  • Import MotorSpec from pythrust.motor instead of pythrust.propulsion.
  • Build a table propeller with read_apc(path) or TablePropeller(diameter_m, data_by_rpm) instead of TablePropeller(entry).
  • PropulsionComponent's prop_entry option is now propeller.

Verification

  • The golden tests match unchanged. The APC file downloaded today gives the same coefficients as the old CSV in all 18 RPM bands.
  • 147 tests pass locally, including 5 new tests for read_apc.
  • mkdocs build --strict passes.
  • A wheel built from a clean copy is 34 KB and holds only the example battery cell. Installed into an empty environment, it solves an operating point equal to the golden value.
  • rate_map_battery_mission.py prints the same output as before.

Notes

  • No version bump in this PR.

🤖 Generated with Claude Code

The package carried 15 MB of motor and propeller catalogs. PyThrust now
ships no catalog data: users bring their own files and PyThrust reads them.

- pythrust.io.read_apc reads an APC PER3_*.dat performance file into a
  TablePropeller, in place of the JSON + CSV conversion.
- TablePropeller holds its diameter and coefficient table itself;
  scaled() gives the propeller at another diameter.
- MotorSpec moves to pythrust.motor; motor constants come from a
  datasheet.
- Tests read one APC file from tests/data/ and keep motor values in the
  test code. Results match the golden values unchanged.
- The Data Files page replaces Component Databases.

BREAKING CHANGE: PropellerDatabase, PropellerEntry, PropellerMetadata,
MotorDatabase, MotorEntry and the pythrust.motors package are removed,
with the bundled motor and propeller data and scripts/convert_apc_dat.py.
Import MotorSpec from pythrust.motor instead of pythrust.propulsion.
Build a table propeller with read_apc(path) or
TablePropeller(diameter_m, data_by_rpm) instead of TablePropeller(entry).
PropulsionComponent's prop_entry option is now propeller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@karakayahuseyin
karakayahuseyin merged commit 4b39084 into main Nov 18, 2026
4 checks passed
@karakayahuseyin
karakayahuseyin deleted the feat/remove-bundled-catalogs branch November 18, 2026 21:31
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