samapriya / Planet-GEE-Pipeline-CLI

Planet and Google Earth Engine Pipeline Command Line Interface Tool
https://pypi.org/project/ppipe/
Apache License 2.0
42 stars 12 forks source link

Limit number of assets for activation/downloading #2

Closed pandeazucar closed 6 years ago

pandeazucar commented 6 years ago

Hello,

Great tool. I skimmed through the documentation but did not manage to find a flag to specify the number of items to activate or download. I have a daily quota of images so it would be great if the application has it.

samapriya commented 6 years ago

You are right currently there is no tag to limit number of assets this and this can be a good feature enhancement for the next iteration of the tool. Stay tuned. For now, you can limit the number of assets for using the activatepl and check tag to see the number of assets and if they exceed your quota adjust the start and end dates to reduce the number of assets.

matthiasdemuzere commented 6 years ago

This seems like a great tool!

I just tried to install it on my machine (ubuntu 16.04, 64bit, python 2.7.12). When done, I got the following error with python ppipe.py -h:

Traceback (most recent call last): File "ppipe.py", line 7, in <module> from batch_uploader import upload File "/home/maffie/Downloads/software/Planet-GEE-Pipeline-CLI/ppipe/batch_uploader.py", line 19, in <module> from bs4 import BeautifulSoup File "/usr/lib/python2.7/dist-packages/bs4/__init__.py", line 30, in <module> from .builder import builder_registry, ParserRejectedMarkup File "/usr/lib/python2.7/dist-packages/bs4/builder/__init__.py", line 314, in <module> from . import _html5lib File "/usr/lib/python2.7/dist-packages/bs4/builder/_html5lib.py", line 70, in <module> class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder): AttributeError: 'module' object has no attribute '_base'

Apparently the error came from 'from bs4 import BeautifulSoup' in batch_uploader.py? So I changed this to 'from BeautifulSoup import BeautifulSoup' and this seems to work for me ...

samapriya commented 6 years ago

Hey Matthias, In Ubuntu, you can install beautiful soup using the following. I think the variations causes where you can import BeautifulSoup. For example, I am able to import bs4 and not beautifulSoup directly for some reason so these maybe version conflicts that cause this. But thank you for reporting and testing out alternatives and am glad the change worked for you. $ apt-get install python-bs4 (for Python 2) $ apt-get install python3-bs4 (for Python 3) $ easy_install beautifulsoup4. $ pip install beautifulsoup4.

samapriya commented 6 years ago

You can now specify the number of assets and items to download. I am closing the issue with release 0.2.3