starbash 0.2.7__tar.gz → 0.3.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.
- {starbash-0.2.7 → starbash-0.3.0}/PKG-INFO +41 -4
- {starbash-0.2.7 → starbash-0.3.0}/README.md +36 -3
- {starbash-0.2.7 → starbash-0.3.0}/pyproject.toml +11 -1
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/aliases.py +1 -1
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/analytics.py +5 -2
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/app.py +23 -26
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/commands/process.py +3 -1
- starbash-0.3.0/src/starbash/commands/publish.py +349 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/database.py +39 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/defaults/starbash.toml +69 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/doit.py +61 -1
- starbash-0.3.0/src/starbash/fits.py +36 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/main.py +6 -1
- starbash-0.3.0/src/starbash/parameters.py +166 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/paths.py +19 -1
- starbash-0.3.0/src/starbash/processed_target.py +430 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/processing.py +244 -13
- starbash-0.3.0/src/starbash/publish/__init__.py +5 -0
- starbash-0.3.0/src/starbash/publish/credentials.py +206 -0
- starbash-0.3.0/src/starbash/publish/github.py +214 -0
- starbash-0.3.0/src/starbash/publish/github_service.py +400 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/recipes/osc.py +120 -7
- starbash-0.3.0/src/starbash/report.py +151 -0
- starbash-0.3.0/src/starbash/siril/import_registration.py +173 -0
- starbash-0.3.0/src/starbash/stage_utils.py +119 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/stages.py +10 -11
- starbash-0.3.0/src/starbash/templates/report/README.md.jinja +21 -0
- starbash-0.3.0/src/starbash/templates/report/__init__.py +0 -0
- starbash-0.3.0/src/starbash/templates/report/default.html +60 -0
- starbash-0.3.0/src/starbash/templates/report/index.md.jinja +11 -0
- starbash-0.3.0/src/starbash/templates/report/target.md.jinja +40 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/templates/target/master.toml +3 -5
- starbash-0.3.0/src/starbash/templates/target/processed/about.toml +14 -0
- starbash-0.3.0/src/starbash/templates/target/processed/main.toml +22 -0
- starbash-0.3.0/src/starbash/templates/target/processed/sessions.toml +1 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/tool/__init__.py +2 -1
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/tool/base.py +18 -1
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/tool/rcastro.py +2 -2
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/tool/siril.py +1 -1
- starbash-0.3.0/src/starbash/tool/starnet.py +57 -0
- starbash-0.2.7/src/starbash/parameters.py +0 -175
- starbash-0.2.7/src/starbash/processed_target.py +0 -273
- starbash-0.2.7/src/starbash/stage_utils.py +0 -45
- starbash-0.2.7/src/starbash/templates/target/processed.toml +0 -52
- {starbash-0.2.7 → starbash-0.3.0}/LICENSE +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/__init__.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/check_version.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/commands/__init__.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/commands/info.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/commands/repo.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/commands/select.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/commands/user.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/defaults/__init__.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/doit_types.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/dwarf3.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/exception.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/filtering.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/icon.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/linux.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/os.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/processing_like.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/recipes/README.md +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/recipes/__init__.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/rich.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/safety.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/score.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/selection.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/sim_siril/__init__.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/sim_siril/connection.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/sim_siril/enums.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/sim_siril/utility.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/templates/__init__.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/templates/repo/master.toml +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/templates/repo/processed.toml +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/templates/userconfig.toml +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/toml.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/tool/context.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/tool/graxpert.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/tool/python.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/ui/main.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/url.py +0 -0
- {starbash-0.2.7 → starbash-0.3.0}/src/starbash/windows.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: starbash
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: A tool for automating/standardizing/sharing astrophotography workflows.
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Author: Kevin Hester
|
|
@@ -11,10 +11,14 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.13
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.14
|
|
13
13
|
Requires-Dist: astropy (>=7.1.1,<8.0.0)
|
|
14
|
+
Requires-Dist: click (>=8.0,<8.5)
|
|
14
15
|
Requires-Dist: doit (>=0.36.0,<0.37.0)
|
|
15
16
|
Requires-Dist: graxpert[cpuonly] (>=3.2.0a2,<4.0.0)
|
|
17
|
+
Requires-Dist: jinja2 (>=3.1,<4.0)
|
|
18
|
+
Requires-Dist: keyring (>=25.6,<26.0)
|
|
16
19
|
Requires-Dist: numpy (==2.2.6)
|
|
17
20
|
Requires-Dist: platformdirs (>=4.5.0,<5.0.0)
|
|
21
|
+
Requires-Dist: pygal (>=3.0,<4.0)
|
|
18
22
|
Requires-Dist: pyqt6 (>=6.10.1,<7.0.0)
|
|
19
23
|
Requires-Dist: restrictedpython (>=8.1,<9.0)
|
|
20
24
|
Requires-Dist: rich (>=14.2.0,<15.0.0)
|
|
@@ -37,8 +41,7 @@ Description-Content-Type: text/markdown
|
|
|
37
41
|
A tool for automating/standardizing/sharing astrophotography workflows.
|
|
38
42
|
|
|
39
43
|
## What is starbash?
|
|
40
|
-
|
|
41
|
-
<img src="https://raw.githubusercontent.com/geeksville/starbash/refs/heads/main/doc/img/icon.jpg" alt="Starbash: Astrophotography workflows simplified" width="30%" align="right" style="margin-bottom: 20px;">
|
|
44
|
+
<img src="https://raw.githubusercontent.com/geeksville/starbash/refs/heads/main/doc/icon/generated/web/icon-192.png" alt="Starbash: Astrophotography workflows simplified" width="30%" align="right" style="margin-bottom: 20px;">
|
|
42
45
|
|
|
43
46
|
* Automatic - with sensible defaults that you can change as needed. Just a few keystrokes to preprocess an entire repo of raw images.
|
|
44
47
|
* Easy - provides a 'seestar-like' autoprocessing all your sessions (by default). You can optionally do manual postprocessing with all this 'grunt work' preprocessing automated.
|
|
@@ -93,10 +96,14 @@ If you are interested in alpha-testing we ❤️ you. This README should have e
|
|
|
93
96
|
* Repos can be on the local disk or shared via HTTPS/GitHub/etc. This is particularly useful for recipe repos.
|
|
94
97
|
* [Graxpert](https://graxpert.com/) based [recipe stages](https://github.com/geeksville/starbash-recipes/tree/main/graxpert) added (support for Pixinsight-based recipes will probably be coming at some point...).
|
|
95
98
|
|
|
99
|
+
### From the alpha 3 (0.3.0) release (2026/08/31)
|
|
100
|
+
|
|
101
|
+
* Auto publish your finished images and workflow report to github-sites
|
|
102
|
+
|
|
96
103
|
## Features coming soon
|
|
97
104
|
|
|
98
105
|
* Recipe 'writers guide' documentation. Currently iterating based on usage reports 😄
|
|
99
|
-
* Support for mono-camera workflows (
|
|
106
|
+
* Support for mono-camera workflows (this alpha only includes osc recipes).
|
|
100
107
|
* The target report can be used to auto-generate a human-friendly 'postable/shareable' report about that image.
|
|
101
108
|
* Target reports are shareable so that you can request comments from others and others can rerender with different settings.
|
|
102
109
|
* Namespaces for recipes are disambiguated to be globally unique
|
|
@@ -194,6 +201,23 @@ If you don't want the automated processing you can still ask Starbash to prepare
|
|
|
194
201
|
|
|
195
202
|

|
|
196
203
|
|
|
204
|
+
### Fully extensible/repeatable/sharable workflows
|
|
205
|
+
|
|
206
|
+
Early user guide [here](doc/toml/guide.md).
|
|
207
|
+
|
|
208
|
+
### Publish a shareable website
|
|
209
|
+
|
|
210
|
+
Generate a local GitHub Pages-compatible site or publish processed targets to
|
|
211
|
+
your personal public `starbash-public` repository. The first time you run this command
|
|
212
|
+
it will walk you through creating a (free) account and signing into github:
|
|
213
|
+
|
|
214
|
+
```text
|
|
215
|
+
sb publish github # Publish to github
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
See the [GitHub publishing guide](doc/publish/github.md) for prerequisites,
|
|
219
|
+
preview instructions, authentication, and troubleshooting.
|
|
220
|
+
|
|
197
221
|
## Supported commands
|
|
198
222
|
|
|
199
223
|
### Repository Management
|
|
@@ -242,6 +266,8 @@ Starbash is a tool agnostic workflow manager. But it wouldn't be possible witho
|
|
|
242
266
|
|
|
243
267
|
* [Siril](https://siril.org/)
|
|
244
268
|
* [Graxpert](https://graxpert.com/) - for background and noise elimination
|
|
269
|
+
* [blur exterminator / noise exterminator](https://www.rc-astro.com/stand-alone-rc-astro-tools/)
|
|
270
|
+
* [starnet](https://starnetastro.com/cli-tools/) - for star removal
|
|
245
271
|
* [Python](https://www.python.org/) (you can add Python code to recipes if necessary)
|
|
246
272
|
|
|
247
273
|
## Credits
|
|
@@ -258,6 +284,17 @@ We accept pull-requests and enjoy discussing possible new development directions
|
|
|
258
284
|
|
|
259
285
|
[Click here](https://raw.githubusercontent.com/geeksville/starbash/refs/heads/main/doc/development.md) for the current work in progress developer docs. They will get better before our beta release...
|
|
260
286
|
|
|
287
|
+
## AI slop and development
|
|
288
|
+
|
|
289
|
+
I'm okay with using AI tools to help make code. In fact, I used them a fair amount so far on this project (one of my first experiments with not writing all my code 'by hand'). So far it has been pretty fun.
|
|
290
|
+
|
|
291
|
+
However, in some of my other open-source projects, I've seen the current hell PR management is becoming. So I'd **love** any code contributions y'all want to make (and I promise to be kind) but:
|
|
292
|
+
|
|
293
|
+
* Please only send in PRs **you** are willing to sign off as 'nicely written' (using your experience as an engineer). If your little AI buddy made something a bit ugly, please iterate with it first to make it not ugly.
|
|
294
|
+
* Send in PRs that are fairly 'atomic' (touch just the code they need to touch for one nicely defined feature or bug-fix)
|
|
295
|
+
* Only send in tested code you've run on real hardware (not just the simulator)
|
|
296
|
+
* If you are new at making software: no problem! We can talk in the pull-request and make it better.
|
|
297
|
+
|
|
261
298
|
## License
|
|
262
299
|
|
|
263
300
|
Copyright 2025 Kevin Hester, kevinh@geeksville.com.
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
A tool for automating/standardizing/sharing astrophotography workflows.
|
|
8
8
|
|
|
9
9
|
## What is starbash?
|
|
10
|
-
|
|
11
|
-
<img src="https://raw.githubusercontent.com/geeksville/starbash/refs/heads/main/doc/img/icon.jpg" alt="Starbash: Astrophotography workflows simplified" width="30%" align="right" style="margin-bottom: 20px;">
|
|
10
|
+
<img src="https://raw.githubusercontent.com/geeksville/starbash/refs/heads/main/doc/icon/generated/web/icon-192.png" alt="Starbash: Astrophotography workflows simplified" width="30%" align="right" style="margin-bottom: 20px;">
|
|
12
11
|
|
|
13
12
|
* Automatic - with sensible defaults that you can change as needed. Just a few keystrokes to preprocess an entire repo of raw images.
|
|
14
13
|
* Easy - provides a 'seestar-like' autoprocessing all your sessions (by default). You can optionally do manual postprocessing with all this 'grunt work' preprocessing automated.
|
|
@@ -63,10 +62,14 @@ If you are interested in alpha-testing we ❤️ you. This README should have e
|
|
|
63
62
|
* Repos can be on the local disk or shared via HTTPS/GitHub/etc. This is particularly useful for recipe repos.
|
|
64
63
|
* [Graxpert](https://graxpert.com/) based [recipe stages](https://github.com/geeksville/starbash-recipes/tree/main/graxpert) added (support for Pixinsight-based recipes will probably be coming at some point...).
|
|
65
64
|
|
|
65
|
+
### From the alpha 3 (0.3.0) release (2026/08/31)
|
|
66
|
+
|
|
67
|
+
* Auto publish your finished images and workflow report to github-sites
|
|
68
|
+
|
|
66
69
|
## Features coming soon
|
|
67
70
|
|
|
68
71
|
* Recipe 'writers guide' documentation. Currently iterating based on usage reports 😄
|
|
69
|
-
* Support for mono-camera workflows (
|
|
72
|
+
* Support for mono-camera workflows (this alpha only includes osc recipes).
|
|
70
73
|
* The target report can be used to auto-generate a human-friendly 'postable/shareable' report about that image.
|
|
71
74
|
* Target reports are shareable so that you can request comments from others and others can rerender with different settings.
|
|
72
75
|
* Namespaces for recipes are disambiguated to be globally unique
|
|
@@ -164,6 +167,23 @@ If you don't want the automated processing you can still ask Starbash to prepare
|
|
|
164
167
|
|
|
165
168
|

|
|
166
169
|
|
|
170
|
+
### Fully extensible/repeatable/sharable workflows
|
|
171
|
+
|
|
172
|
+
Early user guide [here](doc/toml/guide.md).
|
|
173
|
+
|
|
174
|
+
### Publish a shareable website
|
|
175
|
+
|
|
176
|
+
Generate a local GitHub Pages-compatible site or publish processed targets to
|
|
177
|
+
your personal public `starbash-public` repository. The first time you run this command
|
|
178
|
+
it will walk you through creating a (free) account and signing into github:
|
|
179
|
+
|
|
180
|
+
```text
|
|
181
|
+
sb publish github # Publish to github
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
See the [GitHub publishing guide](doc/publish/github.md) for prerequisites,
|
|
185
|
+
preview instructions, authentication, and troubleshooting.
|
|
186
|
+
|
|
167
187
|
## Supported commands
|
|
168
188
|
|
|
169
189
|
### Repository Management
|
|
@@ -212,6 +232,8 @@ Starbash is a tool agnostic workflow manager. But it wouldn't be possible witho
|
|
|
212
232
|
|
|
213
233
|
* [Siril](https://siril.org/)
|
|
214
234
|
* [Graxpert](https://graxpert.com/) - for background and noise elimination
|
|
235
|
+
* [blur exterminator / noise exterminator](https://www.rc-astro.com/stand-alone-rc-astro-tools/)
|
|
236
|
+
* [starnet](https://starnetastro.com/cli-tools/) - for star removal
|
|
215
237
|
* [Python](https://www.python.org/) (you can add Python code to recipes if necessary)
|
|
216
238
|
|
|
217
239
|
## Credits
|
|
@@ -228,6 +250,17 @@ We accept pull-requests and enjoy discussing possible new development directions
|
|
|
228
250
|
|
|
229
251
|
[Click here](https://raw.githubusercontent.com/geeksville/starbash/refs/heads/main/doc/development.md) for the current work in progress developer docs. They will get better before our beta release...
|
|
230
252
|
|
|
253
|
+
## AI slop and development
|
|
254
|
+
|
|
255
|
+
I'm okay with using AI tools to help make code. In fact, I used them a fair amount so far on this project (one of my first experiments with not writing all my code 'by hand'). So far it has been pretty fun.
|
|
256
|
+
|
|
257
|
+
However, in some of my other open-source projects, I've seen the current hell PR management is becoming. So I'd **love** any code contributions y'all want to make (and I promise to be kind) but:
|
|
258
|
+
|
|
259
|
+
* Please only send in PRs **you** are willing to sign off as 'nicely written' (using your experience as an engineer). If your little AI buddy made something a bit ugly, please iterate with it first to make it not ugly.
|
|
260
|
+
* Send in PRs that are fairly 'atomic' (touch just the code they need to touch for one nicely defined feature or bug-fix)
|
|
261
|
+
* Only send in tested code you've run on real hardware (not just the simulator)
|
|
262
|
+
* If you are new at making software: no problem! We can talk in the pull-request and make it better.
|
|
263
|
+
|
|
231
264
|
## License
|
|
232
265
|
|
|
233
266
|
Copyright 2025 Kevin Hester, kevinh@geeksville.com.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "starbash"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.0"
|
|
4
4
|
description = "A tool for automating/standardizing/sharing astrophotography workflows."
|
|
5
5
|
authors = ["Kevin Hester <kevinh@geeksville.com>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -21,10 +21,17 @@ restrictedpython = ">=8.1,<9.0"
|
|
|
21
21
|
astropy = ">=7.1.1,<8.0.0"
|
|
22
22
|
platformdirs = ">=4.5.0,<5.0.0"
|
|
23
23
|
typer = "^0.20.0"
|
|
24
|
+
# Typer 0.20.1 still imports Click's deprecated stream helpers. Click 8.5
|
|
25
|
+
# warns about those imports, so keep the compatible pre-8.5 release line until
|
|
26
|
+
# Typer removes that dependency on deprecated APIs.
|
|
27
|
+
click = ">=8.0,<8.5"
|
|
24
28
|
sentry-sdk = "^2.42.1"
|
|
25
29
|
update-checker = "^0.18.0"
|
|
26
30
|
doit = "^0.36.0"
|
|
27
31
|
textual = "^6.8.0"
|
|
32
|
+
jinja2 = ">=3.1,<4.0"
|
|
33
|
+
pygal = ">=3.0,<4.0"
|
|
34
|
+
keyring = ">=25.6,<26.0"
|
|
28
35
|
|
|
29
36
|
# Note: to use graxpert from the local tree rather than pypi use:
|
|
30
37
|
# graxpert = {path = "GraXpert", extras = ["cpuonly"], develop = true}
|
|
@@ -45,6 +52,9 @@ ruff = "^0.14.4"
|
|
|
45
52
|
basedpyright = "^1.33.0"
|
|
46
53
|
textual-dev = "^1.8.0"
|
|
47
54
|
|
|
55
|
+
# Adds the `graph` command to doit (GraphViz output) for `sb process doit graph`.
|
|
56
|
+
doit-graph = "^0.3.0"
|
|
57
|
+
|
|
48
58
|
# We don't currently use this text based sql client
|
|
49
59
|
# harlequin = "^2.4.1"
|
|
50
60
|
|
|
@@ -29,7 +29,7 @@ def normalize_target_name(name: str | None) -> str | None:
|
|
|
29
29
|
"""Converts a target name to an any filesystem-safe format by removing spaces and other noise"""
|
|
30
30
|
if name is None:
|
|
31
31
|
return None
|
|
32
|
-
return name.replace(" ", "").replace("(", "").replace(")", "").lower()
|
|
32
|
+
return name.replace("-", " ").replace(" ", "").replace("(", "").replace(")", "").lower()
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
def pre_normalize(name: str) -> str:
|
|
@@ -75,7 +75,6 @@ def analytics_shutdown() -> None:
|
|
|
75
75
|
|
|
76
76
|
def is_development_environment() -> bool:
|
|
77
77
|
"""Detect if running in a development environment."""
|
|
78
|
-
|
|
79
78
|
# Check for explicit environment variable
|
|
80
79
|
if os.getenv("SENTRY_ENVIRONMENT") == "development":
|
|
81
80
|
return True
|
|
@@ -139,7 +138,11 @@ class NopAnalytics:
|
|
|
139
138
|
|
|
140
139
|
|
|
141
140
|
def analytics_start_span(**kwargs: Any) -> Any:
|
|
142
|
-
"""Start an analytics/tracing span if analytics is enabled, otherwise return a no-op context manager.
|
|
141
|
+
"""Start an analytics/tracing span if analytics is enabled, otherwise return a no-op context manager.
|
|
142
|
+
|
|
143
|
+
arguments (example):
|
|
144
|
+
name="operation-name", op="category"
|
|
145
|
+
"""
|
|
143
146
|
if analytics_allowed:
|
|
144
147
|
import sentry_sdk
|
|
145
148
|
|
|
@@ -10,7 +10,6 @@ from typing import Any
|
|
|
10
10
|
|
|
11
11
|
import rich.console
|
|
12
12
|
import typer
|
|
13
|
-
from astropy.io import fits
|
|
14
13
|
from rich.logging import RichHandler
|
|
15
14
|
from rich.progress import track
|
|
16
15
|
from toml_repo import Repo, RepoManager, get_config_suffix
|
|
@@ -39,6 +38,7 @@ from starbash.database import (
|
|
|
39
38
|
)
|
|
40
39
|
from starbash.dwarf3 import extend_dwarf3_headers
|
|
41
40
|
from starbash.exception import NonSoftwareError, UserHandledError, raise_missing_repo
|
|
41
|
+
from starbash.fits import read_fits_header
|
|
42
42
|
from starbash.linux import linux_init
|
|
43
43
|
from starbash.os import symlink_or_copy
|
|
44
44
|
from starbash.paths import get_user_config_dir, get_user_config_path
|
|
@@ -719,31 +719,24 @@ class Starbash:
|
|
|
719
719
|
|
|
720
720
|
if not found or force:
|
|
721
721
|
# Read and log the primary header (HDU 0)
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
headers
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
headers["path"] = relative_path_str
|
|
741
|
-
if self._extend_image_header(headers, f):
|
|
742
|
-
image_doc_id = self.db.upsert_image(headers, repo.url)
|
|
743
|
-
headers[Database.ID_KEY] = image_doc_id
|
|
744
|
-
|
|
745
|
-
if not found: # allow a session to also be created
|
|
746
|
-
return headers
|
|
722
|
+
headers = read_fits_header(f)
|
|
723
|
+
if not whitelist:
|
|
724
|
+
headers = dict(headers)
|
|
725
|
+
else:
|
|
726
|
+
headers = {key: value for key, value in headers.items() if key in whitelist}
|
|
727
|
+
|
|
728
|
+
# Add any extra metadata if it was missing in the existing headers
|
|
729
|
+
for key, value in extra_metadata.items():
|
|
730
|
+
headers.setdefault(key, value)
|
|
731
|
+
|
|
732
|
+
# Store relative path in database (use POSIX-style forward slashes for consistency)
|
|
733
|
+
headers["path"] = relative_path_str
|
|
734
|
+
if self._extend_image_header(headers, f):
|
|
735
|
+
image_doc_id = self.db.upsert_image(headers, repo.url)
|
|
736
|
+
headers[Database.ID_KEY] = image_doc_id
|
|
737
|
+
|
|
738
|
+
if not found: # allow a session to also be created
|
|
739
|
+
return headers
|
|
747
740
|
|
|
748
741
|
return None
|
|
749
742
|
|
|
@@ -781,6 +774,10 @@ class Starbash:
|
|
|
781
774
|
all_files,
|
|
782
775
|
description=f"Indexing {repo.url}...",
|
|
783
776
|
):
|
|
777
|
+
if ".sbignore" in str(f):
|
|
778
|
+
logging.warning('Skipping "%s": path contains ".sbignore".', f)
|
|
779
|
+
continue
|
|
780
|
+
|
|
784
781
|
try:
|
|
785
782
|
# progress.console.print(f"Indexing {f}...")
|
|
786
783
|
if repo_kind == "master":
|
|
@@ -90,7 +90,7 @@ def siril(
|
|
|
90
90
|
else:
|
|
91
91
|
session_to_dir(candidates[0].candidate, subdir)
|
|
92
92
|
|
|
93
|
-
# FIXME put
|
|
93
|
+
# FIXME put a processed-target metadata file in output_dir (with info about what we picked/why)
|
|
94
94
|
# to allow users to override/reprocess with the same settings.
|
|
95
95
|
# Also FIXME, check for the existence of such a file
|
|
96
96
|
|
|
@@ -264,6 +264,8 @@ def doit(
|
|
|
264
264
|
from starbash import console
|
|
265
265
|
|
|
266
266
|
console.print("[red]This command is currently for developers only...[/red]")
|
|
267
|
+
# Build the full task tree so doit subcommands (graph/list/info) have data to show.
|
|
268
|
+
proc.load_tasks_for_inspection()
|
|
267
269
|
proc.doit.run(ctx.args)
|
|
268
270
|
|
|
269
271
|
|