slab-cli 0.22.0__tar.gz → 0.23.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. {slab_cli-0.22.0 → slab_cli-0.23.0}/PKG-INFO +2 -2
  2. {slab_cli-0.22.0 → slab_cli-0.23.0}/pyproject.toml +2 -2
  3. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/prompts.py +17 -1
  4. {slab_cli-0.22.0 → slab_cli-0.23.0}/README.md +0 -0
  5. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/__init__.py +0 -0
  6. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/banner.py +0 -0
  7. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/browse.py +0 -0
  8. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/client.py +0 -0
  9. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/commands/__init__.py +0 -0
  10. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/commands/breaks.py +0 -0
  11. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/commands/catalog.py +0 -0
  12. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/commands/collection.py +0 -0
  13. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/commands/custom_sets.py +0 -0
  14. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/commands/export.py +0 -0
  15. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/commands/lots.py +0 -0
  16. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/commands/pricing.py +0 -0
  17. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/commands/registry.py +0 -0
  18. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/commands/setup.py +0 -0
  19. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/commands/update.py +0 -0
  20. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/config.py +0 -0
  21. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/context.py +0 -0
  22. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/display.py +0 -0
  23. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/flags.py +0 -0
  24. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/help.py +0 -0
  25. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/main.py +0 -0
  26. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/nav.py +0 -0
  27. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/paging.py +0 -0
  28. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/picker.py +0 -0
  29. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/platforms/__init__.py +0 -0
  30. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/platforms/base.py +0 -0
  31. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/platforms/posix.py +0 -0
  32. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/platforms/windows.py +0 -0
  33. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/sources.py +0 -0
  34. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/theme.py +0 -0
  35. {slab_cli-0.22.0 → slab_cli-0.23.0}/src/slab_cli/updates.py +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: slab-cli
3
- Version: 0.22.0
3
+ Version: 0.23.0
4
4
  Summary: CLI for the slab trading-card API — catalog, collect, and track your cards from the terminal.
5
5
  Author: dev_jeb
6
- Requires-Dist: slab-schemas>=0.35.0
6
+ Requires-Dist: slab-schemas>=0.36.0
7
7
  Requires-Dist: httpx>=0.27
8
8
  Requires-Dist: rich>=13.0
9
9
  Requires-Dist: inquirerpy>=0.3
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "slab-cli"
3
- version = "0.22.0"
3
+ version = "0.23.0"
4
4
  description = "CLI for the slab trading-card API — catalog, collect, and track your cards from the terminal."
5
5
  readme = "README.md"
6
6
  authors = [{name = "dev_jeb"}]
@@ -12,7 +12,7 @@ dependencies = [
12
12
  # 0.34 reframes the grading desk from verdicts to break-even readings (BreakEvenRegion,
13
13
  # GradingDesk.break_even) — the desk shows data, never tells the user to grade.
14
14
  # 0.35 adds Liquidity/LiquidityLabel, which the market view's Sells column renders.
15
- "slab-schemas>=0.35.0",
15
+ "slab-schemas>=0.36.0",
16
16
  "httpx>=0.27",
17
17
  "rich>=13.0",
18
18
  "InquirerPy>=0.3",
@@ -184,6 +184,20 @@ def select_printing(cards: list[CardOut], subject: str, show_set: bool = False)
184
184
  ).execute()
185
185
 
186
186
 
187
+ def _released_at(s: SetOut) -> date:
188
+ """When a set hit shelves, for newest-first ordering.
189
+
190
+ `year` is the SEASON (2025 for a 2025-26 product) and a season's products ship across fourteen
191
+ months, so ranking by it ties a whole season together and puts a 2025-26 product that shipped
192
+ in July above a 2024-25 one that shipped in October. Sets whose overview hasn't been ingested
193
+ carry no release date, so those fall back to Jan 1 of the season's second calendar year — the
194
+ middle of that season's window — which keeps them among their own season. Same rule as the
195
+ API's `-release` sort."""
196
+ if s.release_date:
197
+ return s.release_date
198
+ return date(s.year + 1, 1, 1) if s.year else date.min
199
+
200
+
187
201
  def select_set(sets: list[SetOut], initial: str | None = None) -> SetOut | None:
188
202
  """Pick one set from the catalog — fuzzy type-to-filter, pre-seeded with the user's query so
189
203
  the closest names surface immediately (backspace to widen). Auto-selects a lone match;
@@ -192,7 +206,9 @@ def select_set(sets: list[SetOut], initial: str | None = None) -> SetOut | None:
192
206
  return None
193
207
  if len(sets) == 1:
194
208
  return sets[0]
195
- ranked = sorted(sets, key=lambda s: (-(s.year or 0), s.name or "")) # newest first
209
+ # Newest release first, name A-Z within a day — negate the ordinal rather than reversing the
210
+ # whole sort, which would flip the names too.
211
+ ranked = sorted(sets, key=lambda s: (-_released_at(s).toordinal(), s.name or ""))
196
212
  choices = [Choice(value=s, name=_set_label(s)) for s in ranked]
197
213
  return inquirer.fuzzy(
198
214
  message=f"Which set? ({len(sets)} in catalog — type to filter):",
File without changes
File without changes