starbash 0.1.0__tar.gz → 0.1.3__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.
Potentially problematic release.
This version of starbash might be problematic. Click here for more details.
- starbash-0.1.3/PKG-INFO +114 -0
- starbash-0.1.3/README.md +92 -0
- {starbash-0.1.0 → starbash-0.1.3}/pyproject.toml +6 -2
- starbash-0.1.3/src/starbash/analytics.py +121 -0
- starbash-0.1.3/src/starbash/app.py +413 -0
- starbash-0.1.3/src/starbash/commands/repo.py +133 -0
- starbash-0.1.3/src/starbash/commands/selection.py +137 -0
- starbash-0.1.3/src/starbash/commands/user.py +63 -0
- starbash-0.1.3/src/starbash/database.py +526 -0
- starbash-0.1.3/src/starbash/defaults/__init__.py +0 -0
- starbash-0.1.0/src/starbash/appdefaults.sb.toml → starbash-0.1.3/src/starbash/defaults/starbash.toml +5 -45
- starbash-0.1.3/src/starbash/main.py +156 -0
- starbash-0.1.3/src/starbash/paths.py +38 -0
- {starbash-0.1.0 → starbash-0.1.3}/src/starbash/repo/manager.py +129 -59
- starbash-0.1.3/src/starbash/selection.py +251 -0
- starbash-0.1.3/src/starbash/templates/__init__.py +0 -0
- starbash-0.1.3/src/starbash/templates/userconfig.toml +53 -0
- starbash-0.1.3/src/starbash/url.py +9 -0
- starbash-0.1.0/PKG-INFO +0 -82
- starbash-0.1.0/README.md +0 -62
- starbash-0.1.0/src/starbash/app.py +0 -228
- starbash-0.1.0/src/starbash/commands/repo.py +0 -51
- starbash-0.1.0/src/starbash/database.py +0 -75
- starbash-0.1.0/src/starbash/main.py +0 -27
- {starbash-0.1.0 → starbash-0.1.3}/LICENSE +0 -0
- {starbash-0.1.0 → starbash-0.1.3}/src/starbash/__init__.py +0 -0
- {starbash-0.1.0 → starbash-0.1.3}/src/starbash/commands/__init__.py +0 -0
- {starbash-0.1.0 → starbash-0.1.3}/src/starbash/repo/__init__.py +0 -0
- {starbash-0.1.0 → starbash-0.1.3}/src/starbash/tool.py +0 -0
starbash-0.1.3/PKG-INFO
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: starbash
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary:
|
|
5
|
+
License-File: LICENSE
|
|
6
|
+
Author: Kevin Hester
|
|
7
|
+
Author-email: kevinh@geeksville.com
|
|
8
|
+
Requires-Python: >=3.12,<3.15
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
13
|
+
Requires-Dist: astropy (>=7.1.1,<8.0.0)
|
|
14
|
+
Requires-Dist: multidict (>=6.7.0,<7.0.0)
|
|
15
|
+
Requires-Dist: platformdirs (>=4.5.0,<5.0.0)
|
|
16
|
+
Requires-Dist: restrictedpython (>=8.1,<9.0)
|
|
17
|
+
Requires-Dist: rich (>=14.2.0,<15.0.0)
|
|
18
|
+
Requires-Dist: sentry-sdk (>=2.42.1,<3.0.0)
|
|
19
|
+
Requires-Dist: tomlkit (>=0.13.3,<0.14.0)
|
|
20
|
+
Requires-Dist: typer (>=0.20.0,<0.21.0)
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# Starbash
|
|
24
|
+
|
|
25
|
+

|
|
26
|
+

|
|
27
|
+
|
|
28
|
+

|
|
29
|
+
|
|
30
|
+
A tool for automating/standardizing/sharing astrophotography workflows.
|
|
31
|
+
|
|
32
|
+
# Current status
|
|
33
|
+
|
|
34
|
+
Not quite ready 😊. But making good progress.
|
|
35
|
+
|
|
36
|
+
See the current [TODO](TODO.md) file for work items. I'll be looking for pre-alpha testers/feedback soon.
|
|
37
|
+
|
|
38
|
+
## Current features
|
|
39
|
+
|
|
40
|
+
* Automatically recognizes and auto-parses the default NINA, Asiair and Seestar raw file repos (adding support for other layouts is easy)
|
|
41
|
+
* Multisession support by default (including automatic selection of correct flats, biases and dark frames)
|
|
42
|
+
* 'Repos' can contain raw files, generated masters, preprocessed files, or recipes.
|
|
43
|
+
|
|
44
|
+
## Features coming soon
|
|
45
|
+
|
|
46
|
+
* Automatically performs **complete** preprocessing on OSC (broadband, narrowband or dual Duo filter), Mono (LRGB, SHO) data. i.e. give you 'seestar level' auto-preprocessing, so you only need to do the (optional) custom post-processing.
|
|
47
|
+
* Generates a per target report/config file which can be customized if the detected defaults or preprocessing are not what you want
|
|
48
|
+
* 'Recipes' provide repeatable/human-readable/sharable descriptions of all processing steps
|
|
49
|
+
* Repos can be on the local disk or shared via HTTPS/github/etc. This is particularly useful for recipe repos
|
|
50
|
+
* Uses Siril and Graxpert for its pre-processing operations (support for Pixinsight based recipies will probably be coming at some point...)
|
|
51
|
+
* The target report can be used to auto generate a human friendly 'postable/sharable' report about that image
|
|
52
|
+
* Target reports are sharable so that you can request comments by others and others can rerender with different settings
|
|
53
|
+
|
|
54
|
+
## Installing
|
|
55
|
+
|
|
56
|
+
Currently the easiest way to install this command-line based tool is to install is via [pipx](https://pipx.pypa.io/stable/). If you don't already have pipx and you have python installed, you can auto install it by running "pip install --user pipx." If you don't have python installed see the pipx link for pipx installers for any OS.
|
|
57
|
+
|
|
58
|
+
Once pipx is installed just run:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
pipx install starbash
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Supported commands
|
|
65
|
+
|
|
66
|
+
### Setup & Configuration
|
|
67
|
+
- `sb setup` - Configure starbash via a brief guided process
|
|
68
|
+
- `sb info` - Show user preferences location and other app info
|
|
69
|
+
|
|
70
|
+
### Repository Management
|
|
71
|
+
- `sb repo [--verbose]` - List installed repos (use `-v` for details)
|
|
72
|
+
- `sb repo add <filepath|URL>` - Add a repository
|
|
73
|
+
- `sb repo remove <REPONUM>` - Remove the indicated repo from the repo list
|
|
74
|
+
- `sb repo reindex [--force] [REPONUM]` - Reindex the specified repo (or all repos if none specified)
|
|
75
|
+
|
|
76
|
+
### User Preferences
|
|
77
|
+
- `sb user name "Your Name"` - Set name for attribution in generated images
|
|
78
|
+
- `sb user email "foo@example.com"` - Set email for attribution in generated images
|
|
79
|
+
- `sb user analytics <on|off>` - Turn analytics collection on/off
|
|
80
|
+
|
|
81
|
+
### Selection & Filtering
|
|
82
|
+
- `sb selection` - Show information about the current selection
|
|
83
|
+
- `sb selection any` - Remove all filters (select everything)
|
|
84
|
+
- `sb selection target <TARGETNAME>` - Limit selection to the named target
|
|
85
|
+
- `sb selection telescope <TELESCOPENAME>` - Limit selection to the named telescope
|
|
86
|
+
- `sb selection date <after|before|between> <DATE> [DATE]` - Limit to sessions in the specified date range
|
|
87
|
+
|
|
88
|
+
### Viewing Data
|
|
89
|
+
- `sb session` - List sessions (filtered based on the current selection)
|
|
90
|
+
- `sb target` - List targets (filtered based on the current selection)
|
|
91
|
+
- `sb instrument` - List instruments (filtered based on the current selection)
|
|
92
|
+
- `sb filter` - List all filters found in current selection
|
|
93
|
+
|
|
94
|
+
### Export & Processing
|
|
95
|
+
- `sb export <dirs|BIAS|LIGHT|DARK|FLAT> [DIRLOC]` - Export data
|
|
96
|
+
- `sb process siril` - Generate Siril directory tree and run Siril GUI
|
|
97
|
+
- `sb process auto` - Automatic processing
|
|
98
|
+
- `sb process masters` - Generate master flats, darks, and biases from available raw frames
|
|
99
|
+
|
|
100
|
+
## Supported tools (now)
|
|
101
|
+
|
|
102
|
+
* Siril
|
|
103
|
+
* Graxpert
|
|
104
|
+
* Python (you can add python code to recipies if necessary)
|
|
105
|
+
|
|
106
|
+
## Supported tools (future?)
|
|
107
|
+
|
|
108
|
+
* Pixinsight?
|
|
109
|
+
* Autostakkert?
|
|
110
|
+
|
|
111
|
+
## Developing
|
|
112
|
+
|
|
113
|
+
We try to make this project useful and friendly. If you find problems please file a github issue.
|
|
114
|
+
We accept pull-requests and enjoy discussing possible new development directions via github issues. If you might want to work on this, just describe what your interests are and we can talk about how to get it merged.
|
starbash-0.1.3/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Starbash
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+
|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
A tool for automating/standardizing/sharing astrophotography workflows.
|
|
9
|
+
|
|
10
|
+
# Current status
|
|
11
|
+
|
|
12
|
+
Not quite ready 😊. But making good progress.
|
|
13
|
+
|
|
14
|
+
See the current [TODO](TODO.md) file for work items. I'll be looking for pre-alpha testers/feedback soon.
|
|
15
|
+
|
|
16
|
+
## Current features
|
|
17
|
+
|
|
18
|
+
* Automatically recognizes and auto-parses the default NINA, Asiair and Seestar raw file repos (adding support for other layouts is easy)
|
|
19
|
+
* Multisession support by default (including automatic selection of correct flats, biases and dark frames)
|
|
20
|
+
* 'Repos' can contain raw files, generated masters, preprocessed files, or recipes.
|
|
21
|
+
|
|
22
|
+
## Features coming soon
|
|
23
|
+
|
|
24
|
+
* Automatically performs **complete** preprocessing on OSC (broadband, narrowband or dual Duo filter), Mono (LRGB, SHO) data. i.e. give you 'seestar level' auto-preprocessing, so you only need to do the (optional) custom post-processing.
|
|
25
|
+
* Generates a per target report/config file which can be customized if the detected defaults or preprocessing are not what you want
|
|
26
|
+
* 'Recipes' provide repeatable/human-readable/sharable descriptions of all processing steps
|
|
27
|
+
* Repos can be on the local disk or shared via HTTPS/github/etc. This is particularly useful for recipe repos
|
|
28
|
+
* Uses Siril and Graxpert for its pre-processing operations (support for Pixinsight based recipies will probably be coming at some point...)
|
|
29
|
+
* The target report can be used to auto generate a human friendly 'postable/sharable' report about that image
|
|
30
|
+
* Target reports are sharable so that you can request comments by others and others can rerender with different settings
|
|
31
|
+
|
|
32
|
+
## Installing
|
|
33
|
+
|
|
34
|
+
Currently the easiest way to install this command-line based tool is to install is via [pipx](https://pipx.pypa.io/stable/). If you don't already have pipx and you have python installed, you can auto install it by running "pip install --user pipx." If you don't have python installed see the pipx link for pipx installers for any OS.
|
|
35
|
+
|
|
36
|
+
Once pipx is installed just run:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
pipx install starbash
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Supported commands
|
|
43
|
+
|
|
44
|
+
### Setup & Configuration
|
|
45
|
+
- `sb setup` - Configure starbash via a brief guided process
|
|
46
|
+
- `sb info` - Show user preferences location and other app info
|
|
47
|
+
|
|
48
|
+
### Repository Management
|
|
49
|
+
- `sb repo [--verbose]` - List installed repos (use `-v` for details)
|
|
50
|
+
- `sb repo add <filepath|URL>` - Add a repository
|
|
51
|
+
- `sb repo remove <REPONUM>` - Remove the indicated repo from the repo list
|
|
52
|
+
- `sb repo reindex [--force] [REPONUM]` - Reindex the specified repo (or all repos if none specified)
|
|
53
|
+
|
|
54
|
+
### User Preferences
|
|
55
|
+
- `sb user name "Your Name"` - Set name for attribution in generated images
|
|
56
|
+
- `sb user email "foo@example.com"` - Set email for attribution in generated images
|
|
57
|
+
- `sb user analytics <on|off>` - Turn analytics collection on/off
|
|
58
|
+
|
|
59
|
+
### Selection & Filtering
|
|
60
|
+
- `sb selection` - Show information about the current selection
|
|
61
|
+
- `sb selection any` - Remove all filters (select everything)
|
|
62
|
+
- `sb selection target <TARGETNAME>` - Limit selection to the named target
|
|
63
|
+
- `sb selection telescope <TELESCOPENAME>` - Limit selection to the named telescope
|
|
64
|
+
- `sb selection date <after|before|between> <DATE> [DATE]` - Limit to sessions in the specified date range
|
|
65
|
+
|
|
66
|
+
### Viewing Data
|
|
67
|
+
- `sb session` - List sessions (filtered based on the current selection)
|
|
68
|
+
- `sb target` - List targets (filtered based on the current selection)
|
|
69
|
+
- `sb instrument` - List instruments (filtered based on the current selection)
|
|
70
|
+
- `sb filter` - List all filters found in current selection
|
|
71
|
+
|
|
72
|
+
### Export & Processing
|
|
73
|
+
- `sb export <dirs|BIAS|LIGHT|DARK|FLAT> [DIRLOC]` - Export data
|
|
74
|
+
- `sb process siril` - Generate Siril directory tree and run Siril GUI
|
|
75
|
+
- `sb process auto` - Automatic processing
|
|
76
|
+
- `sb process masters` - Generate master flats, darks, and biases from available raw frames
|
|
77
|
+
|
|
78
|
+
## Supported tools (now)
|
|
79
|
+
|
|
80
|
+
* Siril
|
|
81
|
+
* Graxpert
|
|
82
|
+
* Python (you can add python code to recipies if necessary)
|
|
83
|
+
|
|
84
|
+
## Supported tools (future?)
|
|
85
|
+
|
|
86
|
+
* Pixinsight?
|
|
87
|
+
* Autostakkert?
|
|
88
|
+
|
|
89
|
+
## Developing
|
|
90
|
+
|
|
91
|
+
We try to make this project useful and friendly. If you find problems please file a github issue.
|
|
92
|
+
We accept pull-requests and enjoy discussing possible new development directions via github issues. If you might want to work on this, just describe what your interests are and we can talk about how to get it merged.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "starbash"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.3"
|
|
4
4
|
description = ""
|
|
5
5
|
authors = ["Kevin Hester <kevinh@geeksville.com>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -13,9 +13,9 @@ multidict = ">=6.7.0,<7.0.0"
|
|
|
13
13
|
rich = ">=14.2.0,<15.0.0"
|
|
14
14
|
restrictedpython = ">=8.1,<9.0"
|
|
15
15
|
astropy = ">=7.1.1,<8.0.0"
|
|
16
|
-
tinydb = ">=4.8.2,<5.0.0"
|
|
17
16
|
platformdirs = ">=4.5.0,<5.0.0"
|
|
18
17
|
typer = "^0.20.0"
|
|
18
|
+
sentry-sdk = "^2.42.1"
|
|
19
19
|
|
|
20
20
|
[tool.poetry.group.dev.dependencies]
|
|
21
21
|
pytest = ">=8.4.2,<9.0.0"
|
|
@@ -24,6 +24,10 @@ pytest = ">=8.4.2,<9.0.0"
|
|
|
24
24
|
starbash = "starbash.main:app"
|
|
25
25
|
sb = "starbash.main:app" # std alias for convenience
|
|
26
26
|
|
|
27
|
+
[tool.pytest.ini_options]
|
|
28
|
+
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]
|
|
29
|
+
addopts = "-m 'not slow'"
|
|
30
|
+
|
|
27
31
|
[build-system]
|
|
28
32
|
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
|
29
33
|
build-backend = "poetry.core.masonry.api"
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
|
|
3
|
+
from starbash import console
|
|
4
|
+
import starbash.url as url
|
|
5
|
+
|
|
6
|
+
# Default to no analytics/auto crash reports
|
|
7
|
+
analytics_allowed = False
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def analytics_setup(allowed: bool = False, user_email: str | None = None) -> None:
|
|
11
|
+
import sentry_sdk
|
|
12
|
+
|
|
13
|
+
global analytics_allowed
|
|
14
|
+
analytics_allowed = allowed
|
|
15
|
+
if analytics_allowed:
|
|
16
|
+
logging.info(
|
|
17
|
+
f"Analytics/crash-reports enabled. To change [link={url.analytics_docs}]click here[/link]",
|
|
18
|
+
extra={"markup": True},
|
|
19
|
+
)
|
|
20
|
+
sentry_sdk.init(
|
|
21
|
+
dsn="https://e9496a4ea8b37a053203a2cbc10d64e6@o209837.ingest.us.sentry.io/4510264204132352",
|
|
22
|
+
send_default_pii=True,
|
|
23
|
+
enable_logs=True,
|
|
24
|
+
traces_sample_rate=1.0,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
if user_email:
|
|
28
|
+
sentry_sdk.set_user({"email": user_email})
|
|
29
|
+
else:
|
|
30
|
+
logging.info(
|
|
31
|
+
f"Analytics/crash-reports disabled. To learn more [link={url.analytics_docs}]click here[/link]",
|
|
32
|
+
extra={"markup": True},
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def analytics_shutdown() -> None:
|
|
37
|
+
"""Shut down the analytics service, if enabled."""
|
|
38
|
+
if analytics_allowed:
|
|
39
|
+
import sentry_sdk
|
|
40
|
+
|
|
41
|
+
sentry_sdk.flush()
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def is_development_environment() -> bool:
|
|
45
|
+
"""Detect if running in a development environment."""
|
|
46
|
+
import os
|
|
47
|
+
import sys
|
|
48
|
+
from pathlib import Path
|
|
49
|
+
|
|
50
|
+
# Check for explicit environment variable
|
|
51
|
+
if os.getenv("STARBASH_ENV") == "development":
|
|
52
|
+
return True
|
|
53
|
+
|
|
54
|
+
# Check if running under VS Code
|
|
55
|
+
if any(k.startswith("VSCODE_") for k in os.environ):
|
|
56
|
+
return True
|
|
57
|
+
|
|
58
|
+
return False
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def analytics_exception(exc: Exception) -> bool:
|
|
62
|
+
"""Report an exception to the analytics service, if enabled.
|
|
63
|
+
return True to suppress exception propagation/log messages"""
|
|
64
|
+
|
|
65
|
+
if is_development_environment():
|
|
66
|
+
return False # We want to let devs see full exception traces
|
|
67
|
+
|
|
68
|
+
if analytics_allowed:
|
|
69
|
+
import sentry_sdk
|
|
70
|
+
|
|
71
|
+
report_id = sentry_sdk.capture_exception(exc)
|
|
72
|
+
|
|
73
|
+
logging.info(
|
|
74
|
+
f"""An unexpected error has occurred and been reported. Thank you for your help.
|
|
75
|
+
If you'd like to chat with the devs about it, please click
|
|
76
|
+
[link={url.new_issue(str(report_id))}]here[/link] to open an issue.""",
|
|
77
|
+
extra={"markup": True},
|
|
78
|
+
)
|
|
79
|
+
else:
|
|
80
|
+
logging.error(
|
|
81
|
+
f"""An unexpected error has occurred. Automated crash reporting is disabled,
|
|
82
|
+
but we encourage you to contact the developers
|
|
83
|
+
at [link={url.new_issue()}]here[/link] and we will try to help.
|
|
84
|
+
|
|
85
|
+
The full exception is: {exc}""",
|
|
86
|
+
extra={"markup": True},
|
|
87
|
+
)
|
|
88
|
+
return True
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class NopAnalytics:
|
|
92
|
+
"""Used when users have disabled analytics/crash reporting."""
|
|
93
|
+
|
|
94
|
+
def __enter__(self):
|
|
95
|
+
return self
|
|
96
|
+
|
|
97
|
+
def __exit__(self, exc_type, exc_value, traceback):
|
|
98
|
+
return False
|
|
99
|
+
|
|
100
|
+
def set_data(self, key, value):
|
|
101
|
+
pass
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def analytics_start_span(**kwargs):
|
|
105
|
+
"""Start an analytics/tracing span if analytics is enabled, otherwise return a no-op context manager."""
|
|
106
|
+
if analytics_allowed:
|
|
107
|
+
import sentry_sdk
|
|
108
|
+
|
|
109
|
+
return sentry_sdk.start_span(**kwargs)
|
|
110
|
+
else:
|
|
111
|
+
return NopAnalytics()
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def analytics_start_transaction(**kwargs):
|
|
115
|
+
"""Start an analytics/tracing transaction if analytics is enabled, otherwise return a no-op context manager."""
|
|
116
|
+
if analytics_allowed:
|
|
117
|
+
import sentry_sdk
|
|
118
|
+
|
|
119
|
+
return sentry_sdk.start_transaction(**kwargs)
|
|
120
|
+
else:
|
|
121
|
+
return NopAnalytics()
|