feat: transition 'local' command to tradeorm for speed#266
feat: transition 'local' command to tradeorm for speed#266kfsone wants to merge 1 commit intorelease/v1from
Conversation
b381a9c to
28b5ab1
Compare
28b5ab1 to
790e151
Compare
|
|
note: this branch is a continuation of the max-link-ly one, I was just too lazy to split them totally |
9610810 to
8d2bb42
Compare
|
duplicate uprint fixed in parent branch. That leaves the exception handling, which I think is a testament to TradeORM lookup methods needing fleshing out. TradeException is probably the wrong thing (too broad?) for them to throw, but equally KeyError would mean cluttering every call site with a try/catch wrapper. Python convention seems to be to allow you to specify a default to indicate no-throw: Alternative 1: Add a specific "NameNotFoundError", 'Could not match {typename}: '{name}'', so catching is an option rather than a mandate (if you want to give the user good feedback). Alternative 2: (can include alt 1) try-unless-default as above? |
Yeah, I think that makes sense. Need the right foundation to build on. |
35c958f to
72c32ef
Compare
feat: makes 'local' much faster, chore: minor cosmetic improvements, feat: ORM learnings from porting another command - TradeORM has it's own Pythonic (all-caps) constants for mapping Y/N/? to labels" TRISTATE_LABELS, MARKET_STATES, PLANET_STATES, FLEET_STATES, ODYSSEY_STATES, and PADSIZE_LABELS. - added some extra orm-query helpers to Station, and made some 'dbname' properties hybrids so they can be used in queries - - Station.is_fleet_carrier: bool, fleet_carrier: str, is_planetary: bool (includes horizons and odyssey planets), is_odyssey_planetary: bool), odyssey: str, - type hinting/alignment in trade_cmd - make more use of --detail, move age to -vv
72c32ef to
67ce85f
Compare

DRAFT:
Transitions "local" command to a new pattern that makes it much more responsive, adding a few extra options and some cleanup.
new "--limit" option:

systems with stations that are not fleet carriers within 8 ly:

within 6 ly of reorte, systems + stations that are trading and known to be within 300 ls of arrival point, non-planetary, and non-fleet carrier:

stations in "Rhea" (ly=0) which aren't planetary:
