Skip to content

Commit b704572

Browse files
committed
updated v0.4.4
- Removed git dependency and used urllib instead based on [feedback](#10) - Created conda forge release based on [Issue 10](#10)
1 parent 3c31995 commit b704572

File tree

8 files changed

+21
-10
lines changed

8 files changed

+21
-10
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ Required named arguments.:
267267

268268
### Changelog
269269

270+
### v0.4.4
271+
- Removed git dependency and used urllib instead based on [feedback](https://github.com/samapriya/gee_asset_manager_addon/issues/10)
272+
- Created conda forge release based on [Issue 10](https://github.com/samapriya/gee_asset_manager_addon/issues/10)
273+
270274
### v0.4.2
271275
- Fixed relative import issue for earthengine.
272276
- Fixed image collection move tool to parse ee object type correctly as image_collection.

dist/geeadd-0.4.3.tar.gz

-13.5 KB
Binary file not shown.
22.7 KB
Binary file not shown.

dist/geeadd-0.4.4.tar.gz

13.7 KB
Binary file not shown.

geeadd/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
__author__ = 'Samapriya Roy'
44
__email__ = '[email protected]'
5-
__version__ = '0.4.3'
5+
__version__ = '0.4.4'

geeadd/geeadd.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@
2626
import json
2727
import ee
2828
import subprocess
29+
import zipfile
2930
import shutil
31+
import urllib.request
3032
from datetime import datetime
3133
from shutil import copyfile
32-
from git import Repo
3334
os.chdir(os.path.dirname(os.path.realpath(__file__)))
3435
lpath = os.path.dirname(os.path.realpath(__file__))
3536
sys.path.append(lpath)
@@ -186,6 +187,7 @@ def assetsize_from_parser(args):
186187
assetsize(asset=args.asset)
187188

188189
def search(mname):
190+
out_file_path = os.path.join(lpath, 'eed.zip')
189191
for f in os.listdir(lpath):
190192
if f.endswith(".csv"):
191193
try:
@@ -198,7 +200,7 @@ def search(mname):
198200
name = os.name
199201

200202
# set base folder names and paths
201-
folder_name = "eed"
203+
folder_name = "Earth-Engine-Datasets-List-master"
202204
pth = os.path.join(lpath, folder_name)
203205

204206
if os.path.exists(pth):
@@ -210,10 +212,16 @@ def search(mname):
210212
except:
211213
print("Try using sudo privileges")
212214

213-
Repo.clone_from(
214-
"https://github.com/samapriya/Earth-Engine-Datasets-List.git",
215-
os.path.join(lpath, folder_name),
216-
)
215+
try:
216+
urllib.request.urlretrieve('https://github.com/samapriya/Earth-Engine-Datasets-List/archive/master.zip', out_file_path)
217+
except:
218+
print("The URL is invalid. Please double check the URL.")
219+
220+
# Unzip the zip file
221+
zip_ref = zipfile.ZipFile(out_file_path)
222+
for file in zip_ref.namelist():
223+
if zip_ref.getinfo(file).filename.endswith('.csv'):
224+
zip_ref.extract(file, lpath)
217225

218226
for items in os.listdir(os.path.join(lpath, folder_name)):
219227
if items.endswith(".csv"):

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ logzero>=1.5.0
22
requests>=2.22.0
33
earthengine-api>=0.1.217
44
beautifulsoup4>=4.9.0
5-
GitPython>=3.1.1

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
setup(
55
name='geeadd',
6-
version='0.4.3',
6+
version='0.4.4',
77
packages=['geeadd'],
88
url='https://github.com/samapriya/gee_asset_manager_addon',
99
install_requires=['earthengine-api>=0.1.217','requests>=2.22.0','logzero>=1.5.0',
10-
'beautifulsoup4>=4.9.0','GitPython>=3.1.1'],
10+
'beautifulsoup4>=4.9.0'],
1111
license='Apache 2.0',
1212
long_description=open('README.md').read(),
1313
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)