feat/improvements #1

Merged
kenkeiras merged 10 commits from lyz/org-rw:feat/improvements into develop 2024-07-29 14:17:18 +00:00
Collaborator

feat(Timestamp): add the from_datetime method

To update the current Timestamp instance based on a datetime or date object.

I've also included a set_datetime method to OrgTime

feat: add activate and deactivate methods to TimeRange and OrgTime

I need it in a program I'm making
refactor: Create the Time type hint

I had to move the parse_time and parse_org_time_range below OrgTime
because it used the Time type hint and the Time type hint needed the
other two

style: reformat the code following black

style: Add some type hints and docstrings

style: remove unused imports

tests: Correct some mypy errors

feat(Timestamp): add the from_datetime method To update the current Timestamp instance based on a datetime or date object. I've also included a set_datetime method to OrgTime feat: add activate and deactivate methods to TimeRange and OrgTime I need it in a program I'm making refactor: Create the Time type hint I had to move the parse_time and parse_org_time_range below OrgTime because it used the Time type hint and the Time type hint needed the other two style: reformat the code following black style: Add some type hints and docstrings style: remove unused imports tests: Correct some mypy errors
lyz added 2 commits 2024-07-20 08:47:34 +00:00
Fix implicit link parsing.
Some checks failed
Testing / pytest (push) Successful in 1m34s
Testing / mypy (push) Failing after 30s
Testing / stability-extra-test (push) Successful in 24s
4fd29819ea
To update the current Timestamp instance based on a datetime or date object.

I've also included a set_datetime method to OrgTime

feat: add activate and deactivate methods to TimeRange and OrgTime

I need it in a program I'm making
refactor: Create the Time type hint

I had to move the parse_time and parse_org_time_range below OrgTime
because it used the Time type hint and the Time type hint needed the
other two

style: reformat the code following black

style: Add some type hints and docstrings

style: remove unused imports

tests: Correct some mypy errors
lyz added 2 commits 2024-07-20 08:49:18 +00:00
lyz added 1 commit 2024-07-20 09:15:42 +00:00
style: Improve the type hints of Time

When reading them it's more natural to read Optional[Time] than to
assume that None is part of the Union in Time
lyz added 1 commit 2024-07-20 09:38:58 +00:00
lyz added 1 commit 2024-07-20 09:42:00 +00:00
That way you don't need to specify it if you don't want
kenkeiras approved these changes 2024-07-20 15:53:40 +00:00
Dismissed
kenkeiras left a comment
Owner

Looks great! I think we can merge it. I'll try to make some changes after that to the repetition code so we can specify which states are valid/understood by the usual emacs setup.

Looks great! I think we can merge it. I'll try to make some changes after that to the repetition code so we can specify which states are valid/understood by the usual emacs setup.
@ -0,0 +44,4 @@
hour=15,
minute=45,
dow="Saturday",
repetition="Weekly",
Owner

In practice, the repetition patterns are the ones for Org-mode, which you can see as part of BASE_TIME_STAMP_RE.

They generally match the regexp: (?P<repetition> (?P<rep_mark>(\+|\+\+|\.\+|-|--))(?P<rep_value>\d+)(?P<rep_unit>[hdwmy]))

For example:
+1d, ++1w or +.1m

See: https://orgmode.org/manual/Repeated-tasks.html

In practice, the repetition patterns are the ones for Org-mode, which you can see as part of `BASE_TIME_STAMP_RE`. They generally match the regexp: `(?P<repetition> (?P<rep_mark>(\+|\+\+|\.\+|-|--))(?P<rep_value>\d+)(?P<rep_unit>[hdwmy]))` For example: `+1d`, `++1w` or `+.1m` See: https://orgmode.org/manual/Repeated-tasks.html
Author
Collaborator

Fixed at 191bb75

Fixed at 191bb75
kenkeiras marked this conversation as resolved
kenkeiras added 1 commit 2024-07-20 15:53:57 +00:00
lyz added 2 commits 2024-07-26 11:36:13 +00:00
kenkeiras approved these changes 2024-07-29 11:15:23 +00:00
kenkeiras left a comment
Owner

Looks great to me! 😄

Looks great to me! 😄
kenkeiras merged commit ef893a72a0 into develop 2024-07-29 14:17:18 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kenkeiras/org-rw#1
No description provided.