terrascope 0.1.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 (54) hide show
  1. terrascope-0.1.0/.gitignore +16 -0
  2. terrascope-0.1.0/LICENSE +21 -0
  3. terrascope-0.1.0/PKG-INFO +308 -0
  4. terrascope-0.1.0/README.md +276 -0
  5. terrascope-0.1.0/docs/RELEASING.md +55 -0
  6. terrascope-0.1.0/pyproject.toml +54 -0
  7. terrascope-0.1.0/src/terrascope/__init__.py +3 -0
  8. terrascope-0.1.0/src/terrascope/__main__.py +5 -0
  9. terrascope-0.1.0/src/terrascope/assets/default.yaml +437 -0
  10. terrascope-0.1.0/src/terrascope/assets/reference_data.json +3684 -0
  11. terrascope-0.1.0/src/terrascope/core/__init__.py +1 -0
  12. terrascope-0.1.0/src/terrascope/core/app/__init__.py +6 -0
  13. terrascope-0.1.0/src/terrascope/core/app/base.py +82 -0
  14. terrascope-0.1.0/src/terrascope/core/app/input.py +308 -0
  15. terrascope-0.1.0/src/terrascope/core/app/lifecycle.py +142 -0
  16. terrascope-0.1.0/src/terrascope/core/app/mouse.py +347 -0
  17. terrascope-0.1.0/src/terrascope/core/app/rendering.py +320 -0
  18. terrascope-0.1.0/src/terrascope/core/app/runtime.py +177 -0
  19. terrascope-0.1.0/src/terrascope/core/app/shared.py +121 -0
  20. terrascope-0.1.0/src/terrascope/core/app/timezone.py +76 -0
  21. terrascope-0.1.0/src/terrascope/core/cli.py +653 -0
  22. terrascope-0.1.0/src/terrascope/core/config.py +338 -0
  23. terrascope-0.1.0/src/terrascope/core/layer.py +328 -0
  24. terrascope-0.1.0/src/terrascope/core/main.py +227 -0
  25. terrascope-0.1.0/src/terrascope/core/mapdata.py +442 -0
  26. terrascope-0.1.0/src/terrascope/core/registry.py +43 -0
  27. terrascope-0.1.0/src/terrascope/core/tabs.py +53 -0
  28. terrascope-0.1.0/src/terrascope/core/ui/__init__.py +5 -0
  29. terrascope-0.1.0/src/terrascope/core/ui/colors.py +244 -0
  30. terrascope-0.1.0/src/terrascope/core/ui/constants.py +232 -0
  31. terrascope-0.1.0/src/terrascope/core/ui/dialogs.py +450 -0
  32. terrascope-0.1.0/src/terrascope/core/ui/layout.py +387 -0
  33. terrascope-0.1.0/src/terrascope/core/ui/map.py +619 -0
  34. terrascope-0.1.0/src/terrascope/core/view.py +235 -0
  35. terrascope-0.1.0/src/terrascope/core/world.py +361 -0
  36. terrascope-0.1.0/src/terrascope/layers/__init__.py +1 -0
  37. terrascope-0.1.0/src/terrascope/layers/basemap/__init__.py +5 -0
  38. terrascope-0.1.0/src/terrascope/layers/basemap/layer.py +295 -0
  39. terrascope-0.1.0/src/terrascope/layers/daynight/__init__.py +5 -0
  40. terrascope-0.1.0/src/terrascope/layers/daynight/astronomy.py +119 -0
  41. terrascope-0.1.0/src/terrascope/layers/daynight/layer.py +403 -0
  42. terrascope-0.1.0/src/terrascope/layers/flights/__init__.py +5 -0
  43. terrascope-0.1.0/src/terrascope/layers/flights/api.py +117 -0
  44. terrascope-0.1.0/src/terrascope/layers/flights/cache.py +136 -0
  45. terrascope-0.1.0/src/terrascope/layers/flights/formatting.py +154 -0
  46. terrascope-0.1.0/src/terrascope/layers/flights/layer.py +509 -0
  47. terrascope-0.1.0/src/terrascope/layers/flights/settings.py +103 -0
  48. terrascope-0.1.0/src/terrascope/layers/weather/__init__.py +5 -0
  49. terrascope-0.1.0/src/terrascope/layers/weather/city_weather.py +388 -0
  50. terrascope-0.1.0/src/terrascope/layers/weather/config.py +202 -0
  51. terrascope-0.1.0/src/terrascope/layers/weather/earthquakes.py +285 -0
  52. terrascope-0.1.0/src/terrascope/layers/weather/forecast.py +335 -0
  53. terrascope-0.1.0/src/terrascope/layers/weather/layer.py +784 -0
  54. terrascope-0.1.0/src/terrascope/layers/weather/radar.py +371 -0
@@ -0,0 +1,16 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+
5
+ .DS_Store
6
+
7
+ .venv/
8
+ venv/
9
+
10
+ build/
11
+ dist/
12
+ *.egg-info/
13
+
14
+ .pytest_cache/
15
+ .mypy_cache/
16
+ .ruff_cache/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Amir Shygun
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,308 @@
1
+ Metadata-Version: 2.5
2
+ Name: terrascope
3
+ Version: 0.1.0
4
+ Summary: A Braille terminal map with live weather, aircraft, and earthquake layers.
5
+ Project-URL: Homepage, https://github.com/a-shygun/terrascope
6
+ Project-URL: Repository, https://github.com/a-shygun/terrascope
7
+ Project-URL: Issues, https://github.com/a-shygun/terrascope/issues
8
+ Author-email: Amir Shygun <a-shygun@users.noreply.github.com>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: braille,curses,flight-tracking,map,opensky,terminal,tui,weather
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console :: Curses
14
+ Classifier: Intended Audience :: End Users/Desktop
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Operating System :: POSIX
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3 :: Only
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Topic :: Scientific/Engineering :: Visualization
25
+ Classifier: Topic :: Terminals
26
+ Requires-Python: >=3.10
27
+ Requires-Dist: numpy>=1.24
28
+ Requires-Dist: pillow>=10.0
29
+ Requires-Dist: pyshp>=2.3
30
+ Requires-Dist: pyyaml>=6.0
31
+ Description-Content-Type: text/markdown
32
+
33
+ # terrascope
34
+
35
+ [![CI](https://github.com/a-shygun/terrascope/actions/workflows/ci.yml/badge.svg)](https://github.com/a-shygun/terrascope/actions/workflows/ci.yml)
36
+ [![PyPI](https://img.shields.io/pypi/v/terrascope)](https://pypi.org/project/terrascope/)
37
+ [![Python](https://img.shields.io/pypi/pyversions/terrascope)](https://pypi.org/project/terrascope/)
38
+ [![License](https://img.shields.io/github/license/a-shygun/terrascope)](LICENSE)
39
+
40
+ `terrascope` is an interactive world map for the terminal. It renders countries,
41
+ place names, live aircraft, city weather, radar/cloud overlays, earthquakes, and
42
+ day/night bands with `curses`, Unicode Braille cells, and terminal colors.
43
+
44
+ The app is intentionally lightweight at install time. Large map data is
45
+ downloaded into a user cache the first time it is needed, then reused on later
46
+ runs.
47
+
48
+ Country names and abbreviations, plus airport names and locations, are bundled
49
+ from Natural Earth so they are available offline without a first-run download.
50
+
51
+ <!-- TODO: Add a short terminal demo GIF at docs/images/terrascope-demo.gif. -->
52
+ <!-- TODO: Add screenshots for the map, weather, planes, and time tabs under docs/images/. -->
53
+
54
+ ## Status
55
+
56
+ This project is early-stage software. The core map, tabs, keyboard/mouse
57
+ navigation, live layers, and cache handling are implemented, but APIs and visual
58
+ details may still change.
59
+
60
+ ## Requirements
61
+
62
+ - Python 3.10 or newer on macOS or Linux/Unix
63
+ - A UTF-8 terminal
64
+ - A terminal with 256-color or true-color support for the best appearance
65
+ - Network access for first-run map downloads and live data layers (optional)
66
+
67
+ Python dependencies are declared in `pyproject.toml`:
68
+
69
+ - `numpy`
70
+ - `Pillow`
71
+ - `PyYAML`
72
+
73
+ ## Installation
74
+
75
+ For normal use:
76
+
77
+ ```bash
78
+ pipx install terrascope
79
+ terrascope
80
+ ```
81
+
82
+ ### Package managers
83
+
84
+ Terrascope also includes recipes for Nix and Homebrew:
85
+
86
+ ```bash
87
+ # Nix, from a Terrascope checkout
88
+ nix run ./packaging/nix
89
+
90
+ # Homebrew, after adding the tap
91
+ brew install a-shygun/terrascope/terrascope
92
+ ```
93
+
94
+ PyPI publishing is automated for version tags. The Nix recipe lives in
95
+ `packaging/nix/`, and the Homebrew formula lives in `Formula/`; update their
96
+ version references when preparing a release.
97
+
98
+ For local development:
99
+
100
+ ```bash
101
+ git clone https://github.com/a-shygun/terrascope.git
102
+ cd terrascope
103
+ python3 -m venv .venv
104
+ source .venv/bin/activate
105
+ pip install -e .
106
+ terrascope
107
+ ```
108
+
109
+ You can also run it from a checkout without installing the console script:
110
+
111
+ ```bash
112
+ PYTHONPATH=src python3 -m terrascope
113
+ ```
114
+
115
+ ## First Run and Cache
116
+
117
+ On first launch, `terrascope` downloads Natural Earth GeoJSON files into:
118
+
119
+ ```text
120
+ $XDG_CACHE_HOME/terrascope
121
+ ```
122
+
123
+ If `XDG_CACHE_HOME` is not set, the default is:
124
+
125
+ ```text
126
+ ~/.cache/terrascope
127
+ ```
128
+
129
+ Useful cache commands:
130
+
131
+ ```bash
132
+ terrascope --show-paths
133
+ terrascope --clear-cache
134
+ terrascope --offline
135
+ ```
136
+
137
+ ## Common Options
138
+
139
+ ```bash
140
+ terrascope --help # all options and defaults
141
+ terrascope --tab weather --offline # open a tab using cached data only
142
+ terrascope --no-radar --no-airports # disable optional overlays
143
+ terrascope --disable-layer night # start with a layer disabled
144
+ terrascope --config ~/terrascope.yaml # load additional settings
145
+ terrascope --set 'map.zoom.max=128' # override one setting for this run
146
+ terrascope --show-paths # show cache and config locations
147
+ terrascope --clear-cache # remove cached downloads and API data
148
+ terrascope --dump-config # print effective settings
149
+ terrascope --list-keys # show active keyboard shortcuts
150
+ ```
151
+
152
+ CLI flags override configuration for the current run. `--set` overrides flags;
153
+ see `terrascope --help` for the full precedence order and every available
154
+ option.
155
+
156
+ During first-run downloads the terminal UI shows a loading message before the
157
+ map appears. Errors and background warnings are written to the log file shown by
158
+ `terrascope --show-paths`, so stray output does not corrupt the curses screen.
159
+
160
+ ## Controls
161
+
162
+ | Input | Action |
163
+ | --- | --- |
164
+ | `1`-`9` | Switch tabs |
165
+ | `WASD` or arrow keys | Pan |
166
+ | `+` / `-` | Zoom in / out |
167
+ | `0` | Reset view |
168
+ | Mouse drag | Pan |
169
+ | Mouse wheel | Zoom |
170
+ | Mouse click | Select a marker or map label |
171
+ | `<` / `>` | Step through overlapping selections |
172
+ | `/` | Search |
173
+ | `O` | Open filter prompt |
174
+ | `H` | Show or hide the bottom panel |
175
+ | `?` | Open the welcome/help modal |
176
+ | `Esc` | Close prompts or clear selection/filter state |
177
+ | `Q` | Quit |
178
+
179
+ Layer-specific keys:
180
+
181
+ | Key | Layer |
182
+ | --- | --- |
183
+ | `P` | Flights |
184
+ | `K` | Airports on the planes tab |
185
+ | `C` | City weather labels |
186
+ | `E` | Earthquakes |
187
+ | `N` | Day/night layer |
188
+ | `L` | Day/night tint/fill mode |
189
+ | `[` / `]` | Time slider where available |
190
+
191
+ Run this for the effective key list:
192
+
193
+ ```bash
194
+ terrascope --list-keys
195
+ ```
196
+
197
+ ## Tabs And Layers
198
+
199
+ - `MAP`: base world map with country, province/state, and city detail as
200
+ zoom allows.
201
+ - `TIME`: day/night bands, sun information, moon information, and timezone
202
+ selection.
203
+ - `WEATHER`: city weather, forecast panel, radar/cloud overlay, and USGS
204
+ earthquakes.
205
+ - `PLANES`: OpenSky aircraft positions, trails, categories, and Natural Earth
206
+ airport markers.
207
+
208
+ ## Configuration
209
+
210
+ Defaults live in:
211
+
212
+ ```text
213
+ ~/.config/terrascope/default.yaml
214
+ ```
215
+
216
+ On first launch, Terrascope copies the bundled defaults to this location and
217
+ loads that user-owned copy. Existing files are kept across upgrades. If
218
+ `XDG_CONFIG_HOME` is set, Terrascope uses `$XDG_CONFIG_HOME/terrascope/default.yaml`.
219
+
220
+ You can override settings without editing the package:
221
+
222
+ ```bash
223
+ terrascope --config ~/terrascope.yaml
224
+ terrascope --set 'map.zoom.max=128'
225
+ terrascope --set 'map.land_color="#101018"'
226
+ ```
227
+
228
+ Inspect the final merged config:
229
+
230
+ ```bash
231
+ terrascope --dump-config
232
+ ```
233
+
234
+ Important environment variables:
235
+
236
+ | Variable | Meaning |
237
+ | --- | --- |
238
+ | `terrascope_OFFLINE=1` | Disable live network requests |
239
+ | `terrascope_CONFIG=/path/file.yaml` | Load a config file before CLI flags |
240
+ | `terrascope_LIBREWXR_URL=https://...` | Override the radar/cloud server |
241
+ | `XDG_CACHE_HOME=/path` | Change the default cache root |
242
+
243
+ ## Project Layout
244
+
245
+ ```text
246
+ src/terrascope/
247
+ __main__.py python -m terrascope entry point
248
+ assets/ default configuration and bundled reference data
249
+ core/
250
+ app/ app lifecycle, input, mouse, and rendering mixins
251
+ ui/ colors, layout, dialogs, and map drawing
252
+ cli.py config.py command-line and settings validation
253
+ mapdata.py world.py geographic data and map state
254
+ layers/
255
+ basemap/ country outlines, labels, and map detail
256
+ daynight/ day/night rendering and astronomy calculations
257
+ flights/ OpenSky API, cache, formatting, and aircraft layer
258
+ weather/ weather, radar, forecast, and earthquake modules
259
+ ```
260
+
261
+ The public console entry point is:
262
+
263
+ ```toml
264
+ terrascope = "terrascope.__main__:run"
265
+ ```
266
+
267
+ ## Data Sources
268
+
269
+ - Natural Earth: country and province/state outlines, populated places
270
+ - OpenSky Network: aircraft positions
271
+ - Open-Meteo: city weather and forecasts
272
+ - LibreWXR-compatible public endpoint: radar/cloud tiles
273
+ - USGS GeoJSON feeds: earthquakes
274
+ - NOAA/Meeus-style calculations in code: day/night and moon information
275
+
276
+ Bundled reference data is from [Natural Earth 50m Cultural Vectors](https://www.naturalearthdata.com/downloads/50m-cultural-vectors/), which is public domain.
277
+
278
+ Each source has its own availability and rate-limit behavior. Use `--offline`
279
+ when you want to run only from cached data.
280
+
281
+ Terrascope has no telemetry or analytics. When live layers are enabled, network
282
+ requests go to the configured data providers. Weather requests include the
283
+ coordinates of displayed cities; providers also receive your IP address and
284
+ the Terrascope User-Agent. `--offline` disables live requests.
285
+
286
+ ## Development Checks
287
+
288
+ Basic syntax check:
289
+
290
+ ```bash
291
+ python3 -m compileall -q src/terrascope
292
+ ```
293
+
294
+ If dependencies are installed, a quick import smoke test is:
295
+
296
+ ```bash
297
+ PYTHONPATH=src python3 -c "from terrascope.core.registry import build_layers; print([l.name for l in build_layers()])"
298
+ ```
299
+
300
+ ## Releasing
301
+
302
+ Versioned tags build and publish the wheel and source distribution to PyPI.
303
+ Update the separate Homebrew tap after PyPI confirms the release. See
304
+ [docs/RELEASING.md](docs/RELEASING.md) for the release and Git steps.
305
+
306
+ ## License
307
+
308
+ MIT. See `LICENSE`.
@@ -0,0 +1,276 @@
1
+ # terrascope
2
+
3
+ [![CI](https://github.com/a-shygun/terrascope/actions/workflows/ci.yml/badge.svg)](https://github.com/a-shygun/terrascope/actions/workflows/ci.yml)
4
+ [![PyPI](https://img.shields.io/pypi/v/terrascope)](https://pypi.org/project/terrascope/)
5
+ [![Python](https://img.shields.io/pypi/pyversions/terrascope)](https://pypi.org/project/terrascope/)
6
+ [![License](https://img.shields.io/github/license/a-shygun/terrascope)](LICENSE)
7
+
8
+ `terrascope` is an interactive world map for the terminal. It renders countries,
9
+ place names, live aircraft, city weather, radar/cloud overlays, earthquakes, and
10
+ day/night bands with `curses`, Unicode Braille cells, and terminal colors.
11
+
12
+ The app is intentionally lightweight at install time. Large map data is
13
+ downloaded into a user cache the first time it is needed, then reused on later
14
+ runs.
15
+
16
+ Country names and abbreviations, plus airport names and locations, are bundled
17
+ from Natural Earth so they are available offline without a first-run download.
18
+
19
+ <!-- TODO: Add a short terminal demo GIF at docs/images/terrascope-demo.gif. -->
20
+ <!-- TODO: Add screenshots for the map, weather, planes, and time tabs under docs/images/. -->
21
+
22
+ ## Status
23
+
24
+ This project is early-stage software. The core map, tabs, keyboard/mouse
25
+ navigation, live layers, and cache handling are implemented, but APIs and visual
26
+ details may still change.
27
+
28
+ ## Requirements
29
+
30
+ - Python 3.10 or newer on macOS or Linux/Unix
31
+ - A UTF-8 terminal
32
+ - A terminal with 256-color or true-color support for the best appearance
33
+ - Network access for first-run map downloads and live data layers (optional)
34
+
35
+ Python dependencies are declared in `pyproject.toml`:
36
+
37
+ - `numpy`
38
+ - `Pillow`
39
+ - `PyYAML`
40
+
41
+ ## Installation
42
+
43
+ For normal use:
44
+
45
+ ```bash
46
+ pipx install terrascope
47
+ terrascope
48
+ ```
49
+
50
+ ### Package managers
51
+
52
+ Terrascope also includes recipes for Nix and Homebrew:
53
+
54
+ ```bash
55
+ # Nix, from a Terrascope checkout
56
+ nix run ./packaging/nix
57
+
58
+ # Homebrew, after adding the tap
59
+ brew install a-shygun/terrascope/terrascope
60
+ ```
61
+
62
+ PyPI publishing is automated for version tags. The Nix recipe lives in
63
+ `packaging/nix/`, and the Homebrew formula lives in `Formula/`; update their
64
+ version references when preparing a release.
65
+
66
+ For local development:
67
+
68
+ ```bash
69
+ git clone https://github.com/a-shygun/terrascope.git
70
+ cd terrascope
71
+ python3 -m venv .venv
72
+ source .venv/bin/activate
73
+ pip install -e .
74
+ terrascope
75
+ ```
76
+
77
+ You can also run it from a checkout without installing the console script:
78
+
79
+ ```bash
80
+ PYTHONPATH=src python3 -m terrascope
81
+ ```
82
+
83
+ ## First Run and Cache
84
+
85
+ On first launch, `terrascope` downloads Natural Earth GeoJSON files into:
86
+
87
+ ```text
88
+ $XDG_CACHE_HOME/terrascope
89
+ ```
90
+
91
+ If `XDG_CACHE_HOME` is not set, the default is:
92
+
93
+ ```text
94
+ ~/.cache/terrascope
95
+ ```
96
+
97
+ Useful cache commands:
98
+
99
+ ```bash
100
+ terrascope --show-paths
101
+ terrascope --clear-cache
102
+ terrascope --offline
103
+ ```
104
+
105
+ ## Common Options
106
+
107
+ ```bash
108
+ terrascope --help # all options and defaults
109
+ terrascope --tab weather --offline # open a tab using cached data only
110
+ terrascope --no-radar --no-airports # disable optional overlays
111
+ terrascope --disable-layer night # start with a layer disabled
112
+ terrascope --config ~/terrascope.yaml # load additional settings
113
+ terrascope --set 'map.zoom.max=128' # override one setting for this run
114
+ terrascope --show-paths # show cache and config locations
115
+ terrascope --clear-cache # remove cached downloads and API data
116
+ terrascope --dump-config # print effective settings
117
+ terrascope --list-keys # show active keyboard shortcuts
118
+ ```
119
+
120
+ CLI flags override configuration for the current run. `--set` overrides flags;
121
+ see `terrascope --help` for the full precedence order and every available
122
+ option.
123
+
124
+ During first-run downloads the terminal UI shows a loading message before the
125
+ map appears. Errors and background warnings are written to the log file shown by
126
+ `terrascope --show-paths`, so stray output does not corrupt the curses screen.
127
+
128
+ ## Controls
129
+
130
+ | Input | Action |
131
+ | --- | --- |
132
+ | `1`-`9` | Switch tabs |
133
+ | `WASD` or arrow keys | Pan |
134
+ | `+` / `-` | Zoom in / out |
135
+ | `0` | Reset view |
136
+ | Mouse drag | Pan |
137
+ | Mouse wheel | Zoom |
138
+ | Mouse click | Select a marker or map label |
139
+ | `<` / `>` | Step through overlapping selections |
140
+ | `/` | Search |
141
+ | `O` | Open filter prompt |
142
+ | `H` | Show or hide the bottom panel |
143
+ | `?` | Open the welcome/help modal |
144
+ | `Esc` | Close prompts or clear selection/filter state |
145
+ | `Q` | Quit |
146
+
147
+ Layer-specific keys:
148
+
149
+ | Key | Layer |
150
+ | --- | --- |
151
+ | `P` | Flights |
152
+ | `K` | Airports on the planes tab |
153
+ | `C` | City weather labels |
154
+ | `E` | Earthquakes |
155
+ | `N` | Day/night layer |
156
+ | `L` | Day/night tint/fill mode |
157
+ | `[` / `]` | Time slider where available |
158
+
159
+ Run this for the effective key list:
160
+
161
+ ```bash
162
+ terrascope --list-keys
163
+ ```
164
+
165
+ ## Tabs And Layers
166
+
167
+ - `MAP`: base world map with country, province/state, and city detail as
168
+ zoom allows.
169
+ - `TIME`: day/night bands, sun information, moon information, and timezone
170
+ selection.
171
+ - `WEATHER`: city weather, forecast panel, radar/cloud overlay, and USGS
172
+ earthquakes.
173
+ - `PLANES`: OpenSky aircraft positions, trails, categories, and Natural Earth
174
+ airport markers.
175
+
176
+ ## Configuration
177
+
178
+ Defaults live in:
179
+
180
+ ```text
181
+ ~/.config/terrascope/default.yaml
182
+ ```
183
+
184
+ On first launch, Terrascope copies the bundled defaults to this location and
185
+ loads that user-owned copy. Existing files are kept across upgrades. If
186
+ `XDG_CONFIG_HOME` is set, Terrascope uses `$XDG_CONFIG_HOME/terrascope/default.yaml`.
187
+
188
+ You can override settings without editing the package:
189
+
190
+ ```bash
191
+ terrascope --config ~/terrascope.yaml
192
+ terrascope --set 'map.zoom.max=128'
193
+ terrascope --set 'map.land_color="#101018"'
194
+ ```
195
+
196
+ Inspect the final merged config:
197
+
198
+ ```bash
199
+ terrascope --dump-config
200
+ ```
201
+
202
+ Important environment variables:
203
+
204
+ | Variable | Meaning |
205
+ | --- | --- |
206
+ | `terrascope_OFFLINE=1` | Disable live network requests |
207
+ | `terrascope_CONFIG=/path/file.yaml` | Load a config file before CLI flags |
208
+ | `terrascope_LIBREWXR_URL=https://...` | Override the radar/cloud server |
209
+ | `XDG_CACHE_HOME=/path` | Change the default cache root |
210
+
211
+ ## Project Layout
212
+
213
+ ```text
214
+ src/terrascope/
215
+ __main__.py python -m terrascope entry point
216
+ assets/ default configuration and bundled reference data
217
+ core/
218
+ app/ app lifecycle, input, mouse, and rendering mixins
219
+ ui/ colors, layout, dialogs, and map drawing
220
+ cli.py config.py command-line and settings validation
221
+ mapdata.py world.py geographic data and map state
222
+ layers/
223
+ basemap/ country outlines, labels, and map detail
224
+ daynight/ day/night rendering and astronomy calculations
225
+ flights/ OpenSky API, cache, formatting, and aircraft layer
226
+ weather/ weather, radar, forecast, and earthquake modules
227
+ ```
228
+
229
+ The public console entry point is:
230
+
231
+ ```toml
232
+ terrascope = "terrascope.__main__:run"
233
+ ```
234
+
235
+ ## Data Sources
236
+
237
+ - Natural Earth: country and province/state outlines, populated places
238
+ - OpenSky Network: aircraft positions
239
+ - Open-Meteo: city weather and forecasts
240
+ - LibreWXR-compatible public endpoint: radar/cloud tiles
241
+ - USGS GeoJSON feeds: earthquakes
242
+ - NOAA/Meeus-style calculations in code: day/night and moon information
243
+
244
+ Bundled reference data is from [Natural Earth 50m Cultural Vectors](https://www.naturalearthdata.com/downloads/50m-cultural-vectors/), which is public domain.
245
+
246
+ Each source has its own availability and rate-limit behavior. Use `--offline`
247
+ when you want to run only from cached data.
248
+
249
+ Terrascope has no telemetry or analytics. When live layers are enabled, network
250
+ requests go to the configured data providers. Weather requests include the
251
+ coordinates of displayed cities; providers also receive your IP address and
252
+ the Terrascope User-Agent. `--offline` disables live requests.
253
+
254
+ ## Development Checks
255
+
256
+ Basic syntax check:
257
+
258
+ ```bash
259
+ python3 -m compileall -q src/terrascope
260
+ ```
261
+
262
+ If dependencies are installed, a quick import smoke test is:
263
+
264
+ ```bash
265
+ PYTHONPATH=src python3 -c "from terrascope.core.registry import build_layers; print([l.name for l in build_layers()])"
266
+ ```
267
+
268
+ ## Releasing
269
+
270
+ Versioned tags build and publish the wheel and source distribution to PyPI.
271
+ Update the separate Homebrew tap after PyPI confirms the release. See
272
+ [docs/RELEASING.md](docs/RELEASING.md) for the release and Git steps.
273
+
274
+ ## License
275
+
276
+ MIT. See `LICENSE`.
@@ -0,0 +1,55 @@
1
+ # Release workflow
2
+
3
+ Use one version and one signed Git tag for every distribution channel. The
4
+ PyPI workflow builds and publishes the sdist and wheel from that tag. Homebrew
5
+ is updated in the separate tap repository after the PyPI release is visible.
6
+ The Nix recipe is maintained here. The Arch recipe is a draft and must not be
7
+ submitted to the AUR until its `SKIP` checksum is replaced with the archive's
8
+ SHA-256.
9
+
10
+ ## One-time setup
11
+
12
+ 1. Create the `pypi` GitHub Actions environment in the repository settings.
13
+ 2. On PyPI, configure a Trusted Publisher for this repository and the workflow
14
+ `.github/workflows/release.yml`, using the `pypi` environment. No PyPI token
15
+ needs to be stored in GitHub secrets.
16
+ 3. Create a Homebrew tap repository (for example,
17
+ `a-shygun/homebrew-terrascope`) containing `Formula/terrascope.rb`. Keep the
18
+ formula pointed at the matching version tag.
19
+
20
+ ## Release a version
21
+
22
+ 1. Create a release branch from `main`, update `project.version` in
23
+ `pyproject.toml`, and update user-facing release notes. Open a pull request
24
+ and merge it after review.
25
+ 2. From the updated `main`, create and push a signed version tag (configure
26
+ Git tag signing first). For example:
27
+
28
+ ```bash
29
+ git switch main
30
+ git pull --ff-only
31
+ git tag -s v0.2.0 -m "Release 0.2.0"
32
+ git push origin v0.2.0
33
+ ```
34
+
35
+ 3. The tag starts `.github/workflows/release.yml`. It builds both Python
36
+ distributions, checks their metadata, then publishes the exact build
37
+ artifacts to PyPI through Trusted Publishing. Confirm the release appears
38
+ on PyPI before moving on.
39
+ 4. Update `Formula/terrascope.rb` to the new version tag, then copy it into the
40
+ tap repository. The formula uses the versioned Git tag as its source.
41
+ Homebrew's `brew bump-formula-pr` can calculate/update these fields and open
42
+ a pull request; check `brew bump-formula-pr --help` for the current options.
43
+ 5. Validate the formula in the tap checkout with `brew audit --strict` and
44
+ `brew test`, then open and merge the tap pull request. Verify a clean install
45
+ with `brew install <tap>/terrascope`.
46
+ 6. If preparing an Arch package, update `packaging/arch/PKGBUILD`, calculate the
47
+ SHA-256 of the versioned source archive, replace `SKIP`, then build and review
48
+ the package before submitting it to the AUR. The Nix recipe reads the package
49
+ version from `pyproject.toml`; update `packaging/nix/flake.lock` when refreshing
50
+ nixpkgs.
51
+
52
+ Do not reuse a published PyPI version or move a release tag. If a release has a
53
+ packaging defect, increment the version and publish a new tag. Keep PyPI
54
+ publishing credentials out of the repository; the workflow uses a PyPI
55
+ Trusted Publisher with the `pypi` environment.