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

Conversation

ocehugo
Copy link
Contributor

@ocehugo ocehugo commented Apr 23, 2020

Just small annoying bits - missing shebangs and non-standard cmd line arguments lines.
@mhidas, worth checking if this is safe since I didn't check how you handle the calls to these tools .

@ocehugo ocehugo requested a review from mhidas April 23, 2020 00:54
@codecov
Copy link

codecov bot commented Apr 23, 2020

Codecov Report

Merging #120 (919b959) into master (ae8b06e) will increase coverage by 15.31%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master     #120       +/-   ##
===========================================
+ Coverage   54.78%   70.09%   +15.31%     
===========================================
  Files           9       12        +3     
  Lines        1150     1117       -33     
  Branches      167      146       -21     
===========================================
+ Hits          630      783      +153     
+ Misses        493      317      -176     
+ Partials       27       17       -10     
Impacted Files Coverage Δ
...tools/timeseries_products/aggregated_timeseries.py 95.29% <ø> (+7.98%) ⬆️
...odntools/timeseries_products/gridded_timeseries.py 0.00% <ø> (ø)
aodntools/timeseries_products/hourly_timeseries.py 98.22% <ø> (+9.16%) ⬆️
...eseries_products/velocity_aggregated_timeseries.py 89.70% <ø> (+89.70%) ⬆️
.../timeseries_products/velocity_hourly_timeseries.py 0.00% <ø> (ø)
aodntools/__init__.py 100.00% <0.00%> (ø)
aodntools/timeseries_products/common.py 86.44% <0.00%> (ø)
aodntools/ncwriter/__init__.py 100.00% <0.00%> (ø)
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@mhidas mhidas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ocehugo . I had thought of making similar changes. We don't use the command-line interface in prod (we just import the modules and call from Python), so this is only relevant to anyone else who might want to run the code elsewhere.
I've made a few other suggestions to apply (to all 5 scripts) while you're at it.
There's also hourly_timeseries.py, which you missed.

aodntools/timeseries_products/aggregated_timeseries.py Outdated Show resolved Hide resolved
aodntools/timeseries_products/aggregated_timeseries.py Outdated Show resolved Hide resolved
aodntools/timeseries_products/aggregated_timeseries.py Outdated Show resolved Hide resolved
@mhidas
Copy link
Contributor

mhidas commented Feb 22, 2021

Note that this changes many of the command-line arguments

  • The required parameters have become positional args.
  • Some of the optional ones have been renamed to match corresponding variable/arg names within the code.
  • Some single-letter alternatives have been added.

This brings the interface more in line with standard command-line tools (on Linux).

@mhidas mhidas added this to the v2.0 milestone Jun 7, 2022
@alexgleith alexgleith closed this Aug 18, 2022
@mhidas
Copy link
Contributor

mhidas commented Aug 21, 2022

@alexgleith Why did you close this?
I still think it's relevant, though not high priority for us as we run this code with a Python process, not from a shell. However, as this is an open-source repo (I know at least one group at UNSW using it), the command-line functionality is there and this changes it in a non-backwards-compatible way, I'm saving this until we're ready to release a v2 (see https://github.com/aodn/python-aodntools/milestones)

@mhidas mhidas reopened this Aug 21, 2022
@alexgleith
Copy link
Contributor

I closed it because it hadn't been touched for over a year. Sorry :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants