-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix: parsing arrows #336
fix: parsing arrows #336
Conversation
What is the benefit of using It can even be restricted with the |
Yeah I usually like to use arrow, because it the interface is a lot less confusing. And it has fewer object types. Most of what you want can be done within the main arrow module, while python has numerous modules I wasn't able to find a datetime equivalent to arrow.get which accepts a date string and also an int. I'm not sure why I ran into issues, but arrow won't accept a numeric strings. So I'm guessing that is why. However, pydantic seems to be modifield to handle a date str like arrow
Arrow objects can be converted into date and datetime, so it might be useful if we need to parse inputs from the database etc
|
Pydantic will handle the conversion to completed_after: date = Field(description="only download completed downloads at or after this date",default=date.fromtimestamp(0))
completed_before: date | None = Field(description="only download completed downloads at or before this date",default=None) For This is necessary cause using it inside the model means the default will change every time CDL runs, but the first time you run it, it will be saved to the config file. That means any future run will use the value from the config, not the current default from the model. |
…ible convert types for hashtable queries
Nevermind. Didn't realize these where CLI only arguments. It's fine is the both have a default value. They are never written to a configuration file |
I made some changes Removed the default from the Fields |
--completed-after and --completed-before use arrow parsing, and should accept strings so values like
2023.10.15 can be be input
Arrow will raise an expection if t can't parse a str