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

Add management command for costs report pre-validation #610

Merged
merged 2 commits into from
Apr 28, 2017

Conversation

mkurek
Copy link
Contributor

@mkurek mkurek commented Apr 25, 2017

No description provided.

@mkurek mkurek requested a review from xor-xor April 25, 2017 12:07
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 84.903% when pulling e902be4 on mkurek:validation-mgmt-cmd into e0faa7a on allegro:develop.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 84.903% when pulling e902be4 on mkurek:validation-mgmt-cmd into e0faa7a on allegro:develop.

from datetime import datetime


def valid_date(date_):
Copy link
Contributor

Choose a reason for hiding this comment

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

It is in utils already: https://github.com/allegro/ralph_pricing/blob/develop/src/ralph_scrooge/utils/common.py#L130 ;) What about importing it as valid_date to your mgmt command..?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, I'll fix it :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 84.929% when pulling 910ecba on mkurek:validation-mgmt-cmd into e0faa7a on allegro:develop.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 84.929% when pulling 910ecba on mkurek:validation-mgmt-cmd into e0faa7a on allegro:develop.


from django.core.management.base import BaseCommand

from ralph_scrooge.utils.common import validate_date
Copy link
Contributor

Choose a reason for hiding this comment

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

s/validate_date/validate_date as valid_date/

def add_arguments(self, parser):
parser.add_argument(
'--date',
type=validate_date,
Copy link
Contributor

Choose a reason for hiding this comment

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

s/validate_date/valid_date/

class Command(BaseCommand):
"""
Detect if there is cycle in charging between PricingServices for given date
"""
def add_arguments(self, parser):
parser.add_argument(
'--date',
type=valid_date,
type=validate_date,
Copy link
Contributor

Choose a reason for hiding this comment

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

s/validate_date/valid_date/

from django.core.management.base import BaseCommand

from ralph_scrooge.utils.common import validate_date
Copy link
Contributor

Choose a reason for hiding this comment

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

s/validate_date/validate_date as valid_date/

@mkurek
Copy link
Contributor Author

mkurek commented Apr 28, 2017

@xor-xor fixed all comments

@coveralls
Copy link

coveralls commented Apr 28, 2017

Coverage Status

Coverage decreased (-0.01%) to 84.929% when pulling e17432a on mkurek:validation-mgmt-cmd into e0faa7a on allegro:develop.

@xor-xor xor-xor merged commit e7b697d into allegro:develop Apr 28, 2017
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.

None yet

3 participants