Parse and store Event dates #16
No reviewers
Labels
No labels
bug
Closed As
Duplicate
Closed As
Fixed
Closed As
Invalid
easyfix
enhancement
Priority
Critical
Priority
High
Priority
Low
Priority
Normal
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quality/testdays-web!16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dates"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This will be split into multiple Pull Requests.
In the first one, the aim is to add functions to parse testday date ranges from wiki, update db models, wire the parsing to testday creation (not tested yet) and wire up code to update past testdays (not tested yet) .
And finally, I'll change the UI (with other tweaks) to distinguish active and past testdays.
rebased onto 8c2c42d606d783aaf85a044d99747ae315163e9d
1 new commit added
Process past events2 new commits added
Process past eventsParse and store Event datesI don't see how this could work, if you are on the
1e0fb82777afrevision, theEventtable does not have thestart/endcolumns yet.If you want to retrospectively fill the dates, do it as a part of the DB schema upgrade.
Ah, nevermind, the
current_revis filled before the upgrade... I'd still rather see themisc.testdays_process_dates()call in the migration script, thoughSince you are using the method out of the
wiki.pyscope, please remove the__prefix.How about
start, end = ...instead? May not be the best option, given how you use the data later on, just pointing to the option of "better readability".Also, since the
testdays_process_dates()is only used here (to actually "fill in the missing dates"), consider renaming it to something more indicative of what it does.As I already mentioned elsewhere, since this is only really ever used to "fill in the data for old testdays", consider moving this code into the migration script instead. Would make way more sense than the current solution.
In general, rather than returing
None, consider raising a custom exception instead. That IMO makes more sense in the context of what the code does, and the code "working around" the "it either returnsNoneor a tuple with the dates" concept would also get nicer.I don't really like this. I understand the "saving characters" motivation, but adding an arbitrary attribute to the class is not the best solution to the problem at hand.
I'd rather see something in the line of:
Not a huge fan of the blanket except statement. Ideally just catch what is necessary, if that's not possible, then explain the reasoning in a comment, and at least log the exception, so one could investigate.
1 new commit added
Feedbackabsolute nitpick:
(None, None)Might be worth explaining the intent here
1 new commit added
FixupOnce you explain the regex better (e.g. in->out data), and maybe address the nitpick, feel free to merge. THX!
1 new commit added
Nits1 new commit added
Code comments1 new commit added
Polish1 new commit added
Simplify1 new commit added
Final, ultimate form1 new commit added
µNitsLGTM thx!
rebased onto
503f10bfd3Pull-Request has been merged by frantisekz