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

timeframe_n_last_days is not supported yet #19

Open
aspiers opened this issue May 2, 2013 · 5 comments
Open

timeframe_n_last_days is not supported yet #19

aspiers opened this issue May 2, 2013 · 5 comments

Comments

@aspiers
Copy link

aspiers commented May 2, 2013

No parameters are ever currently passed to the constructor of a Timeframe subclass. In particular, the config setting timeframe_n_last_days is totally ignored. I'm not sure why it was ever included in rapport.conf?

@saschpe
Copy link
Owner

saschpe commented May 13, 2013

I didn't manage to finish this so far because I wasn't sure yet how to expose this to the CLI. Similarly, I wasn't sure how the config file would ideally look like. I.e. the simple approach:

[timeframe]
default=...
timeframe_n_last_days=...
...

or more like this:

[timeframe]
default=...

[timeframe:n_last_days]
days=7

The latter is similar to how plugins are currently expressed in the config and seems more extensible to me. But it could also be overhead since it's dubious if other timeframes (than those already present) will be necessary. So I would like to get your opinion on that and simply implement the missing bits in rapport/cli.py.

@aspiers
Copy link
Author

aspiers commented May 13, 2013

I prefer the latter unless it's significantly more complex to implement. I think a timeframe allowing an arbitrary date range is worth while, and in that instance you would want

[timeframe:custom]
start=...
end=...

@saschpe
Copy link
Owner

saschpe commented May 13, 2013

And this would simply map to the Timeframe base class. I'll do it this way then

@aspiers
Copy link
Author

aspiers commented Jun 17, 2013

Now I see:

    if args.start:
        timeframe = rapport.timeframe.init("generic", start=args.start, end=args.end)

but no corresponding entry in _TIMEFRAME_CATALOG. Am I missing something?

@aspiers
Copy link
Author

aspiers commented Jun 17, 2013

Also the sample rapport.conf needs updating.

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

No branches or pull requests

2 participants