Commit graph

393 commits

Author SHA1 Message Date
Henrik Levkowetz 381d37986c Python's pathlib is now available for both 2.x and 3.x, and is well established. Removed the ietf/utils/path.py fallback, and added pathlib to requirements.txt
- Legacy-Id: 9161
2015-03-07 17:17:50 +00:00
Henrik Levkowetz 0be1ad9a2d Fixed a bug in the template coverage expression. Tweaked the informative text prefacing app coverage figures.
- Legacy-Id: 9157
2015-03-06 23:22:54 +00:00
Henrik Levkowetz e94ac990fc Added per-app coverage measurements, to make the numbers shown when not running the full tests suite a bit more meaningful.
- Legacy-Id: 9156
2015-03-06 20:42:20 +00:00
Henrik Levkowetz 86997e1e95 Turned the api.py file into a module. Moved the makeresources management command to the api module. Added some api tests. Added crawling of api files to the test-crawler. Adjusted some resource files discovered by the test suite and test-crawler. Removed a bunch of empty model files.
- Legacy-Id: 9144
2015-03-03 20:23:36 +00:00
Henrik Levkowetz dba3db444c Added test code coverage measurements using coverage.py, integrated as a test in the test suite. This test compares the current code coverage of tests with that saved for the latest release. Also converted the URL and template coverage measurements into tests, comparing current with the latest release. The result of this is that the coverage tests will fail if new code is added without sufficient test coverage to at least match that of the latest release. Over time, this should encourage gradually improved test coverage as seen for both code, templates, and urls. Coverage data is also saved to file, and can be read by the 'coverage' shell command to produce html or text reports.
- Legacy-Id: 9103
2015-02-19 23:42:34 +00:00
Ole Laursen a225fd5069 Make new branch from trunk and merge facelift-r9007 into it, fixing a few merge conflicts
- Legacy-Id: 9072
2015-02-12 10:43:52 +00:00
Henrik Levkowetz f3b22aa300 Added django.setup() to some additional scripts, as required under Django 1.7.
- Legacy-Id: 9069
2015-02-11 06:52:07 +00:00
Henrik Levkowetz 7ecfac6308 Merged in personal/henrik/django-1.7@9020 which upgrades Django from 1.6.0 to 1.7.4 and applies the needed changes to the datatracker code to work with release 1.7.x.
- Legacy-Id: 9028
2015-02-08 21:16:44 +00:00
Henrik Levkowetz 028b7e315a Reverted to [9025] because commit [9026] failed (it was incomplete with a broken working dir).
- Legacy-Id: 9027
Note: SVN reference [9026] has been migrated to Git commit 4a3749a66b
2015-02-08 20:03:16 +00:00
Henrik Levkowetz 4a3749a66b Merged in personal/henrik/django-1.7@9020 which upgrades Django from 1.6.0 to 1.7.4 and applies the needed changes to the datatracker code to work with release 1.7.x.
- Legacy-Id: 9026
2015-02-08 19:16:46 +00:00
Ole Laursen eccd8d27c4 Make new branch from trunk (r9007) and merge facelift-r8876 into it, fixing a few merge conflicts
- Legacy-Id: 9014
2015-02-06 14:08:34 +00:00
Henrik Levkowetz 970059617e Added back a general setting (removed from the Django framework in 1.7) to avoid base64-encoding of UTF-8 email messages.
- Legacy-Id: 9012
2015-02-06 12:33:24 +00:00
Robert Sparks 4988d9378c Avoid an issue with python.email breaking To header field values that it has to encode in bad places. Fixes #1589. Commit ready for merge.
- Legacy-Id: 8961
2015-02-03 20:18:27 +00:00
Ole Laursen 8d5cd02922 Summary: Add a placeholder for datepicker fields
- Legacy-Id: 8916
2015-01-26 12:53:43 +00:00
Ole Laursen b3823d5768 Summary: Fix comment on insert_after_in_ordered_dict
- Legacy-Id: 8897
2015-01-22 17:42:52 +00:00
Ole Laursen d0999c8b5e Merge facelift-r8510 branch with trunk. The IPR tool still has some non-facelifted parts and ideosyncracies. Fix a couple of minor bugs (including infamous empty licensing choice) in the IPR code, and port the IPR views to use the render shortcut.
- Legacy-Id: 8896
2015-01-22 17:38:05 +00:00
Henrik Levkowetz 49d86d691b Merged in [8861] from rcross@amsl.com:
Changes to allow upload of bluesheets in materials upload page.  Primarily for use with Interim meetings.
 - Legacy-Id: 8891
Note: SVN reference [8861] has been migrated to Git commit 40efbf4f57
2015-01-21 20:32:18 +00:00
Henrik Levkowetz be1c255be1 Merged in [8854] from rjsparks@nostrum.com:
This is the second step towards ADs out of GroupInfo into Role.
The use of group.ad has been scrubbed from the code and templates.
  - Those places that set group.ad have been directly manipulate Role objects instead
  - Most places that read group.ad now use a new group.ad_role() that returns a Role object, simplifing some views.
Related to #1555 and #1557.
 - Legacy-Id: 8888
Note: SVN reference [8854] has been migrated to Git commit 65804be683
2015-01-21 19:56:57 +00:00
Henrik Levkowetz f15ba3346b Merged in [8846] from rjsparks@nostrum.com:
Added tests for document urls that provide a revision for all the document types the view code currently handles. Refactored parts of Document and DocHistory into DocumentInfo to get the tests to pass.  (but careful review is probably warranted).
 - Legacy-Id: 8880
Note: SVN reference [8846] has been migrated to Git commit ce5bda1835b32640d17136d09262f654fade94d4
2015-01-21 19:01:47 +00:00
Henrik Levkowetz 0db48f3db0 Merged in [8840] from rjsparks@nostrum.com:\n Automatically ensure Alias records exists when Person records are changed, relieving multiple code locations of that responsibility. Fixes bug #1550.
- Legacy-Id: 8873
Note: SVN reference [8840] has been migrated to Git commit b0b3a31b10bb35eb00d29f27d75d21c3cc4edc4e
2015-01-20 22:32:01 +00:00
Ryan Cross 40efbf4f57 Changes to allow upload of bluesheets in materials upload page. Primarily for use with Interim meetings. Commit ready for merge.
- Legacy-Id: 8861
2015-01-12 18:45:50 +00:00
Ryan Cross e686c5c7f5 Allow upload of bluesheets via materials upload interface
- Legacy-Id: 8857
2015-01-09 21:29:57 +00:00
Robert Sparks 65804be683 This is the second step towards ADs out of GroupInfo into Role.
The use of group.ad has been scrubbed from the code and templates.
  - Those places that set group.ad have been directly manipulate Role objects instead
  - Most places that read group.ad now use a new group.ad_role() that returns a Role object, simplifing some views.

Related to #1555 and #1557.

Commit ready for merge.
 - Legacy-Id: 8854
2015-01-09 18:52:06 +00:00
Henrik Levkowetz 5183042d58 Merged in branch/amsl/iprtool/5.7.4@8734 from rcross@amsl.com, providing new IPR models, refactored code, and improved list, search, and management interfaces.
- Legacy-Id: 8808
2014-12-21 19:26:33 +00:00
Henrik Levkowetz a9b91deead Added a file which was missed in the 5.8.0 release.
- Legacy-Id: 8759
2014-12-18 18:37:53 +00:00
Henrik Levkowetz 00e4818ceb Alternative DRY definition of the REST api top URL; this time in ietf/urls.py. This in itself is nicer, but I'm not so sure about the use of reverse() everywhere else, instead of referring to settings.
- Legacy-Id: 8752
2014-12-17 21:26:32 +00:00
Henrik Levkowetz 3cb39d462e Define the REST api top url in settings.py, rather than having literals in multiple places in the code.
- Legacy-Id: 8751
2014-12-17 21:06:05 +00:00
Henrik Levkowetz 9cb2f17f0f Added a refinement to the pyflakes management command, to make it clearer where exceptions while running pyflakes originate.
- Legacy-Id: 8747
2014-12-14 20:35:35 +00:00
Henrik Levkowetz ed2458feac Tests for the restapi.
- Legacy-Id: 8745
2014-12-14 20:34:03 +00:00
Henrik Levkowetz 147cc96a51 Added a management command to generate (and update) resource files for tastypie, in order to have to manually maintain the resource files needed by tastypie when models are added (model changes will have to be handled manually, or by removing the old class from the resources and auto-generate it again).
- Legacy-Id: 8743
2014-12-14 20:32:12 +00:00
Ole Laursen 1d51a43be4 Summary: Fix the yyyymmdd to strftime format converter to use a single
pass through the format so that it actually works correctly
 - Legacy-Id: 8732
2014-12-12 11:24:15 +00:00
Ole Laursen 8e4459ad59 Summary: Add helper for inserting a value after another value in an
OrderedDict (or Django's SortedDict)
 - Legacy-Id: 8719
2014-11-30 14:47:17 +00:00
Ole Laursen c7342d2f30 Summary: Add specialized DateField for triggering Bootstrap datepicker
- Legacy-Id: 8712
2014-11-25 16:43:50 +00:00
Henrik Levkowetz f2d3d4213a Reworked the generation of draft aliases and WG aliases, after trying out the output of the previous version for real. This code seems to work better, based on tests on ietfa.
- Legacy-Id: 8633
2014-11-11 01:09:30 +00:00
Robert Sparks 5ca9581072 Reworked smtp error warning and logging to not use hard-to-read context_managers. Fixes bug #1390. Commit ready to merge.
- Legacy-Id: 8584
2014-11-04 19:49:22 +00:00
Henrik Levkowetz 1bf4356002 Improved regex for the Dr.-Ing. honorific fix.
- Legacy-Id: 8509
2014-10-29 06:53:34 +00:00
Henrik Levkowetz 770f79e601 Added 'Dr.-Ing.' to the recognised honorifics in the author extraction code.
- Legacy-Id: 8508
2014-10-29 06:24:41 +00:00
Henrik Levkowetz 46cb5cbdca Did a number of changes to the author extraction method of class Draft in order to make it able to match up names with double-word family names on the first page (A. Foo Bar) with (familyname, given-name) ordering (Foo Bar Any) in the Authors' Addresses section. Regression tested against 200+ known good author extraction results. A number of stronger restrictions in regular expressions had to be introduced to avoid regression, which is probably all to the good.
- Legacy-Id: 8507
2014-10-28 15:45:47 +00:00
Henrik Levkowetz e3077c6e50 Fixed a bug in the new ISO-date code for draft metadata extraction.
- Legacy-Id: 8502
2014-10-27 17:01:16 +00:00
Henrik Levkowetz 4dddf14be0 Added support for ISO-format dates (or RFC 3339 dates, if you will) to the date parsing done for the submission tool. Also refined the regexes a bit to avoid false matches on for instance things like 'Juniper 2014'.
- Legacy-Id: 8501
2014-10-27 16:51:19 +00:00
Henrik Levkowetz 9d5a9c143e Reverted changes in ietf/utils/draft.py which should not have been part of [8499].
- Legacy-Id: 8500
Note: SVN reference [8499] has been migrated to Git commit a8ddac15e2
2014-10-27 16:35:50 +00:00
Henrik Levkowetz a8ddac15e2 Merged in [8498] from rjsparks@nostrum.com:\n Reworked logic flow for editing shepherds. Added message to inform the user when the shepherd is not changed. Fixes bug #1508.
- Legacy-Id: 8499
Note: SVN reference [8498] has been migrated to Git commit 055202dee4
2014-10-27 16:01:51 +00:00
Henrik Levkowetz 704589b4c7 Merged in branch/iola/people-cleanup @ [8471] from olau@iola.dk, which
enhances a number of pages in the datatracker where forms contain fields
  where a person should be chosen, such as for instance when choosing the
  shepherd of a document, so that they uniformly display choices which show
  both email address and name.

  Furthermore, changes have been made so as to make the email address
  uniformly act as reference to the person record.  

  Autocompletion is now consistently provided when looking for the email
  address or name of the person to choose.  

  This solves a number of issues where it has been difficult to choose the
  correct Person/Email combination, and where the correct email address to use
  for an association has been unavailable previously.
 - Legacy-Id: 8472
Note: SVN reference [8471] has been migrated to Git commit d62f2343e8
2014-10-25 21:05:50 +00:00
Henrik Levkowetz d4e5f070af Merged in [8293] from rjsparks@nostrum.com:\n XXX: Should what is now captured in the list of STATUSCHANGE_RELATIONS instead be captured in the database in name_docrelationshipname?
Refactored editing the notify field to remove redundant code.
Changed the default notification list to include .all for documents, and the wg list for wg documents.
Allowed recalculating the notification list for all document types.
Improved the calculated notification list value for charters, conflict-reviews, and status-changes.
Adds shepherds to the notification list when they are assigned to a document.
Adds the working group email list to the notification list when a document is adopted.
Fixes #1438
 - Legacy-Id: 8385
Note: SVN reference [8293] has been migrated to Git commit 640c5eb52ace8bb6d2c1b3ca6c14ef10ad0f324f
2014-10-12 17:32:11 +00:00
Henrik Levkowetz 4cc4f5080c Merged in [8254] from rjsparks@nostrum.com:\n Don't send mail to unknown-email-* addresses. Fixes bug #1471.
- Legacy-Id: 8365
Note: SVN reference [8254] has been migrated to Git commit f7f29a62588eac9b2aaf26cd0401a910fa48403f
2014-09-28 18:51:21 +00:00
Ole Laursen f7ac066059 Integrate Secretariat tools MultiEmailField with the one in
utils/fields.py, also fix a couple of issues in NomCom tool (spelling
bugs and avoid overwriting base_fields on forms with dynamic data)
 - Legacy-Id: 8276
2014-08-17 14:39:23 +00:00
Ole Laursen f291a466d7 Change Document.shepherd to point to the email address rather than the
person, add migration to fix the existing shepherds, fix wording and
max entries on change shepherd page to be more self-explanatory
 - Legacy-Id: 8268
2014-08-13 11:40:01 +00:00
Henrik Levkowetz a73163993a Rewrote the draft-alias and group-alias generation scripts to generate matching aliases and virtual files for postfix.
- Legacy-Id: 8055
2014-07-08 14:25:14 +00:00
Henrik Levkowetz 09f654b1f4 Merged in branch/iola/team-support from olau@iola.dk. This generalises and extends the group support for WGs and RGs so that also other groups, such as for instance the Edu Team, can have pages.
- Legacy-Id: 8013
2014-07-02 19:30:07 +00:00
Henrik Levkowetz 8aba7e97fc Provide a better message if pyflakes fails due to syntax errors in a python file.
- Legacy-Id: 8011
2014-07-01 21:12:03 +00:00
Henrik Levkowetz f00f589e66 Renamed a very specialized function from email_secretariat() to email_iesg_secretary_re_charter().
- Legacy-Id: 7923
2014-06-17 16:31:12 +00:00
Ole Laursen f9ee750afd Make it possible to adjust the name of new materials upon upload, also fix a couple of warnings from PyFlakes
- Legacy-Id: 7914
2014-06-13 12:30:42 +00:00
Robert Sparks 393422b36b Improves the robustness of the SMTP error handling utilities. Fixes bug #1409. Commit ready for merge.
- Legacy-Id: 7766
2014-05-22 01:28:33 +00:00
Robert Sparks bf4f3ad75f Made several changes to better handle non-ascii UTF-8 in email messages.
Used multipart mime when including the original message in an error message to the secretariat.
Modified the way IANA review email is parsed.
Added non-ascii UTF-8 tests to the IANA review email parser and to the SMTP Exception handling code.

Commit ready for merge.
 - Legacy-Id: 7673
2014-04-29 18:45:37 +00:00
Henrik Levkowetz 4b6ca22ff7 Merged in [7635] from rjsparks@nostrum.com:
Replumbed how SMTP Exceptions are handled, which involved refactoring several mail functions
 - Legacy-Id: 7637
Note: SVN reference [7635] has been migrated to Git commit 73b0831b57
2014-04-24 22:14:57 +00:00
Robert Sparks 73b0831b57 Replumbed how SMTP Exceptions are handled, which involved refactoring several mail functions
- Legacy-Id: 7635
2014-04-24 18:29:01 +00:00
Henrik Levkowetz fe5d53fc40 Merged in [7591] from rjsparks@nostrum.com:
Adds a real (if simple) SMTP server to the test framework and tests handling of exceptions and rejected addresses. Fixes ticket #1314.
 - Legacy-Id: 7613
Note: SVN reference [7591] has been migrated to Git commit 54919f01343995ab154d27dcfaf7a60b15dd5eee
2014-04-16 19:40:57 +00:00
Henrik Levkowetz 454c9d83cb Fixed support for verbosity and overwrite flags for the import_htpasswd command, which was lost in [7583].
- Legacy-Id: 7585
Note: SVN reference [7583] has been migrated to Git commit 4c0d52d9ed
2014-04-09 18:34:18 +00:00
Henrik Levkowetz 4c0d52d9ed Split out the actual htpasswd import functionality from the BaseCommand subclass, so we can call it from elsewhere.
- Legacy-Id: 7583
2014-04-09 18:28:42 +00:00
Henrik Levkowetz 156b0d4e3a Changed the code to use django's own authentication, instead of http basic auth. This will let people log out, and will also use stronger password hashing than basic auth. Added a login page, and logout links, and links from the logged in username (in the upper right corner) to the user's profile page.
- Legacy-Id: 7580
2014-04-07 18:56:44 +00:00
Henrik Levkowetz b02b0a96df All tests pass, except for some pyflakes tests which I believe are fixed in trunk.
- Legacy-Id: 7579
2014-04-06 20:04:36 +00:00
Henrik Levkowetz 3a3b386a0e A htpasswd import script, for the transition from basic http auth to Django native authentication.
- Legacy-Id: 7578
2014-04-06 17:20:31 +00:00
Henrik Levkowetz 8c42989d5d Pyflakes cleanup compliant with pyflakes 0.8.1, which seems to find things 0.8.0 didn't fin.
- Legacy-Id: 7558
2014-04-01 16:25:18 +00:00
Henrik Levkowetz af4c6e253c Exclude empty email addresses from the send list.
- Legacy-Id: 7552
2014-03-27 22:09:37 +00:00
Henrik Levkowetz 0643f3c542 Added a pyflakes test.
- Legacy-Id: 7505
2014-03-16 18:24:31 +00:00
Henrik Levkowetz b9cbb236dd Renamed flakes.py to pyflakes, and fixed the import setup so it won't try to import itself. Added verbosity control.
- Legacy-Id: 7502
2014-03-16 18:16:37 +00:00
Henrik Levkowetz 6606538453 Fixed mistaken outcomment.
- Legacy-Id: 7497
2014-03-16 07:48:59 +00:00
Henrik Levkowetz 49edc7404e Made ietf/utils pyflakes-clean.
- Legacy-Id: 7496
2014-03-16 07:26:03 +00:00
Henrik Levkowetz 02031a01b9 Cleaned out some (arbitrary) submodule name imports into ietf.utils, and made the corresponding import statements import the names directly from the correct submodules.
- Legacy-Id: 7495
2014-03-16 07:09:38 +00:00
Henrik Levkowetz b9c38d3c06 Merged pyflakes fixes forward to new copy of trunk.
- Legacy-Id: 7463
2014-03-15 16:27:05 +00:00
Henrik Levkowetz 5bef5d11ae Made doc/ pyflakes-clean.
- Legacy-Id: 7462
2014-03-15 16:09:47 +00:00
Henrik Levkowetz b91524fabc Merged [7368] from rjsparks@nostrum.com: Improves the detail in the messages sent when creating tickets about failed sent email.
Changes a locally defined exception name to look less like one already defined in smtplib.
This is related to ticket #1208.
 - Legacy-Id: 7382
Note: SVN reference [7368] has been migrated to Git commit 08f13239c9beb6dcb0be978e800b82c4104b61e7
2014-03-01 18:13:43 +00:00
Henrik Levkowetz 0eefa5760c Added a management command to run pyflakes, with the added feature of being able to mark individual lines with # pyflakes:ignore, which is needed in some cases.
- Legacy-Id: 7367
2014-02-25 20:22:20 +00:00
Henrik Levkowetz 3f55454724 Merged [7292] from rjsparks@nostrum.com: Allow 1-3 digit RFCs in status change documents.
Fixes bug #1321
 - Legacy-Id: 7295
Note: SVN reference [7292] has been migrated to Git commit 31808eccb2
2014-02-24 23:10:21 +00:00
Robert Sparks 31808eccb2 Allow 1-3 digit RFCs in status change documents.
Fixes bug #1321
Commit ready for merge
 - Legacy-Id: 7292
2014-02-24 15:43:32 +00:00
Henrik Levkowetz 9ea9ba1d66 Merged in [7138] from rjsparks@nostrum.com:
Reworked SMTP Exception handling, adding sending a ticket to the secretariat when there are errors handing messages off for delivery.
Added SMTP exception handling to send-scheduled-mail.
This is related to ticket #1208
 - Legacy-Id: 7256
Note: SVN reference [7138] has been migrated to Git commit 64727c1c33
2014-02-17 18:55:37 +00:00
Henrik Levkowetz 5d1bdde730 Added control by the --verbosity switch of the not loaded template test and not tested urls test, so they only will be run for verbosity greater than 1.
- Legacy-Id: 7244
2014-02-16 16:49:34 +00:00
Henrik Levkowetz 35cadc1763 Don't show deprecation warning during tests for verbosity < 2
- Legacy-Id: 7205
2014-02-04 21:35:19 +00:00
Ole Laursen e2554a6a0c It turns out that Django resetting the user if REMOTE_USER is not passed in is a problem on live to, so switch the whole code base to using the middleware to set REMOTE_USER from the logged in user if not passed in from the outside
- Legacy-Id: 7167
2014-01-24 14:30:00 +00:00
Ole Laursen 591e90a7a0 Put a proper command-line interface on the test crawler, spit out number of errors (if any), also add wrapper script for running the test-crawler and idindex generation scripts, in the future other (safe, non-mutating) scripts operating on real data can be added too
- Legacy-Id: 7107
2014-01-12 16:55:42 +00:00
Ole Laursen 86f2baea0a Move group feed from wgcharter (where it historically ended up) to wginfo, add test
- Legacy-Id: 7086
2014-01-09 16:24:54 +00:00
Ole Laursen 954c8fcedb Fix spelling mistake in patterns that are ignored in coverage check
- Legacy-Id: 7080
2014-01-08 17:41:40 +00:00
Ole Laursen 8dc19fd17e Improve the coverage checker, skip some trivial views (redirects and
flat templates)
 - Legacy-Id: 7078
2014-01-08 17:00:37 +00:00
Ole Laursen cb4d5b7c2b Simplify make_test_data a bit by using the create_person helper for the chair and WG delegate, regularize the naming of those
- Legacy-Id: 6990
2013-12-18 16:27:02 +00:00
Ole Laursen 72e36bde55 Don't output coverage data if there are test failures
- Legacy-Id: 6959
2013-12-17 10:08:12 +00:00
Ole Laursen beda4bafcd Fix bug with coverage testing
- Legacy-Id: 6937
2013-12-16 13:06:41 +00:00
Ole Laursen 7aa3737c3b Reenable RemoteUserMiddleware, it turns out the Secretariat tests are
using REMOTE_USER to auth instead of logging in - instead include a
little middleware class that adds the REMOTE_USER header during
testing.

Also fix problem with the empty test_label hack not working with
double-dotted Secretariat apps.
 - Legacy-Id: 6935
2013-12-16 12:59:27 +00:00
Ole Laursen 77e03c7355 Fix bugs in stream edit test
- Legacy-Id: 6933
2013-12-16 11:55:15 +00:00
Ole Laursen 7f25469c6b Drop the group/person/role global fixtures, the fixture loader in
Django 1.6 refuses to load them because they have dangling foreign
keys, and in rewriting them it turns out it is easier to do so in code
- so refactor the test data generation code to have a separate
function with the unchanging base data and call that from the global
fixture setup
 - Legacy-Id: 6917
2013-12-13 15:58:36 +00:00
Ole Laursen c9984e40fc Call base class fixture handling in perma_fixtures hack rather than
duplicating the (now incorrect) code from the base class
 - Legacy-Id: 6915
2013-12-13 15:39:34 +00:00
Ole Laursen b4706af925 Fix problem with tests and RemoteUserMiddleware - it interferes with
the tests, also fix bug in previous test runner refactor
 - Legacy-Id: 6914
2013-12-13 15:37:04 +00:00
Ole Laursen dec6862787 Make GLOBAL_TEST_FIXTURES support Python functions as fixtures
- Legacy-Id: 6906
2013-12-13 13:13:03 +00:00
Ole Laursen c470e57dae Port test runner to new Django interface
- Legacy-Id: 6903
2013-12-13 11:22:40 +00:00
Ole Laursen cfa0d47ca0 Port to new class-based generic redirect and simple template views, remove utils.lazy.reverse_lazy, it's now included in Django
- Legacy-Id: 6878
2013-12-11 16:36:09 +00:00
Ole Laursen 3053bef4cc Resurrect URL coverage making it work with all tests, and move it to the test runner together with the template coverage report
- Legacy-Id: 6844
2013-12-07 19:31:32 +00:00
Ole Laursen f6fa699992 Fix MultiEmailField to use validate_email for validation
- Legacy-Id: 6835
2013-12-07 12:54:24 +00:00
Ole Laursen 58afa08edf Remove import of unused FKAsOneToOne
- Legacy-Id: 6834
2013-12-07 12:49:32 +00:00
Ole Laursen 924d58f935 Remove model field utilities that were needed because of brokenness in the old schema
- Legacy-Id: 6833
2013-12-07 12:37:29 +00:00
Ole Laursen 3e709e3f24 Remove proxies
- Legacy-Id: 6826
2013-12-07 12:01:57 +00:00
Ole Laursen bb2d070679 Redo tests for IPR to cover all views, fix some bugs and add some
finishing touches
 - Legacy-Id: 6779
2013-12-03 18:33:07 +00:00
Ole Laursen 9457669310 Merge in changes from the old shimfree branch
- Legacy-Id: 6764
2013-11-27 12:55:50 +00:00
Ole Laursen 6174e72036 Rename unique key to random key as it is not really unique, add function for generating an access token from the key
- Legacy-Id: 6716
2013-11-15 16:07:10 +00:00
Ole Laursen e98abbf56d Change the port accepted for debug purposes to 2025 instead of 1025 to
not conflict with the port on the live server
 - Legacy-Id: 6715
2013-11-15 13:55:10 +00:00
Ole Laursen fd01ddd215 Make the mail code detect USING_DEBUG_EMAIL_SERVER which if set to
true and EMAIL_HOST and EMAIL_PORT is set to localhost:1025 will turn
on debugging which essentially makes it send emails; also added
instructions for starting the debugging SMTP server bundled with
Python

  python -m smtpd -n -c DebuggingServer localhost:1025

in a comment near the code
 - Legacy-Id: 6713
2013-11-15 12:57:31 +00:00
Ole Laursen 322e15e9a9 Add generate_unique_key utility for generating access tokens (like
abda31fee90aabe...)
 - Legacy-Id: 6712
2013-11-15 12:52:33 +00:00
Henrik Levkowetz 258ac770b3 Better handling of draft name extraction when there's no extension given.
- Legacy-Id: 6675
2013-11-06 22:18:51 +00:00
Henrik Levkowetz 7925223ef8 Merged [6622] from rjsparks@nostrum.com:
Refines Bill Fenner's regex based search through documents for references.
Populates RelatedDocument with relations for references for each type draft Document.
Replaces these reference relationships with updated copies on draft submission.

Note to deployer: There is a script to run in patches/fill_in_references.py that does the work of bringing the database up to date. It takes around 10 minutes to complete on a fast development laptop.

fixes bug #1173
 - Legacy-Id: 6633
Note: SVN reference [6622] has been migrated to Git commit a677a70df3
2013-11-02 23:04:28 +00:00
Robert Sparks a677a70df3 Refines Bill Fenner's regex based search through documents for references.
Populates RelatedDocument with relations for references for each type draft Document.
Replaces these reference relationships with updated copies on draft submission.

Note to deployer: There is a script to run in patches/fill_in_references.py that does the work of bringing the database up to date. It takes around 10 minutes to complete on a fast development laptop.

fixes bug #1173
 - Legacy-Id: 6622
2013-11-02 21:11:07 +00:00
Robert Sparks e309ff92b3 Don't insert references to self.
Move the data filler from a migration to a standalone script
 - Legacy-Id: 6620
2013-11-02 20:59:43 +00:00
Henrik Levkowetz 84eee2e83c Extract the proper directory to combine with the relative path of the urlist diff master, instead of using getcwd() .
- Legacy-Id: 6618
2013-11-02 20:23:47 +00:00
Robert Sparks b18249222b Refines Bill Fenner's regex based search through documents for references.
Populates RelatedDocument with relations for references for each type draft Document.
Replaces these reference relationships with updated copies on draft submission.
Note to deployer: This migration takes around 10 minutes to complete on a fast development laptop.
 - Legacy-Id: 6572
2013-10-30 20:51:11 +00:00
Henrik Levkowetz 2e6fa148f3 Tweaked the testurl diff output text.
- Legacy-Id: 6534
2013-10-29 22:22:54 +00:00
Henrik Levkowetz da8c38f55d Tweaked the display of testurl.list diff failures against known-good masters.
- Legacy-Id: 6494
2013-10-27 10:03:43 +00:00
Henrik Levkowetz d8e3e32ee7 Set TEMPLATE_STRING_TO_INVALID to '' during testing.
- Legacy-Id: 6493
2013-10-27 10:02:21 +00:00
Henrik Levkowetz e27e4dbb1f Changed the 'pipe' utility to work with commands taking input
on standard in, also when providing an emtpy string as input.
This is now different from providing 'None' as the input
argument, or omitting it.
 - Legacy-Id: 6485
2013-10-23 20:45:07 +00:00
Henrik Levkowetz 65d505edf3 Fixed some bugs in the method which saves a copy of a page which failed a
testurl diff test.
 - Legacy-Id: 6450
2013-10-15 17:37:30 +00:00
Henrik Levkowetz b951a187a7 If we have a diff with a known-good master in a testurl.list file, save the
failed file for inspection.
 - Legacy-Id: 6447
2013-10-14 18:38:13 +00:00
Henrik Levkowetz bc0e4e5614 Tweaked the makefixture command to not recurse on reverse relationships.
- Legacy-Id: 6446
2013-10-14 18:36:20 +00:00
Henrik Levkowetz e5c5d4cafa Tweaked the return handling for urltest diffs.
- Legacy-Id: 6444
2013-10-13 23:43:50 +00:00
Henrik Levkowetz ec05016585 Added a test assertion in the case of a failed urltest diff, to have the
test noticed as failed.
 - Legacy-Id: 6441
2013-10-13 21:12:23 +00:00
Henrik Levkowetz 90e95e6f15 Repurpose the 'master' column in testurl.list files to point to a local
known-good master file, for comparisons.
 - Legacy-Id: 6433
2013-10-13 17:46:19 +00:00
Ole Laursen f6ff2a8082 Delete all old WGAction stuff, it's superceded by the WG charter
support, clean up iesg/models.py a bit
 - Legacy-Id: 6411
2013-10-10 16:12:34 +00:00
Henrik Levkowetz 3020c5f7eb Imported a new version of the draft metadata extraction module, which
calculates page numbers more reliably, doesn't include duplicates in
the list of referenced drafts, and other minor tweaks.
 - Legacy-Id: 6362
2013-10-04 13:50:14 +00:00
Henrik Levkowetz a07f47a4a0 Added a new TestCase class, subclassing django.test.TestCase, in order to
be able to add fixtures once and for all for all tests, instead of loading
them again and again for each test, if running on a database that supports
transaction rollbacks.  In this case, fixtures specified in the perma_fixtures
class attribute will be loaded permanently, and not re-loaded.  Fixtures
specifice as before, in a fixtures class attribute, will be treated as
before.

The downside of this is that as fixtures are loaded and not unloaded, they
can conflict with each other.  The requirements on consistency becomes much
greater.  The effect of this has been to require quite a bit of changes to
the simplified creations of various objects in make_test_data() in cases
where identically named objects occur in fixtures.  Where completely
fictitious objects are created, no conflicts appear.

Also re-wrote parts of test_runner.py to permit global fixtures, loaded
before any tests are run and shared by all.
 - Legacy-Id: 6318
2013-09-30 20:22:24 +00:00
Henrik Levkowetz b335ef3b5c Imported a newer version of makefixture from github. It handles reverse relationships in a less hackish way than my hack.
- Legacy-Id: 6314
2013-09-30 14:24:14 +00:00
Ole Laursen 52febb2fc0 Fix spelling bug in global[e] test fixtures
- Legacy-Id: 6311
2013-09-30 12:17:15 +00:00
Henrik Levkowetz 4b568f8d22 Empty models.py, needed to make django look for management/commands/.
- Legacy-Id: 6310
2013-09-29 21:15:06 +00:00
Henrik Levkowetz 6e9e1930e2 Added a makefixture management command, from http://djangosnippets.org/snippets/918/, somewhat hacked.
- Legacy-Id: 6307
2013-09-29 20:50:51 +00:00
Ole Laursen f13837ef5f Add support for global test fixtures to avoid loading them for all
tests
 - Legacy-Id: 6304
2013-09-29 17:32:52 +00:00
Henrik Levkowetz 2a2389d17f Merged in branch/iola/shimfree@6083. This cleans up and moves relevant code from idrfc/ to doc/. There should now only be a bit of old wrapper code left in idrfc; that will go away when the remaining models which use it are cleaned up.
- Legacy-Id: 6117
2013-09-09 17:45:36 +00:00
Henrik Levkowetz ed020c8b8e Add Auto-Submitted and Precedence header fields to outgoing email messages.
- Legacy-Id: 6071
2013-08-17 15:33:56 +00:00
Ole Laursen de7ae60985 Move markup_txt.py from idrfc/ to utils/
- Legacy-Id: 6046
2013-08-13 14:33:22 +00:00
Henrik Levkowetz 6baea429aa Merged in the nomcom app from ejimenez@yaco.es and esanchez@yaco.es, and accompanying dbtemplate app and the (standard) docutils module. Added some tweaks to get all tests to pass and migrations to run.
- Legacy-Id: 5948
2013-08-06 10:09:29 +00:00
Henrik Levkowetz 8675711c27 Merged [5902],[5904] from markus.stenberg@iki.fi:
Added support and scripts for generation of wg- and draft-aliases.  Fixes issue #713.
 - Legacy-Id: 5937
Note: SVN reference [5902] has been migrated to Git commit e5b551f4ce

Note: SVN reference [5904] has been migrated to Git commit e68e51cc55
2013-08-01 12:44:49 +00:00
Henrik Levkowetz 4ed0337cae Made the code which uses the 'magic' module to determine file type and encoding work with both the old and new interface to python-magic.
- Legacy-Id: 5876
2013-07-25 14:45:01 +00:00
Henrik Levkowetz cbfe489ff5 Merged in more shim-layer removals from olau@iola.dk
(-r5465:HEAD from branch/iola/shimfree).  Copying relevant
commit messages here:

 - Deleted dead code in many places.

 - Renamed id-something to draft-something, make the "is
   this eligible for expiration" logic clearer

 - Added a name for IPR search URL

 - Revamped the ballot popup view

 - URL reversed the IPR search link instead of hardcoding it

 - Cleaned up search views and remove dead code, port them to the new DB
   schema, hack related views in iesg/ and wginfo/ to use the new search
   interfaces, avoid camelCase in search GET parameters (with
   backwards-compat fallback), add some simple search unit tests, remove
   caching from views_search.py index pages as they're now pretty fast to
   generate, rewrite ballot popup JS, regularize some CSS classes to use
   hyphen-notation rather than camelCase, move some of the search
   templates to doc/.

   idrfc/ now mostly contains some wrapper code still in use by other
   subdirs, some ported code not yet moved, and dead code.

 - Fixed output bug in test crawler and print referrer upon errors so it's
   easier to figure out where a link came from

 - Added /doc/in-last-call/ to crawler, report original page as referrer in
   a redirect chain rather than intermediate URL

 - Ported idindex to new schema, speed them up, add tests, refactor index
   page in views_search to share code with the text index file, get rid
   of some special-case idindex filters from ietf_filters, move
   "/drafts/" redirects to a file in /doc/

 - Ported /idtracker/status/ and /idtracker/status/last-call/ overview of
   drafts in IESG process to new schema in /doc/iesg/ and
   /doc/iesg/last-call/

 - Added redirects for all of /idtracker/*, removed all view code and other
   dead code from idtracker/

 - Removed the idtracker sitemap indexing drafts - in its current form,
   it adds nothing of value to the HTML-based /doc/all/ view, and it's
   pretty slow

 - Ported idtracker feeds to new schema, move them to doc/, cleaned up
   idtracker/ - only templatetags/ietf_filters and proxy code is left
 - Legacy-Id: 5836
2013-07-17 20:52:39 +00:00
Henrik Levkowetz e678659b56 Merged in a lot of shim-layer removals from olau@iola.dk
(-r5194:5465 from branch/iola/shimfree).  Copying relevant
commit messages here:

  - Removed .related many to many relationship, it's not really useful
    since we always have to restrict on the relationship type anyway,
    instead add two helpers for doing the necessary queries (in both
    directions)

  - Added migration for transforming the .desc on the new_revision events
    into something more akin to what is actually shown in the history page

  - Added migration for blanking IESG notes that just consist of "RFC
    XXXX", these have been superfluous for some time

  - Grant stream chairs access to changing the stream on a draft

  - Hacked the format_history_text filter to be less weird, using the same
    formatting for snippets and full text, also link up legacy ballot set
    events

  - Moved the decoraters + utilities to new ietfauth/utils.py file

  - Added simple helper to Email to identify invalid email addresses (from
    legacy author entries)

  - Used new new_revision .desc format for when drafts are submitted

  - Improved the looks of the button class by adding extra contrast and a
    linear gradient. Currently the gradient is only visible in fairly
    recent browsers.

  - Rewrote draft and RFC tabs in terms of the new schema, porting
    write-up and history tabs as well

  - Fixed two bugs in RFC Editor syncing: make sure documents we don't know
    beforehand get a "draft" type and make sure individually submitted
    drafts get the type="individ" group instead of NULL

  - Made the CSS-styled button feel a bit nicer to use by flattening the
    active state, also introduce some temporary styles until browsers
    catch up with the standard syntax

  - Added migrations for fixing 1) a dummy RFC entry, 2) three stand-alone
    RFCs that didn't get their doc.type set, 3) a big bunch of historic
    stand-alone RFCs that have doc.group=None - set these to the
    individual submission "none" group for the time being so the view code
    doesn't have to deal with a special case.

    In some cases this is wrong since there actually was a WG associated
    but unfortunately fixing them properly requires detective work
    (probably parsing the RFCs) and in at least some cases recreating
    historic WGs. In case someone ends up doing this, the documents to
    check can still be found with

    Document.objects.filter(name__startswith="rfc", group__type="individ")
    since there are almost no new RFCs that didn't went through the I-D
    process.

  - Merged the I-D and RFC views by showing I-D information on RFCs too.
    I-Ds that have been published as RFCs redirect to the RFC URL. Also
    support alias URLs so e.g. /doc/bcpXXXX redirects to /doc/rfcXXXX.

  - Fixed revision augmentation so events after RFC publication gets a "RFC"
    designation

  - Fixed a bug with tabs not using provided name but rather doc.name

  - Displaying draft-iesg state rather than doc.friendly_state as IESG state,
    also show a notice that the IESG state refers to post-RFC processing
    if it does, like the old separate RFC page did

  - Fixed the RFC number doc.note migration to catch combined "RFC XXX; BCP
    XXX" notes too, use the opportunity to remove inserted HTML tags from
    notes and rely on linebreaksbr filter instead (the other thing was a
    left-over from the Perl days), update the various uses of the note to
    reflect that

  - Refactored slightly to make views_doc.py independent of other idrfc code

  - Moveed idrfc/views_doc.py to doc/ with associated templates, replace the
    somewhat fragile simple URL tests for views_doc.py with ordinary unit
    tests. The new tests are still fairly basic but at least test more
    than the URL tests did.

  - Made sure RFC's (and BCP/STD/FYI) are stored as RFC123 instead of
    RFC0123 in the alias table with a new migration and a change to the
    RFC Editor sync, this in turn makes /doc/std1/ do the right thing

  - Now /doc/std1/ works, we can actually do a local link in
    urlize_ietf_docs rather than linking to the tools.ietf.org server

  - Fixed history text formatter: sanitize HTML before adding linebreaks and
    non-breaking spaces, this cuts the time to render a history page with
    long comments in half

  - Added a test crawler that walks through the crawlable part of the site,
    reporting errors and slow pages

  - Got rid of initial "No record" positions when showing old positions,
    it's just noise

  - Added a .select_related() to the document main tab to reduce the number
    of DB queries, unfortunately it seems it doesn't really help with
    Django 1.2.x due to a bug (Document inherits from DocumentInfo which
    makes things a bit more complicated)

  - Introduced a simple cache in doc.get_state so repeated reads don't
    cause a DB query

  - Cleaned up the search code in preparation for removal of the shim-layer;
    use a static button and don't send extraneous GET parameters

  - Removed dead code in several places
 - Legacy-Id: 5830
2013-07-15 20:55:24 +00:00
Henrik Levkowetz 3105101cc5 Changed test running and test data generation to work with database rollback
(for instance with InnoDB).

Added settings.DATABASE_TEST_OPTIONS which can be used to force for instance
InnoDB use during testing.

Using this has the potential of reducing the time it takes to run the test
suite substantially; a few test runs indicate a reduction in test run time by
50% on a run-of-the-mill linux server.
 - Legacy-Id: 5823
2013-07-15 07:21:34 +00:00
Robert Sparks a741642717 Added editing last call messages, requesting, issuing and tracking IETF LCs to status-change documents
Added a Cancel button to the form that allows editing the relations for status-change documents
Added instructions to the agenda section 3.3

This adds states to status-change- documents and has a migration that must be applied.

This fixes bug #1039
 - Legacy-Id: 5770
2013-06-01 21:01:45 +00:00
Henrik Levkowetz 5bee7ac538 Provide the necessary message information to the user confirmation messaging. Fixes issue #1049.
- Legacy-Id: 5767
2013-05-31 16:32:25 +00:00
Henrik Levkowetz bd0c07290a Merged in branch/iola/milestones, which provides datatracker support for management of WG milestones.
- Legacy-Id: 5739
2013-05-15 22:07:23 +00:00
Henrik Levkowetz 927efe2b7c Merged [5600] and [5602] from rjsparks@nostrum.com:
Changed the header to last call messages to IETF Announce and to IANA to make
replying to the announcement less likely to create an unnecessary ticket.
 - Legacy-Id: 5652
Note: SVN reference [5602] has been migrated to Git commit 19dcf10316
2013-04-15 22:24:22 +00:00
Ole Laursen 3d1eb07afe Port idindex to new schema, speed them up, add tests, refactor index
page in views_search to share code with the text index file, get rid
of some special-case idindex filters from ietf_filters, move
"/drafts/" redirects to a file in /doc/
 - Legacy-Id: 5634
2013-04-10 11:48:07 +00:00
Henrik Levkowetz 7a98fff79c Merged [5476] from rjsparks@nostrum.com:
* Added a document type for changing the publication status of other documents, and the UI for manipulating them.
* Added charters, conflict reviews, and status changes to the AD's \'My Documents\' page
* Improved the presentation of all document types on the Agenda, Future Telechats, Scribe and Moderator package pages
* Made the reverse name for document relationships explicit rather than deriving them from forward names
* Added a way to get to the underlying Document (when it exists) from an RfcWrapper
* Unified several common forms used by different document types
 - Legacy-Id: 5629
Note: SVN reference [5476] has been migrated to Git commit 10b4f7a4dc
2013-04-07 19:11:18 +00:00
Robert Sparks 19dcf10316 Changed the header to last call messages to IETF Announce and to IANA to make replying to the announcement less likely to create an unnecessary ticket
- Legacy-Id: 5602
2013-03-27 19:04:50 +00:00
Henrik Levkowetz cc60a1aa5d Restored fix to utils/mail.py.
- Legacy-Id: 5521
2013-03-09 20:06:11 +00:00
Henrik Levkowetz e1a7bf92ff Added logging for mail sending problems.
- Legacy-Id: 5489
2013-03-06 19:36:06 +00:00
Henrik Levkowetz 2f3476690f In order that document states (which may be used by old documents) should not need to be removed when state machines change and states go out of use, all document states have a 'used' field. The code which accesses the state fields have not been requiring that used=True for the states returned, which is an error. Fixed this by adding 'used=True' to all State.objects.get() and State.objects.filter() call where it's relevant.
- Legacy-Id: 5486
2013-03-05 23:24:41 +00:00
Robert Sparks 10b4f7a4dc * Added a document type for changing the publication status of other documents, and the UI for manipulating them.
* Added charters, conflict reviews, and status changes to the AD's "My Documents" page
* Improved the presentation of all document types on the Agenda, Future Telechats, Scribe and Moderator package pages
* Made the reverse name for document relationships explicit rather than deriving them from forward names
* Added a way to get to the underlying Document (when it exists) from an RfcWrapper
* Unified several common forms used by different document types
 - Legacy-Id: 5476
2013-03-01 15:47:51 +00:00
Henrik Levkowetz c4015a302b Added variations on the recognized date formats during submitted draft parsing, such that comma need not be followed by whitespace in the formats using comma as a separator between some of the fields. Added extraction of drafts referenced by a document, in addition to RFCs referenced.
- Legacy-Id: 5456
2013-02-24 20:17:22 +00:00