Added submission tool cutoff text and logic for the case when there is only one cutoff date (in other words, the -00 and -01 cutoffs are the same).

- Legacy-Id: 9130
This commit is contained in:
Henrik Levkowetz 2015-02-25 20:54:39 +00:00
parent 5bb83f03b5
commit acff585098
2 changed files with 53 additions and 15 deletions

View file

@ -1,3 +1,33 @@
ietfdb (5.12.0) ietf; urgency=medium
This release provides measurement of how much of the code is being exercised
by our test suite, by integrating the 'coverage.py' tool in the test suite
itself. The percentage of the code excercised by the test suite is compared
with the figure from the latest release, and a lower coverage constitutes a
test failure. This way it shouldn't be possible to add new code without
also adding tests, without getting a test suite failure. This should
encourage gradually increasing levels of test suit coverage :-)
Additionally, similar measurements and comparisons have been added for
template and URL coverage of the test suite; these also have been
implemented as tests, and sinking coverage of templates or URLs in the
test suite will result in tests failures, in the same way as for code
coverage.
The results of the test suit coverage of code, templates, and URLs is saved
to disk, in order to make the coverage details available for inspection.
Coverage data per source file/template/URL is available in json format in
a file 'coverage-latest.json' in the working directory, and more detailed
per-line code coverage data is available in a file '.coverage', which is
readable by the standalone 'coverage' program from 'coverage.py' from
http://nedbatchelder.com/code/coverage/.
* Merged in personal/henrik/v5.11.1-dev0@9103, which provides new tests
for the test suite's code coverage, template coverage, and URL coverage.
-- Henrik Levkowetz <henrik@levkowetz.com> 25 Feb 2015 19:15:36 -0000
ietfdb (5.11.2) ietf; urgency=medium
This is a minor release with a few additional bugfixes:

View file

@ -51,22 +51,30 @@ class UploadForm(forms.Form):
cutoff_00_str = cutoff_00.strftime("%Y-%m-%d %H:%M %Z")
cutoff_01_str = cutoff_01.strftime("%Y-%m-%d %H:%M %Z")
reopen_str = reopen.strftime("%Y-%m-%d %H:%M %Z")
if now.date() >= (cutoff_00.date() - meeting.idsubmit_cutoff_warning_days) and now <= cutoff_00:
self.cutoff_warning = ( 'The last submission time for new documents (i.e., version -00 Internet-Drafts) before %s is %s.<br/><br/>' % (meeting, cutoff_00_str) +
'The last submission time for revisions to existing documents before %s is %s.<br/>' % (meeting, cutoff_01_str) )
elif now.date() >= cutoff_00.date() and now <= cutoff_01:
# We are in the first_cut_off
if now < cutoff_00:
if cutoff_00 == cutoff_01:
if now.date() >= (cutoff_00.date() - meeting.idsubmit_cutoff_warning_days) and now.date() < cutoff_00.date():
self.cutoff_warning = ( 'The last submission time for Internet-Drafts before %s is %s.<br/><br/>' % (meeting, cutoff_00_str))
elif now <= cutoff_00:
self.cutoff_warning = (
'The last submission time for new documents (i.e., version -00 Internet-Drafts) before the meeting is %s.<br/>'
'After that, you will not be able to submit a new document until after %s (IETF-meeting local time)' % (cutoff_00_str, reopen_str, ))
else: # No 00 version allowed
self.cutoff_warning = (
'The last submission time for new documents (i.e., version -00 Internet-Drafts) was %s.<br/>'
'You will not be able to submit a new document until after %s (IETF-meeting local time).<br/><br>'
'You can still submit a version -01 or higher Internet-Draft until %s' % (cutoff_00_str, reopen_str, cutoff_01_str, ))
self.in_first_cut_off = True
elif now > cutoff_01 and now < reopen:
'The last submission time for new Internet-Drafts before the meeting is %s.<br/>'
'After that, you will not be able to submit drafts until after %s (IETF-meeting local time)' % (cutoff_00_str, reopen_str, ))
else:
if now.date() >= (cutoff_00.date() - meeting.idsubmit_cutoff_warning_days) and now.date() < cutoff_00.date():
self.cutoff_warning = ( 'The last submission time for new documents (i.e., version -00 Internet-Drafts) before %s is %s.<br/><br/>' % (meeting, cutoff_00_str) +
'The last submission time for revisions to existing documents before %s is %s.<br/>' % (meeting, cutoff_01_str) )
elif now.date() >= cutoff_00.date() and now <= cutoff_01:
# We are in the first_cut_off
if now < cutoff_00:
self.cutoff_warning = (
'The last submission time for new documents (i.e., version -00 Internet-Drafts) before the meeting is %s.<br/>'
'After that, you will not be able to submit a new document until after %s (IETF-meeting local time)' % (cutoff_00_str, reopen_str, ))
else: # No 00 version allowed
self.cutoff_warning = (
'The last submission time for new documents (i.e., version -00 Internet-Drafts) was %s.<br/>'
'You will not be able to submit a new document until after %s (IETF-meeting local time).<br/><br>'
'You can still submit a version -01 or higher Internet-Draft until %s' % (cutoff_00_str, reopen_str, cutoff_01_str, ))
self.in_first_cut_off = True
if now > cutoff_01 and now < reopen:
self.cutoff_warning = (
'The last submission time for the I-D submission was %s.<br/><br>'
'The I-D submission tool will be reopened after %s (IETF-meeting local time).' % (cutoff_01_str, reopen_str))