starbash 0.1.3__py3-none-any.whl → 0.1.5__py3-none-any.whl

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.

Potentially problematic release.


This version of starbash might be problematic. Click here for more details.

@@ -1,137 +0,0 @@
1
- """Selection commands for filtering sessions and targets."""
2
-
3
- import typer
4
- from typing_extensions import Annotated
5
- from rich.table import Table
6
-
7
- from starbash.app import Starbash
8
- from starbash import console
9
-
10
- app = typer.Typer()
11
-
12
-
13
- @app.command(name="any")
14
- def clear():
15
- """Remove any filters on sessions, etc... (select everything)."""
16
- with Starbash("selection-clear") as sb:
17
- sb.selection.clear()
18
- console.print("[green]Selection cleared - now selecting all sessions[/green]")
19
-
20
-
21
- @app.command()
22
- def target(
23
- target_name: Annotated[
24
- str,
25
- typer.Argument(
26
- help="Target name to add to the selection (e.g., 'M31', 'NGC 7000')"
27
- ),
28
- ],
29
- ):
30
- """Limit the current selection to only the named target."""
31
- with Starbash("selection-target") as sb:
32
- # For now, replace existing targets with this one
33
- # In the future, we could support adding multiple targets
34
- sb.selection.targets = []
35
- sb.selection.add_target(target_name)
36
- console.print(f"[green]Selection limited to target: {target_name}[/green]")
37
-
38
-
39
- @app.command()
40
- def telescope(
41
- telescope_name: Annotated[
42
- str,
43
- typer.Argument(
44
- help="Telescope name to add to the selection (e.g., 'Vespera', 'EdgeHD 8')"
45
- ),
46
- ],
47
- ):
48
- """Limit the current selection to only the named telescope."""
49
- with Starbash("selection-telescope") as sb:
50
- # For now, replace existing telescopes with this one
51
- # In the future, we could support adding multiple telescopes
52
- sb.selection.telescopes = []
53
- sb.selection.add_telescope(telescope_name)
54
- console.print(
55
- f"[green]Selection limited to telescope: {telescope_name}[/green]"
56
- )
57
-
58
-
59
- @app.command()
60
- def date(
61
- operation: Annotated[
62
- str,
63
- typer.Argument(help="Date operation: 'after', 'before', or 'between'"),
64
- ],
65
- date_value: Annotated[
66
- str,
67
- typer.Argument(
68
- help="Date in ISO format (YYYY-MM-DD) or two dates separated by space for 'between'"
69
- ),
70
- ],
71
- end_date: Annotated[
72
- str | None,
73
- typer.Argument(help="End date for 'between' operation (YYYY-MM-DD)"),
74
- ] = None,
75
- ):
76
- """Limit to sessions in the specified date range.
77
-
78
- Examples:
79
- starbash selection date after 2023-10-01
80
- starbash selection date before 2023-12-31
81
- starbash selection date between 2023-10-01 2023-12-31
82
- """
83
- with Starbash("selection-date") as sb:
84
- operation = operation.lower()
85
-
86
- if operation == "after":
87
- sb.selection.set_date_range(start=date_value, end=None)
88
- console.print(
89
- f"[green]Selection limited to sessions after {date_value}[/green]"
90
- )
91
- elif operation == "before":
92
- sb.selection.set_date_range(start=None, end=date_value)
93
- console.print(
94
- f"[green]Selection limited to sessions before {date_value}[/green]"
95
- )
96
- elif operation == "between":
97
- if not end_date:
98
- console.print(
99
- "[red]Error: 'between' operation requires two dates[/red]"
100
- )
101
- raise typer.Exit(1)
102
- sb.selection.set_date_range(start=date_value, end=end_date)
103
- console.print(
104
- f"[green]Selection limited to sessions between {date_value} and {end_date}[/green]"
105
- )
106
- else:
107
- console.print(
108
- f"[red]Error: Unknown operation '{operation}'. Use 'after', 'before', or 'between'[/red]"
109
- )
110
- raise typer.Exit(1)
111
-
112
-
113
- @app.callback(invoke_without_command=True)
114
- def show_selection(ctx: typer.Context):
115
- """List information about the current selection.
116
-
117
- This is the default command when no subcommand is specified.
118
- """
119
- if ctx.invoked_subcommand is None:
120
- with Starbash("selection-show") as sb:
121
- summary = sb.selection.summary()
122
-
123
- if summary["status"] == "all":
124
- console.print(f"[yellow]{summary['message']}[/yellow]")
125
- else:
126
- table = Table(title="Current Selection")
127
- table.add_column("Criteria", style="cyan")
128
- table.add_column("Value", style="green")
129
-
130
- for criterion in summary["criteria"]:
131
- parts = criterion.split(": ", 1)
132
- if len(parts) == 2:
133
- table.add_row(parts[0], parts[1])
134
- else:
135
- table.add_row(criterion, "")
136
-
137
- console.print(table)
@@ -1,24 +0,0 @@
1
- starbash/__init__.py,sha256=co39eIssQlFxWfO3cDhp52reRy6qEyJX5u5K8OsxiDk,138
2
- starbash/analytics.py,sha256=0TfiZthKRMqW38Jg1VJDjpykZXBrK33tNKuhQibkCK0,3579
3
- starbash/app.py,sha256=7GdznZHSxpsQ5ZrW0nPgvSEGAwgijfpbw2rINNU1hcU,16228
4
- starbash/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- starbash/commands/repo.py,sha256=UyfAD6A0fP8DV1uMRJz_NydDkP0UiHbxtceZ25_g7r8,4641
6
- starbash/commands/selection.py,sha256=gI6LSvs8CW5t2pW0peCLL5O87WqLkS9LDuaK2gI1NeM,4600
7
- starbash/commands/user.py,sha256=JpwYa9cYxm2gkekcxrj7CsbJO7fgbGwRxmjvpua0BOY,1598
8
- starbash/database.py,sha256=59u78srp3G4Ya0HOIP2qOokp2osQPFgUQM_8TbfIjPg,17936
9
- starbash/defaults/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- starbash/defaults/starbash.toml,sha256=WWM7igZ-GXk4bM7qSFtjHaVh7beqisCkeVBjs7c2G6I,1774
11
- starbash/main.py,sha256=8D4Xa0WwM3TDW-HkaQUTo79Uh8hAXgOJYyEEkUgC7HQ,5391
12
- starbash/paths.py,sha256=BKKnSXt3tOh16o7ljDcQLtWKIiepEmud9JFtzRwDHtg,1317
13
- starbash/repo/__init__.py,sha256=TqspuLjPSNnO38tvCGa0fJvvasgecHl6fE7m0-Lj8ho,148
14
- starbash/repo/manager.py,sha256=NRMGmDWt8KV8OdsrgPiuQ91EPi8xlSbVtOWGgSePuOk,10944
15
- starbash/selection.py,sha256=DPzUlls3n-sBqkwTUns2ZNaPi61PGnh7Z_ZQOC1jXYc,8347
16
- starbash/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- starbash/templates/userconfig.toml,sha256=eaBMgac4RCdvlGV6cKPqRuVyF_ijfkvEF-c3LJ6_euw,1440
18
- starbash/tool.py,sha256=S1kOTbeHTrA0meqwftgL0SA4VhJdZWWx2h1Wtwu1Izg,8749
19
- starbash/url.py,sha256=lorxQJ27jSfzsKCb0QvpcvLiPZG55Dkd_c1JPFbni4I,402
20
- starbash-0.1.3.dist-info/METADATA,sha256=zdFUMvEJQ8Aq28LTkcQDtvY_uu6G7Efy5w2FTH4IH_E,5295
21
- starbash-0.1.3.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
22
- starbash-0.1.3.dist-info/entry_points.txt,sha256=REQyWs8e5TJsNK7JVVWowKVoytMmKlUwuFHLTmSX4hc,67
23
- starbash-0.1.3.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
24
- starbash-0.1.3.dist-info/RECORD,,