geomind-ai 1.0.6__py3-none-any.whl → 1.0.8__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.
geomind/__init__.py CHANGED
@@ -3,7 +3,7 @@ GeoMind - Geospatial AI Agent
3
3
 
4
4
  """
5
5
 
6
- __version__ = "1.0.6"
6
+ __version__ = "1.0.8"
7
7
  __author__ = "Harsh Shinde"
8
8
 
9
9
  from .agent import GeoMindAgent
geomind/cli.py CHANGED
@@ -86,9 +86,7 @@ Environment Variables:
86
86
  parser.add_argument(
87
87
  "--version", "-v", action="store_true", help="Show version and exit"
88
88
  )
89
- parser.add_argument(
90
- "--clear-key", action="store_true", help="Clear saved API key"
91
- )
89
+ parser.add_argument("--clear-key", action="store_true", help="Clear saved API key")
92
90
 
93
91
  args = parser.parse_args()
94
92
 
@@ -109,8 +107,10 @@ Environment Variables:
109
107
  # Start interactive or single-query mode
110
108
  try:
111
109
  if args.query:
112
- # Single query mode - also use saved key
113
- api_key = args.api_key or get_saved_api_key()
110
+ # Single query mode - check API key in order: argument > env > saved file
111
+ from .config import OPENROUTER_API_KEY
112
+
113
+ api_key = args.api_key or OPENROUTER_API_KEY or get_saved_api_key()
114
114
  if not api_key:
115
115
  print("❌ No API key found. Run 'geomind' first to set up.")
116
116
  sys.exit(1)
@@ -132,21 +132,26 @@ Environment Variables:
132
132
 
133
133
  def run_interactive(model: Optional[str] = None, api_key: Optional[str] = None):
134
134
  """Run interactive CLI mode."""
135
+ from . import __version__
136
+
135
137
  print("=" * 60)
136
138
  print("🌍 GeoMind - Geospatial AI Agent")
137
139
  print("=" * 60)
138
- print("Powered by OpenRouter | Sentinel-2 Imagery")
140
+ print(f"Version: {__version__} | Author: Harsh Shinde")
139
141
  print("Type 'quit' or 'exit' to end the session")
140
142
  print("Type 'reset' to start a new conversation")
141
- print("=" * 60)
143
+ print("Type 'geomind --help' for more options")
142
144
 
143
145
  # Check for API key in order: argument > env > saved file
144
146
  from .config import OPENROUTER_API_KEY
145
147
 
146
- if not api_key:
148
+ # Priority: command line arg > env variable > saved file
149
+ if api_key:
150
+ # Use provided argument
151
+ pass
152
+ elif OPENROUTER_API_KEY:
147
153
  api_key = OPENROUTER_API_KEY
148
-
149
- if not api_key:
154
+ else:
150
155
  api_key = get_saved_api_key()
151
156
 
152
157
  if not api_key:
@@ -8,6 +8,12 @@ from typing import Optional, List, Tuple
8
8
  from pathlib import Path
9
9
  import numpy as np
10
10
 
11
+ # Use non-interactive backend BEFORE any other matplotlib imports
12
+ import matplotlib
13
+
14
+ matplotlib.use("Agg")
15
+ import matplotlib.pyplot as plt
16
+
11
17
  from ..config import (
12
18
  REFLECTANCE_SCALE,
13
19
  REFLECTANCE_OFFSET,
@@ -109,7 +115,6 @@ def create_rgb_composite(
109
115
  """
110
116
  try:
111
117
  import xarray as xr
112
- import matplotlib.pyplot as plt
113
118
  import zarr
114
119
 
115
120
  # Open the Zarr store
@@ -164,6 +169,7 @@ def create_rgb_composite(
164
169
  # Save
165
170
  plt.savefig(output_path, dpi=150, bbox_inches="tight", pad_inches=0.1)
166
171
  plt.close(fig)
172
+ plt.close('all') # Ensure all figures are closed
167
173
 
168
174
  return {
169
175
  "success": True,
@@ -200,7 +206,6 @@ def calculate_ndvi(
200
206
  """
201
207
  try:
202
208
  import zarr
203
- import matplotlib.pyplot as plt
204
209
  from matplotlib.colors import LinearSegmentedColormap
205
210
 
206
211
  # Open the Zarr store
@@ -261,6 +266,7 @@ def calculate_ndvi(
261
266
  # Save
262
267
  plt.savefig(output_path, dpi=150, bbox_inches="tight", pad_inches=0.1)
263
268
  plt.close(fig)
269
+ plt.close('all') # Ensure all figures are closed
264
270
 
265
271
  return {
266
272
  "success": True,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: geomind-ai
3
- Version: 1.0.6
3
+ Version: 1.0.8
4
4
  Summary: AI agent for geospatial analysis with Sentinel-2 satellite imagery
5
5
  Author: Harsh Shinde
6
6
  License-Expression: MIT
@@ -50,12 +50,15 @@ geomind
50
50
 
51
51
  # Single query
52
52
  geomind --query "Find recent imagery of Paris"
53
+
54
+ geomind --query "Create an RGB true-color composite visualization from the December 25th image"
55
+
56
+ geomind --query "Create an NDVI from the December 25th image"
53
57
  ```
54
58
 
55
59
  ## Example Queries
56
60
 
57
61
  ```
58
-
59
62
  💬 "Create an RGB composite for the most recent image of London"
60
63
 
61
64
  💬 "Calculate NDVI for Central Park, New York"
@@ -0,0 +1,14 @@
1
+ geomind/__init__.py,sha256=frEFC17k09GteEs1In0P5Ae84MGHMBnXr2EvYlDHmV8,151
2
+ geomind/agent.py,sha256=mc9Qnn247qXYKkPLTUPJWLF7cV-GedWuJq4jqNklCdU,15651
3
+ geomind/cli.py,sha256=Er52oVK83q-bQUuqALqUAzzkNgJ_9wOXHyzId-oVn-g,5589
4
+ geomind/config.py,sha256=Zv2IlY8fJcxkv9KviLkyak3IvCSoCqEfi6BfftHcqFA,2020
5
+ geomind/tools/__init__.py,sha256=8iumGwIFHh8Bj1VJNgZtmKnEBqCy6_cRkzYENDUH7x4,720
6
+ geomind/tools/geocoding.py,sha256=hiLpzHpkJP6IgWAUtZMnHL6qpkWcYWVLpGe0yfYxXv8,3007
7
+ geomind/tools/processing.py,sha256=mGu20uvpAVil2w2BEqj-0zYhKhCFuZHr1-3-vq0VzqM,10152
8
+ geomind/tools/stac_search.py,sha256=V6230l4aHjedPWXu-3Cjmfc6diSFh5zsycewUko0W8k,6452
9
+ geomind_ai-1.0.8.dist-info/licenses/LICENSE,sha256=aveu0ERm7I3NnIu8rtpKdvd0eyRpmktXKU0PBABtSN0,1069
10
+ geomind_ai-1.0.8.dist-info/METADATA,sha256=eHGD-WCeHrMpotZfHhrF5tsYTx1J85yc9aflcteltqU,2392
11
+ geomind_ai-1.0.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
+ geomind_ai-1.0.8.dist-info/entry_points.txt,sha256=2nPR3faYKl0-1epccvzMJ2xdi-Q1Vt7aOSvA84oIWnw,45
13
+ geomind_ai-1.0.8.dist-info/top_level.txt,sha256=rjKWNSNRhq4R9xJoZGsG-eAaH7BmTVNvfrrbcaJMIIs,8
14
+ geomind_ai-1.0.8.dist-info/RECORD,,
@@ -1,14 +0,0 @@
1
- geomind/__init__.py,sha256=fQwvsBVPjXn9WTHjXpTXF8vCIeC3xnpZmM8xwgS4NbA,151
2
- geomind/agent.py,sha256=mc9Qnn247qXYKkPLTUPJWLF7cV-GedWuJq4jqNklCdU,15651
3
- geomind/cli.py,sha256=TxQ2sj3lsXVZjVLIRgHA1w2ZenNZ2llrHBlydAnbaOI,5297
4
- geomind/config.py,sha256=Zv2IlY8fJcxkv9KviLkyak3IvCSoCqEfi6BfftHcqFA,2020
5
- geomind/tools/__init__.py,sha256=8iumGwIFHh8Bj1VJNgZtmKnEBqCy6_cRkzYENDUH7x4,720
6
- geomind/tools/geocoding.py,sha256=hiLpzHpkJP6IgWAUtZMnHL6qpkWcYWVLpGe0yfYxXv8,3007
7
- geomind/tools/processing.py,sha256=vMp8PMb8h8QiBRBFRvI_TGRqEDBTDQvSV0zvC1Ji5bc,9976
8
- geomind/tools/stac_search.py,sha256=V6230l4aHjedPWXu-3Cjmfc6diSFh5zsycewUko0W8k,6452
9
- geomind_ai-1.0.6.dist-info/licenses/LICENSE,sha256=aveu0ERm7I3NnIu8rtpKdvd0eyRpmktXKU0PBABtSN0,1069
10
- geomind_ai-1.0.6.dist-info/METADATA,sha256=qx2I7tRevvLMnE8Z5IzuZXrWhwWs5DzDQjsIGeHfDyo,2233
11
- geomind_ai-1.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
- geomind_ai-1.0.6.dist-info/entry_points.txt,sha256=2nPR3faYKl0-1epccvzMJ2xdi-Q1Vt7aOSvA84oIWnw,45
13
- geomind_ai-1.0.6.dist-info/top_level.txt,sha256=rjKWNSNRhq4R9xJoZGsG-eAaH7BmTVNvfrrbcaJMIIs,8
14
- geomind_ai-1.0.6.dist-info/RECORD,,