Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(fixes): shebangs and cmd-line standards #120

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions aodntools/timeseries_products/aggregated_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,17 +422,17 @@ def main_aggregator(files_to_agg, var_to_agg, site_code, input_dir='', output_di
if __name__ == "__main__":

parser = argparse.ArgumentParser(description="Aggregate ONE variable from ALL instruments from ALL deployments from ONE site")
parser.add_argument('-site', dest='site_code', help='site code, like NRMMAI', required=True)
parser.add_argument('-var', dest='varname', help='variable to aggregate, like TEMP', required=True)
parser.add_argument('-files', dest='filenames',
parser.add_argument('--site', dest='site_code', help='site code, like NRMMAI', required=True)
parser.add_argument('--var', dest='varname', help='variable to aggregate, like TEMP', required=True)
parser.add_argument('--files', dest='filenames',
mhidas marked this conversation as resolved.
Show resolved Hide resolved
help='name of the file that contains the source URLs (relative to inpath, if given)',
required=True)
parser.add_argument('-indir', dest='input_dir', help='base path of input files', default='', required=False)
parser.add_argument('-outdir', dest='output_dir', help='path where the result file will be written. Default ./',
parser.add_argument('--indir', dest='input_dir', help='base path of input files', default='', required=False)
parser.add_argument('--outdir', dest='output_dir', help='path where the result file will be written. Default ./',
mhidas marked this conversation as resolved.
Show resolved Hide resolved
default='./', required=False)
parser.add_argument('-download_url', dest='download_url', help='path to the download_url_prefix',
parser.add_argument('--download_url', dest='download_url', help='path to the download_url_prefix',
mhidas marked this conversation as resolved.
Show resolved Hide resolved
default='', required=False)
parser.add_argument('-opendap_url', dest='opendap_url', help='path to the opendap_url_prefix',
parser.add_argument('--opendap_url', dest='opendap_url', help='path to the opendap_url_prefix',
default='', required=False)
args = parser.parse_args()

Expand Down
17 changes: 9 additions & 8 deletions aodntools/timeseries_products/gridded_timeseries.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
import numpy as np
import bisect
import argparse
Expand Down Expand Up @@ -319,16 +320,16 @@ def grid_variable(input_file, VoI, depth_bins=None, max_separation=50, depth_bin

if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Gridded time series: interpolate ONE variable from ALL instruments from ALL deployments from ONE site into 1hr timestamps and fixed depth bins")
parser.add_argument('-var', dest='var', help='name of the variable to concatenate. Like TEMP, PSAL', default='TEMP', required=False)
parser.add_argument('-file', dest='filename', help='name of the Hourly Time Series Product file that contains the data', default=None, required=False)
parser.add_argument('-depth_bins', dest='depth_bins', help='list of depth where the VoI will be interpolated', default=None, nargs='+', required=False)
parser.add_argument('-max_separation', dest='max_separation', help='maximum difference between instruments to allow interpolation', default=50, required=False)
parser.add_argument('-depth_bins_increment', dest='depth_bins_increment', help='increment in meters for the automatic generated depth bins', default=10, required=False)
parser.add_argument('-indir', dest='input_dir', help='base path of input file. Default .', default='.',
parser.add_argument('--var', dest='var', help='name of the variable to concatenate. Like TEMP, PSAL', default='TEMP', required=False)
parser.add_argument('--file', dest='filename', help='name of the Hourly Time Series Product file that contains the data', default=None, required=False)
parser.add_argument('--depth_bins', dest='depth_bins', help='list of depth where the VoI will be interpolated', default=None, nargs='+', required=False)
parser.add_argument('--max_separation', dest='max_separation', help='maximum difference between instruments to allow interpolation', default=50, required=False)
parser.add_argument('--depth_bins_increment', dest='depth_bins_increment', help='increment in meters for the automatic generated depth bins', default=10, required=False)
parser.add_argument('--indir', dest='input_dir', help='base path of input file. Default .', default='.',
required=False)
parser.add_argument('-outdir', dest='output_dir', help='path where the result file will be written. Default .',
parser.add_argument('--outdir', dest='output_dir', help='path where the result file will be written. Default .',
default='.', required=False)
parser.add_argument('-config', dest='config_file', help='JSON configuration file', default=None, required=False)
parser.add_argument('--config', dest='config_file', help='JSON configuration file', default=None, required=False)
args = parser.parse_args()

if args.config_file:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
import os
import sys
import tempfile
Expand Down
13 changes: 7 additions & 6 deletions aodntools/timeseries_products/velocity_hourly_timeseries.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
import argparse
import json
import os
Expand Down Expand Up @@ -319,14 +320,14 @@ def velocity_hourly_aggregated(files_to_agg, site_code, input_dir='', output_dir
if __name__ == "__main__":

parser = argparse.ArgumentParser(description="Concatenate X,Y,Z velocity variables from ALL instruments from ALL deployments from ONE site")
parser.add_argument('-site', dest='site_code', help='site code, like NRMMAI', required=True)
parser.add_argument('-files', dest='filenames', help='name of the file that contains the source URLs', required=True)
parser.add_argument('-indir', dest='input_dir', help='base path of input files', default='', required=False)
parser.add_argument('-outdir', dest='output_dir', help='path where the result file will be written. Default ./',
parser.add_argument('--site', dest='site_code', help='site code, like NRMMAI', required=True)
parser.add_argument('--files', dest='filenames', help='name of the file that contains the source URLs', required=True)
parser.add_argument('--indir', dest='input_dir', help='base path of input files', default='', required=False)
parser.add_argument('--outdir', dest='output_dir', help='path where the result file will be written. Default ./',
default='./', required=False)
parser.add_argument('-download_url', dest='download_url', help='path to the download_url_prefix',
parser.add_argument('--download_url', dest='download_url', help='path to the download_url_prefix',
default='', required=False)
parser.add_argument('-opendap_url', dest='opendap_url', help='path to the opendap_url_prefix',
parser.add_argument('--opendap_url', dest='opendap_url', help='path to the opendap_url_prefix',
default='', required=False)

args = parser.parse_args()
Expand Down