Skip to content

Commit

Permalink
updated v0.3.3
Browse files Browse the repository at this point in the history
- Fixed issue with order name when no ops are used.
- Used file basename for splitting the idlist.
  • Loading branch information
samapriya committed May 27, 2019
1 parent 342d179 commit bc87567
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ A simple setup would be

## Changelog

### v0.3.3
- Fixed issue with order name when no ops are used.
- Used file basename for splitting the idlist.

### v0.3.2
- idlist tool can no use a multipolygon and iteratively look for scenes
- Orders clip tool can now handle multipolygon clip
Expand Down
Binary file removed dist/porder-0.3.2.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added dist/porder-0.3.3.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion porder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

__author__ = 'Samapriya Roy'
__email__ = '[email protected]'
__version__ = '0.3.2'
__version__ = '0.3.3'
3 changes: 2 additions & 1 deletion porder/order_now.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ def order(**kwargs):
k=dbundle
for key,value in kwargs.items():
if key=='op' and value!=None:
ordname=k['name']
for items in value:
if items=='clip':
dbundle['tools'].append(dclip)
Expand Down Expand Up @@ -262,6 +261,7 @@ def order(**kwargs):
#print(dbmath)

#print(payload)
ordname=k['name']
payload=payload.replace("Explorer_{{name}}.zip",ordname+'_'+str(pendulum.now()).split("T")[0]+".zip")
headers = {'content-type': 'application/json',
'cache-control': 'no-cache'}
Expand All @@ -272,6 +272,7 @@ def order(**kwargs):
try:
clipboard.copy(str(url) + '/' + str(content['id']))
print('Order created at '+str(url) + '/' + str(content['id']+' and url copied to clipboard'))
return (str(url) + '/' + str(content['id']))
except Exception:
print('Headless Setup: Order created at '+str(url) + '/' + str(content['id']))
elif response.status_code==400:
Expand Down
3 changes: 2 additions & 1 deletion porder/text_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ def idsplit(infile,linenum,output):
lines_per_file = int(linenum)
smallfile = None
with open(infile) as bigfile:
basename=os.path.basename(infile).split('.')[0]
for lineno, line in enumerate(bigfile):
if lineno % lines_per_file == 0:
if smallfile:
smallfile.close()
small_filename = 'link_file_{}.csv'.format(str(lineno+int(linenum)))
small_filename = basename+'_{}.csv'.format(str(lineno+int(linenum)))
smallfile = open(os.path.join(output,small_filename), "w")
smallfile.write(line)
if smallfile:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def readme():
return f.read()
setuptools.setup(
name='porder',
version='0.3.2',
version='0.3.3',
packages=['porder'],
url='https://github.com/samapriya/porder',
package_data={'': ['bundles.json']},
Expand Down

0 comments on commit bc87567

Please sign in to comment.