starplot 0.18.1__py2.py3-none-any.whl → 0.18.3__py2.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.
starplot/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """Star charts and maps of the sky"""
2
2
 
3
- __version__ = "0.18.1"
3
+ __version__ = "0.18.3"
4
4
 
5
5
  from .base import BasePlot # noqa: F401
6
6
  from .map import MapPlot # noqa: F401
starplot/cli.py CHANGED
@@ -1,14 +1,14 @@
1
1
  import sys
2
2
 
3
3
  from starplot.styles import fonts
4
+ from starplot.config import settings
5
+ from starplot.data import db
6
+ from starplot.data.catalogs import download_all_catalogs
4
7
 
5
8
  COMMANDS = ["setup"]
6
9
 
7
10
 
8
11
  def setup(options):
9
- from starplot.config import settings
10
- from starplot.data import db, bigsky
11
-
12
12
  print("Installing DuckDB spatial extension...")
13
13
 
14
14
  con = db.connect()
@@ -16,11 +16,8 @@ def setup(options):
16
16
 
17
17
  fonts.load()
18
18
 
19
- print(f"Installed to: {settings.data_path}")
20
-
21
- if "--install-big-sky" in options:
22
- bigsky.download_if_not_exists()
23
- print(f"Big Sky Catalog downloaded and installed to: {settings.download_path}")
19
+ print(f"Downloading data catalogs to: {settings.data_path}")
20
+ download_all_catalogs()
24
21
 
25
22
 
26
23
  def main():
starplot/config.py CHANGED
@@ -54,6 +54,7 @@ class Settings:
54
54
  Supported values:
55
55
 
56
56
  - `en-us` = English (default)
57
+ - `es` = Spanish
57
58
  - `fa` = Persian (Farsi). Make sure you have a Persian font installed that supports RTL (such as [Vazir](https://github.com/rastikerdar/vazir-font) or [Noto Sans Arabic](https://fonts.google.com/noto/specimen/Noto+Sans+Arabic)) and set it as the font in your plot's style.
58
59
  - `fr` = French
59
60
  - `lt` = Lithuanian
Binary file
@@ -46,6 +46,50 @@ LABELS = {
46
46
  "w": "w",
47
47
  "milky way": "milky way",
48
48
  },
49
+ "es": {
50
+ "star": "estrella",
51
+ "deep sky object": "objeto de cielo profundo",
52
+ "open cluster": "cúmulo abierto",
53
+ "globular cluster": "cúmulo globular",
54
+ "nebula": "nebulosa",
55
+ "galaxy": "galaxia",
56
+ "dark nebula": "nebulosa oscura",
57
+ "association of stars": "asociación estelar",
58
+ "double star": "estrella doble",
59
+ "emission nebula": "nebulosa de emisión",
60
+ "galaxy pair": "galaxia doble",
61
+ "galaxy triplet": "galaxia triple",
62
+ "galaxy cluster": "cúmulo de galaxias",
63
+ "group of galaxies": "grupo de galaxias",
64
+ "hii ionized region": "región ionizada hii",
65
+ "nova star": "estrella nova",
66
+ "planetary nebula": "nebulosa planetaria",
67
+ "reflection nebula": "nebulosa de reflexión",
68
+ "star cluster nebula": "nebulosa de cúmulo abierto",
69
+ "supernova remnant": "remanente de supernova",
70
+ "unknown": "desconocido",
71
+ "mercury": "mercurio",
72
+ "venus": "venus",
73
+ "mars": "marte",
74
+ "jupiter": "júpiter",
75
+ "saturn": "saturno",
76
+ "uranus": "urano",
77
+ "neptune": "neptuno",
78
+ "pluto": "plutón",
79
+ "sun": "sol",
80
+ "moon": "luna",
81
+ "north": "norte",
82
+ "east": "este",
83
+ "south": "sur",
84
+ "west": "oeste",
85
+ "ecliptic": "eclíptica",
86
+ "celestial equator": "ecuador celeste",
87
+ "n": "n",
88
+ "e": "e",
89
+ "s": "s",
90
+ "w": "o",
91
+ "milky way": "vía láctea",
92
+ },
49
93
  "fr": {
50
94
  "legend": "légende",
51
95
  "star magnitude": "magnitude des étoiles",
@@ -284,6 +328,7 @@ LABELS = {
284
328
 
285
329
  LANGUAGES = [
286
330
  "en-us",
331
+ "es",
287
332
  "fa",
288
333
  "fr",
289
334
  "lt",
starplot/styles/base.py CHANGED
@@ -90,7 +90,7 @@ class FontWeightEnum(int, Enum):
90
90
 
91
91
  THIN = 100
92
92
  EXTRA_LIGHT = 200
93
- LIGHT = 300
93
+ # LIGHT = 300 # matplotlib's font dict doesn't have 300?
94
94
  NORMAL = 400
95
95
  MEDIUM = 500
96
96
  SEMI_BOLD = 600
@@ -98,6 +98,20 @@ class FontWeightEnum(int, Enum):
98
98
  EXTRA_BOLD = 800
99
99
  HEAVY = 900
100
100
 
101
+ def as_matplot(self) -> str:
102
+ """Returns the font weight as a matplotlib string, which avoids a bug with integer font weights and rendering text as elements in SVG."""
103
+ return {
104
+ FontWeightEnum.THIN: "ultralight",
105
+ FontWeightEnum.EXTRA_LIGHT: "light", # matplotlib maps 'light' to 200, which is really extra light
106
+ # FontWeightEnum.LIGHT: "light",
107
+ FontWeightEnum.NORMAL: "normal",
108
+ FontWeightEnum.MEDIUM: "medium",
109
+ FontWeightEnum.SEMI_BOLD: "semibold",
110
+ FontWeightEnum.BOLD: "bold",
111
+ FontWeightEnum.EXTRA_BOLD: "extra bold",
112
+ FontWeightEnum.HEAVY: "black",
113
+ }[self.value]
114
+
101
115
 
102
116
  class FontStyleEnum(str, Enum):
103
117
  NORMAL = "normal"
@@ -598,7 +612,7 @@ class LabelStyle(BaseStyle):
598
612
  fontsize=self.font_size * scale,
599
613
  fontstyle=self.font_style,
600
614
  fontname=self.font_name,
601
- weight=self.font_weight,
615
+ weight=FontWeightEnum(self.font_weight).as_matplot(),
602
616
  alpha=self.font_alpha,
603
617
  zorder=self.zorder,
604
618
  )
@@ -744,7 +758,7 @@ class LegendStyle(BaseStyle):
744
758
  framealpha=self.background_alpha,
745
759
  prop={
746
760
  "family": self.font_name,
747
- "weight": self.font_weight,
761
+ "weight": FontWeightEnum(self.font_weight),
748
762
  "size": self.font_size * scale,
749
763
  },
750
764
  labelcolor=self.font_color.as_hex(),
@@ -858,7 +872,7 @@ class PlotStyle(BaseStyle):
858
872
 
859
873
  bayer_labels: LabelStyle = LabelStyle(
860
874
  font_size=21,
861
- font_weight=FontWeightEnum.LIGHT,
875
+ font_weight=FontWeightEnum.EXTRA_LIGHT,
862
876
  font_name="GFS Didot",
863
877
  zorder=ZOrderEnum.LAYER_4,
864
878
  anchor_point=AnchorPointEnum.TOP_LEFT,
@@ -1158,7 +1172,7 @@ class PlotStyle(BaseStyle):
1158
1172
  label=LabelStyle(
1159
1173
  font_size=22,
1160
1174
  font_color="#999",
1161
- font_weight=FontWeightEnum.LIGHT,
1175
+ font_weight=FontWeightEnum.EXTRA_LIGHT,
1162
1176
  font_alpha=0.65,
1163
1177
  zorder=ZOrderEnum.LAYER_3,
1164
1178
  ),
@@ -52,7 +52,7 @@ constellation_lines:
52
52
  alpha: 0.3
53
53
  color: hsl(48, 80%, 14%)
54
54
  constellation_labels:
55
- font_weight: 300
55
+ font_weight: 200
56
56
  font_color: hsl(60, 3%, 52%)
57
57
  font_alpha: 0.46
58
58
  font_name: "serif"
@@ -77,7 +77,7 @@ gridlines:
77
77
  font_alpha: 0.8
78
78
  font_color: hsl(60, 3%, 92%)
79
79
  font_size: 8
80
- font_weight: 300
80
+ font_weight: 200
81
81
  line:
82
82
  alpha: 0.6
83
83
  color: hsl(68, 11%, 71%)
@@ -45,7 +45,6 @@ constellation_lines:
45
45
  constellation_labels:
46
46
  font_alpha: 0.37
47
47
  font_color: hsl(209, 23%, 80%)
48
- font_weight: 300
49
48
  constellation_borders:
50
49
  width: 2
51
50
  color: hsl(209, 50%, 74%)
@@ -24,7 +24,7 @@ celestial_equator:
24
24
  constellation:
25
25
  label:
26
26
  font_size: 4
27
- font_weight: 300
27
+ font_weight: 200
28
28
  font_color: '#8c8c8c'
29
29
  font_alpha: 0.1
30
30
  line:
@@ -51,7 +51,7 @@ gridlines:
51
51
  font_alpha: 1
52
52
  font_color: hsl(211, 80%, 97%)
53
53
  font_size: 18
54
- font_weight: 300
54
+ font_weight: 200
55
55
  line:
56
56
  alpha: 0.4
57
57
  color: '#888'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: starplot
3
- Version: 0.18.1
3
+ Version: 0.18.3
4
4
  Summary: Star charts and maps of the sky
5
5
  Keywords: astronomy,stars,charts,maps,constellations,sky,plotting
6
6
  Author-email: Steve Berardi <hello@steveberardi.com>
@@ -11,6 +11,7 @@ Classifier: Programming Language :: Python :: 3.10
11
11
  Classifier: Programming Language :: Python :: 3.11
12
12
  Classifier: Programming Language :: Python :: 3.12
13
13
  Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Framework :: Matplotlib
14
15
  License-File: LICENSE
15
16
  Requires-Dist: matplotlib >= 3.8.0
16
17
  Requires-Dist: numpy >= 1.26.2
@@ -39,7 +40,7 @@ Project-URL: Source, https://github.com/steveberardi/starplot
39
40
  ![License](https://img.shields.io/github/license/steveberardi/starplot?style=for-the-badge&color=8b63b0)
40
41
  ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/steveberardi/starplot/test.yml?style=for-the-badge&color=88b063)
41
42
 
42
- **Starplot** is a Python library for creating star charts and maps of the sky.
43
+ **Starplot** is a Python library for creating star charts and maps of the sky
43
44
 
44
45
  - 🗺️ **Maps** - including 10+ customizable projections
45
46
  - ⭐ **Zenith Charts** - shows the entire sky at a specific time and place
@@ -52,7 +53,7 @@ Project-URL: Source, https://github.com/steveberardi/starplot
52
53
  - 🚀 **Data Backend** - powered by DuckDB + Ibis for fast object lookup
53
54
  - 📓 **Custom Data Catalogs** - with helpers for building and optimizing
54
55
  - 🧭 **Label Collision Avoidance** - ensuring all labels are readable
55
- - 🌐 **Localization** - label translations for French, Chinese, and Persian (coming soon!)
56
+ - 🌐 **Localization** - label translations for Chinese, French, Lithuanian, Persian, and Spanish
56
57
 
57
58
  ## Examples
58
59
  *Zenith chart of the stars from a specific time/location:*
@@ -1,8 +1,8 @@
1
- starplot/__init__.py,sha256=p6yKQxk7MH9XKsrtyOnLaPcR6EzEQ5Z0WQdVN0T1OP0,1301
1
+ starplot/__init__.py,sha256=c3-3p6r1LF5cA64d6gUrrCDY16acOzy0Of3peyD3o3k,1301
2
2
  starplot/base.py,sha256=dR6rhNT8AUvPlbRKzKiL0n4YA59QDS7ZnZcAW6e9PjM,42538
3
3
  starplot/callables.py,sha256=k8Ra0nmNfc8vjOpNPdQfAqpNaM2ajCPB3XkgzCqrcQ0,4039
4
- starplot/cli.py,sha256=qJSzagBBPIw0Vy1x_ifV2fWL_iKcT31CgAiqiL-xd60,706
5
- starplot/config.py,sha256=Y42n5uJ73zH6_urXbPt9OgzBTxBQEFyy4_Q4bKoImww,2479
4
+ starplot/cli.py,sha256=Tjkc_5khvb1mL_Ai_met__zViINvtL4SgbYc0_mB2_U,622
5
+ starplot/config.py,sha256=Rz2USH1ETFi61USSuxTFSh-K-u_8-vOn6bL97Nbzde8,2500
6
6
  starplot/coordinates.py,sha256=7LDz32VTKa8H-4F67-XvzmjpcTVojZwYVJzXZkBaZ3U,136
7
7
  starplot/geod.py,sha256=pVnDr-yxGjOIXwKCknbtCZiRle5IqRnqpY43s0PMnmA,2574
8
8
  starplot/geometry.py,sha256=qU8OVIchzGe7-F7X6cynVaZFknOuPeYRAjRfaZjRc1Y,6715
@@ -22,13 +22,13 @@ starplot/data/db.py,sha256=AZ-q_bqnxs1i2NacLWBbqam6M5JYa3Ie2tXeMIOEKY8,778
22
22
  starplot/data/dsos.py,sha256=8rp_Heme3bYFFWUuAPlWMHlfzsMsZ2W_Lq2jwgSWlQ8,2377
23
23
  starplot/data/ecliptic.py,sha256=Qre9YdFbTC9mAx-vd2C0Ou4CsnRehIScnTpmEUDDYcM,4638
24
24
  starplot/data/stars.py,sha256=C8U29m6pW8L6jwyFqDU1mQgfzeBZjme7OrgYCQ-8ghU,2390
25
- starplot/data/translations.py,sha256=elYgp3GsY6UU2zVj-u-xJ5x8W618efKvm4m3U0hw85A,10396
25
+ starplot/data/translations.py,sha256=qFf4yRjZYfBM0GwZxAxAv7n8Q6VqkIpzT5LUeBUkfLc,11942
26
26
  starplot/data/utils.py,sha256=W2Su63PA_tKbpCkKAAdjwhBpgiq6hYkCEAVz4cC1y7k,978
27
- starplot/data/library/constellation_names.parquet,sha256=HhNAHFM_yVI3MUycrSZd7k-f7LFPHFBBQQl5kU3J1MY,12010
28
- starplot/data/library/dso_names.parquet,sha256=0XTDcV57lcxU_wl7V0Uh82RPNa33xwI3YlviVfU0Z2c,21675
27
+ starplot/data/library/constellation_names.parquet,sha256=ol_pv7FJTbDzsac-gWrXH3URijlDbCBgZrREmmDrn9w,13412
28
+ starplot/data/library/dso_names.parquet,sha256=BRHfI9HTJW1jiOkPnVkvj7EJejZKaTgUp22uU__0Ee8,24541
29
29
  starplot/data/library/readme.md,sha256=sJyJ1EkC5lcwLbvhTF96XlVa8tC6HyuXWWRooMyRNLA,68
30
30
  starplot/data/library/sky.db,sha256=E4uB7NLPGF3wrOgHbBuWMlVZ7qvox70Yd3yhytJqlQA,1585152
31
- starplot/data/library/star_designations.parquet,sha256=GL-1Q-PvMAsfovmjijW-AQc2HRyYYdz28uby9sHMaSk,64972
31
+ starplot/data/library/star_designations.parquet,sha256=WJLiv73VoVfptWT1oK1zzgio5UdGd_ebuy2Ew1-M9xQ,70170
32
32
  starplot/models/__init__.py,sha256=qQqlYH5vJQrs017gd7hOg4J1EDCav73cLUJWn72ooBM,414
33
33
  starplot/models/base.py,sha256=wIoxP96wPc8glIFUgFhSeCtzU_pz597vWBdveqSoBNY,2175
34
34
  starplot/models/comet.py,sha256=pG_yNVmWCNCaAEZGhAoeRtDe8FaDKWmsqt9-6BCicUo,11210
@@ -52,19 +52,19 @@ starplot/plotters/legend.py,sha256=PwqhSQkYsxPNLMabL0Ox5eo0F3jMS4Ekhm2aHaHS3W4,8
52
52
  starplot/plotters/milkyway.py,sha256=WpWwHefSHE2bDI_vTve-tbma31kk1CIGOp1ukLy-BiE,1189
53
53
  starplot/plotters/stars.py,sha256=_J1xLEc7huRkN-sur4IMq_dPLc0iH67QjGJGcG78wKk,12215
54
54
  starplot/styles/__init__.py,sha256=rtwzAylENUGIYGDPl106RGjU6e89yNURoxmPD3I_HM0,193
55
- starplot/styles/base.py,sha256=51l1W_VFVQREvG3zcS_VdKE0YjvZHnJKlZAj7zlTVxo,40596
55
+ starplot/styles/base.py,sha256=O1A-gDWH5pnZwx4dAPZCF2nGuKNm_pUIzL0Jg_U7G_Y,41400
56
56
  starplot/styles/extensions.py,sha256=qVNE9DaSvG8BPr6vPfT8v5vyZNBYB0AjkR-e9oPMk1I,2707
57
57
  starplot/styles/fonts.py,sha256=wC3cHuFkBUaZM5fKpT_ExV7anrRKMJX46mjEfcSRQMU,379
58
58
  starplot/styles/helpers.py,sha256=AGgHWaHLzJZ6jicvwPzY-p5oSHE0H8gDk1raCmeRFtg,3032
59
59
  starplot/styles/markers.py,sha256=gEkKBXP2wL3_GA2skIwg3TP86MnmZqDtbrL3OtEq1lk,9135
60
- starplot/styles/ext/antique.yml,sha256=bqreoibhMF8S2P2jvnAws1-Kjihgh9WdSUJqieGWJ38,3238
61
- starplot/styles/ext/blue_dark.yml,sha256=ZlH5sAFwszGXCMvqzmMXPgRDHNcl1KU5Pv3uJMCWRHs,2973
60
+ starplot/styles/ext/antique.yml,sha256=giqkr1hwtg3gw4cYcaWhqmrxazi_ud4P7XRCp14KUVU,3238
61
+ starplot/styles/ext/blue_dark.yml,sha256=aUMqTdw0es3pU68pJYmiW17QFB7Wtm3MPUEx31zDV6w,2954
62
62
  starplot/styles/ext/blue_gold.yml,sha256=0zJzOgzyGfdE3UcCHDp7fZS20XggAaWiTT_VyF7WBNs,2657
63
63
  starplot/styles/ext/blue_light.yml,sha256=dZGpLRn5I528L4AJSEev4MQnQbMHE3FV6WLrQvASFew,2079
64
64
  starplot/styles/ext/blue_medium.yml,sha256=zv99FJTwSpGVyfXFZZ65mmo9TNnxTDZXvWAgJVILhsQ,2468
65
65
  starplot/styles/ext/blue_night.yml,sha256=fb54olTsUEOBpI-bV1gYz4QH7s89t0WDuaZi8f8lWno,3166
66
66
  starplot/styles/ext/cb_wong.yml,sha256=AGPXaEgaiqcC-EEDo1iGsl2-knWEubPsmK1VZyfoZjM,2335
67
- starplot/styles/ext/color_print.yml,sha256=XOfQ2VNIi3zYrpZSuY4QVzm7QJmYdUJIU9sy-fu4Bvk,1808
67
+ starplot/styles/ext/color_print.yml,sha256=mWzBvA4dagGOvpqhM914zUEpfYZX6WrRHlk72nKyLOU,1808
68
68
  starplot/styles/ext/gradient_presets.yml,sha256=VIDwo1-y75AWcdI2UerzHsU9sqEH9kuAltsgvfZO8dw,3238
69
69
  starplot/styles/ext/grayscale.yml,sha256=t22oeFZMEomUC9k-JxXSCS4UGKqhhsq81XQt8q8kPcM,1303
70
70
  starplot/styles/ext/grayscale_dark.yml,sha256=x8qBtksvtFrNhRfCWjjlY2uE5WQwaJVH-A9113t10E8,2577
@@ -88,8 +88,8 @@ starplot/styles/fonts-library/inter/Inter-Regular.ttf,sha256=ZPi-blXDfjLvA9qZcUv
88
88
  starplot/styles/fonts-library/inter/Inter-SemiBold.ttf,sha256=DcmOiqWVhTlIgPJauJ5tkVrVE0Ui6WGwRspR-tOhglU,413976
89
89
  starplot/styles/fonts-library/inter/Inter-SemiBoldItalic.ttf,sha256=HhKJRT16iVz7c1adSFFjTIsOSdFQxN1S1Ev10gaQgnI,418520
90
90
  starplot/styles/fonts-library/inter/LICENSE.txt,sha256=JiSB6ERSGzJvXs0FPlm5jIstp4yO4b27boF0MF5Uk1o,4380
91
- starplot-0.18.1.dist-info/entry_points.txt,sha256=Sm6jC6h_RcaMGC8saLnYmT0SdhcF9_rMeQIiHneLHyc,46
92
- starplot-0.18.1.dist-info/licenses/LICENSE,sha256=jcjClHF4BQwhz-kDgia-KphO9Zxu0rCa2BbiA7j1jeU,1070
93
- starplot-0.18.1.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
94
- starplot-0.18.1.dist-info/METADATA,sha256=6m1O8OHgjeDrL4TKP-UBGyVpzcnG6frN1xpGc4hJInQ,5383
95
- starplot-0.18.1.dist-info/RECORD,,
91
+ starplot-0.18.3.dist-info/entry_points.txt,sha256=Sm6jC6h_RcaMGC8saLnYmT0SdhcF9_rMeQIiHneLHyc,46
92
+ starplot-0.18.3.dist-info/licenses/LICENSE,sha256=jcjClHF4BQwhz-kDgia-KphO9Zxu0rCa2BbiA7j1jeU,1070
93
+ starplot-0.18.3.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
94
+ starplot-0.18.3.dist-info/METADATA,sha256=-4kp-tfk2Mn_uFXz8cwNC6h3ZnO-h2WYHQFzoNV0d0A,5424
95
+ starplot-0.18.3.dist-info/RECORD,,