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

Command Line Arguments #3

Merged
merged 5 commits into from
Jul 24, 2020
Merged

Command Line Arguments #3

merged 5 commits into from
Jul 24, 2020

Conversation

sakshi-fermi
Copy link
Contributor

TO DO

  1. Argparse start_date and end_date currently takes dates rather than an HHMM format (if that is what we wanted). (Note: The %h%m format did not work)
  2. start_date, end_date, and duration are all optional args currently.
  3. Should I make a class/method format so that we can use these outside as well?
  4. Start date and end date are in AND here. For OR, end_date needs to be current date.
  5. Duration just takes an exact duration currently. Other calculations are currently performed by start_date - end_date.

closes #1

@beauremus beauremus self-requested a review June 23, 2020 15:33
Copy link
Member

@beauremus beauremus left a comment

Choose a reason for hiding this comment

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

I ran python dpmData.py --help and it simply ran the program rather than printing the help screen. Why isn't argparse working in this way?

dpmData.py Outdated Show resolved Hide resolved
dpmData.py Outdated Show resolved Hide resolved
dpmData.py Outdated Show resolved Hide resolved
dpmData.py Show resolved Hide resolved
dpmData.py Outdated Show resolved Hide resolved
dpmData.py Outdated Show resolved Hide resolved
@beauremus
Copy link
Member

The --help not working for me was due to the fact that I forgot to checkout the pull request branch. The help is working as expected.

Copy link
Member

@beauremus beauremus left a comment

Choose a reason for hiding this comment

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

I just realized we're missing a condition if we get just one of START_DATE or END_DATE. The rest of my comments and superficial. I'll approve the pull request once the condition is fixed.

dpmData.py Outdated Show resolved Hide resolved
dpmData.py Outdated Show resolved Hide resolved
dpmData.py Outdated Show resolved Hide resolved
dpmData.py Outdated Show resolved Hide resolved
dpmData.py Outdated Show resolved Hide resolved
Copy link
Member

@beauremus beauremus left a comment

Choose a reason for hiding this comment

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

Once VIRT01 is removed this can be approved.

dpmData.py Outdated Show resolved Hide resolved
Copy link
Member

@beauremus beauremus left a comment

Choose a reason for hiding this comment

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

I haven't run this but considering the change is small I'm betting this is good. Thanks. Sorry for the delay. I need to figure out notifications so I don't forget something like this again.

@beauremus beauremus merged commit 37eaf5f into master Jul 24, 2020
@beauremus beauremus deleted the command-line-params branch July 24, 2020 17:49
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.

Create the ability to pass parameter via the command line
2 participants