Skip to content

Commit

Permalink
minor cli updates and vernum
Browse files Browse the repository at this point in the history
  • Loading branch information
RJbalikian committed Oct 12, 2023
1 parent ad244a9 commit 50842b0
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 4,829 deletions.
4 changes: 2 additions & 2 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package:
name: sprit
version: 0.1.44
version: 0.1.45

source:
git_url: https://github.com/RJbalikian/SPRIT-HVSR
git_tag: v0.1.44
git_tag: v0.1.45

build:
number: 0
Expand Down
2 changes: 1 addition & 1 deletion docs/generate_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#Whether to convert_md using markdown library (True), or let github do it (False)
convert_md=True
rtd_theme=False #Not currently working
release_version= '0.1.44'
release_version= '0.1.45'

currentDir = pathlib.Path((__file__)).parent
docsDir = currentDir
Expand Down
4,817 changes: 0 additions & 4,817 deletions docs/main.html

This file was deleted.

12 changes: 8 additions & 4 deletions docs/sprit_cli.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ <h1 class="title">Module <code>sprit.sprit_cli</code></h1>
parameters = []
for f in hvsrFunctions:
parameters.append(inspect.signature(f).parameters)

#Add argument and options to the parser
intermediate_params_list = [&#39;params&#39;, &#39;input&#39;, &#39;hvsr_data&#39;, &#39;hvsr_results&#39;]
paramNamesList = []
Expand All @@ -101,17 +100,20 @@ <h1 class="title">Module <code>sprit.sprit_cli</code></h1>

# Add more arguments/options as needed
args = parser.parse_args()

# Map command-line arguments/options to kwargs
kwargs = {}
for arg_name, arg_value in vars(args).items():
if isinstance(arg_value, str):
if &#34;=&#34; in arg_value:
arg_value = {arg_value.split(&#39;=&#39;)[0]: arg_value.split(&#39;=&#39;)[1]}

if arg_value.lower()==&#39;true&#39;:
arg_value = True
elif arg_value.lower()==&#39;false&#39;:
arg_value = False
elif arg_value.lower() == &#39;none&#39;:
arg_value = None
elif &#34;[&#34; in arg_value:
arg_value = arg_value.replace(&#39;[&#39;, &#39;&#39;).replace(&#39;]&#39;,&#39;&#39;)
arg_value = arg_value.split(&#39;,&#39;)
Expand Down Expand Up @@ -205,7 +207,6 @@ <h2 class="section-title" id="header-functions">Functions</h2>
parameters = []
for f in hvsrFunctions:
parameters.append(inspect.signature(f).parameters)

#Add argument and options to the parser
intermediate_params_list = [&#39;params&#39;, &#39;input&#39;, &#39;hvsr_data&#39;, &#39;hvsr_results&#39;]
paramNamesList = []
Expand All @@ -225,17 +226,20 @@ <h2 class="section-title" id="header-functions">Functions</h2>

# Add more arguments/options as needed
args = parser.parse_args()

# Map command-line arguments/options to kwargs
kwargs = {}
for arg_name, arg_value in vars(args).items():
if isinstance(arg_value, str):
if &#34;=&#34; in arg_value:
arg_value = {arg_value.split(&#39;=&#39;)[0]: arg_value.split(&#39;=&#39;)[1]}

if arg_value.lower()==&#39;true&#39;:
arg_value = True
elif arg_value.lower()==&#39;false&#39;:
arg_value = False
elif arg_value.lower() == &#39;none&#39;:
arg_value = None
elif &#34;[&#34; in arg_value:
arg_value = arg_value.replace(&#39;[&#39;, &#39;&#39;).replace(&#39;]&#39;,&#39;&#39;)
arg_value = arg_value.split(&#39;,&#39;)
Expand Down
2 changes: 1 addition & 1 deletion docs/sprit_hvsr.html
Original file line number Diff line number Diff line change
Expand Up @@ -7921,7 +7921,7 @@ <h2 id="returns">Returns</h2>
</details>
</dd>
<dt id="sprit.sprit_hvsr.input_params"><code class="name flex">
<span>def <span class="ident">input_params</span></span>(<span>datapath, site='HVSR Site', network='AM', station='RAC84', loc='00', channels=['EHZ', 'EHN', 'EHE'], acq_date='2023-10-11', starttime='00:00:00.00', endtime='23:59:59.999999', tzone='UTC', xcoord=-88.2290526, ycoord=40.1012122, elevation=755, input_crs='EPSG:4326', output_crs='EPSG:4326', elev_unit='feet', depth=0, instrument='Raspberry Shake', metapath='', hvsr_band=[0.4, 40], peak_freq_range=[0.4, 40], verbose=False)</span>
<span>def <span class="ident">input_params</span></span>(<span>datapath, site='HVSR Site', network='AM', station='RAC84', loc='00', channels=['EHZ', 'EHN', 'EHE'], acq_date='2023-10-12', starttime='00:00:00.00', endtime='23:59:59.999999', tzone='UTC', xcoord=-88.2290526, ycoord=40.1012122, elevation=755, input_crs='EPSG:4326', output_crs='EPSG:4326', elev_unit='feet', depth=0, instrument='Raspberry Shake', metapath='', hvsr_band=[0.4, 40], peak_freq_range=[0.4, 40], verbose=False)</span>
</code></dt>
<dd>
<div class="desc"><p>Function for designating input parameters for reading in and processing data</p>
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "sprit"
authors = [{name="Riley Balikian"}, {name="Hongyu Xaio"}]
dynamic = ["readme"]
license = {file = "LICENSE"}
version="0.1.44"
version="0.1.45"
description = "A package for processing and analyzing HVSR (Horizontal to Vertical Spectral Ratio) data"
keywords = ["HVSR", "seismic", "horizontal to vertical spectral ratio", "obspy", 'geology', 'geophysics', 'geotechnical']
requires-python = ">=3.9"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
name="sprit",
author= "Riley Balikian",
author_email = "balikian@illinois.edu",
version="0.1.44",
version="0.1.45",
package_data={'sprit': ['resources/*', 'resources/icon/*', 'resources/themes/*', 'resources/themes/forest-dark/*', 'resources/themes/forest-light/*', 'resources/sample_data/*',]},
long_description_content_type="text/markdown",
long_description=long_description,
Expand Down
Binary file modified sprit/__pycache__/sprit_cli.cpython-311.pyc
Binary file not shown.
6 changes: 4 additions & 2 deletions sprit/sprit_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def main():
parameters = []
for f in hvsrFunctions:
parameters.append(inspect.signature(f).parameters)

#Add argument and options to the parser
intermediate_params_list = ['params', 'input', 'hvsr_data', 'hvsr_results']
paramNamesList = []
Expand All @@ -69,17 +68,20 @@ def main():

# Add more arguments/options as needed
args = parser.parse_args()

# Map command-line arguments/options to kwargs
kwargs = {}
for arg_name, arg_value in vars(args).items():
if isinstance(arg_value, str):
if "=" in arg_value:
arg_value = {arg_value.split('=')[0]: arg_value.split('=')[1]}

if arg_value.lower()=='true':
arg_value = True
elif arg_value.lower()=='false':
arg_value = False
elif arg_value.lower() == 'none':
arg_value = None
elif "[" in arg_value:
arg_value = arg_value.replace('[', '').replace(']','')
arg_value = arg_value.split(',')
Expand Down

0 comments on commit 50842b0

Please sign in to comment.