Skip to content

Commit

Permalink
Remove the ability to submit Postscript I-Ds.
Browse files Browse the repository at this point in the history
Commit ready for merge. Fixes #3448.
 - Legacy-Id: 19486
  • Loading branch information
larseggert committed Oct 28, 2021
1 parent 126892d commit b058ba2
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 40 deletions.
7 changes: 1 addition & 6 deletions ietf/submit/forms.py
Expand Up @@ -36,7 +36,6 @@
from ietf.submit.utils import validate_submission_name, validate_submission_rev, validate_submission_document_date
from ietf.submit.parsers.pdf_parser import PDFParser
from ietf.submit.parsers.plain_parser import PlainParser
from ietf.submit.parsers.ps_parser import PSParser
from ietf.submit.parsers.xml_parser import XMLParser
from ietf.utils import log
from ietf.utils.draft import Draft
Expand Down Expand Up @@ -450,7 +449,6 @@ class SubmissionManualUploadForm(SubmissionBaseUploadForm):
# html for version 3 xml submissions.
# html = forms.FileField(label='.html format', required=False)
pdf = forms.FileField(label='.pdf format', required=False)
ps = forms.FileField(label='.ps format', required=False)

def __init__(self, request, *args, **kwargs):
super(SubmissionManualUploadForm, self).__init__(request, *args, **kwargs)
Expand All @@ -463,9 +461,6 @@ def clean_txt(self):
def clean_pdf(self):
return self.clean_file("pdf", PDFParser)

def clean_ps(self):
return self.clean_file("ps", PSParser)

class SubmissionAutoUploadForm(SubmissionBaseUploadForm):
user = forms.EmailField(required=True)

Expand Down Expand Up @@ -671,4 +666,4 @@ def __init__(self, *args, **kwargs):
super(MessageModelForm, self).__init__(*args, **kwargs)
self.fields['frm'].label='From'
self.fields['frm'].widget.attrs['readonly'] = 'True'
self.fields['reply_to'].widget.attrs['readonly'] = 'True'
self.fields['reply_to'].widget.attrs['readonly'] = 'True'
12 changes: 0 additions & 12 deletions ietf/submit/parsers/ps_parser.py

This file was deleted.

Binary file removed ietf/submit/test_submission.ps
Binary file not shown.
10 changes: 1 addition & 9 deletions ietf/submit/tests.py
Expand Up @@ -1492,7 +1492,7 @@ def test_submit_all_file_types(self):
rev = "00"
group = "mars"

self.do_submission(name, rev, group, ["txt", "xml", "ps", "pdf"])
self.do_submission(name, rev, group, ["txt", "xml", "pdf"])

self.assertEqual(Submission.objects.filter(name=name).count(), 1)

Expand All @@ -1503,8 +1503,6 @@ def test_submit_all_file_types(self):
self.assertTrue('<?xml version="1.0" encoding="UTF-8"?>' in io.open(os.path.join(self.staging_dir, "%s-%s.xml" % (name, rev))).read())
self.assertTrue(os.path.exists(os.path.join(self.staging_dir, "%s-%s.pdf" % (name, rev))))
self.assertTrue('This is PDF' in io.open(os.path.join(self.staging_dir, "%s-%s.pdf" % (name, rev))).read())
self.assertTrue(os.path.exists(os.path.join(self.staging_dir, "%s-%s.ps" % (name, rev))))
self.assertTrue('This is PostScript' in io.open(os.path.join(self.staging_dir, "%s-%s.ps" % (name, rev))).read())

def test_expire_submissions(self):
s = Submission.objects.create(name="draft-ietf-mars-foo",
Expand Down Expand Up @@ -1664,12 +1662,6 @@ def test_submit_bad_file_pdf(self):
self.assertIn('Expected the PDF file to have extension ".pdf"', m)
self.assertIn('Expected an PDF file of type "application/pdf"', m)

def test_submit_bad_file_ps(self):
r, q, m = self.submit_bad_file("some name", ["ps"])
self.assertIn('Invalid characters were found in the name', m)
self.assertIn('Expected the PS file to have extension ".ps"', m)
self.assertIn('Expected an PS file of type "application/postscript"', m)

def test_submit_file_in_archive(self):
name = "draft-authorname-testing-file-exists"
rev = '00'
Expand Down
6 changes: 1 addition & 5 deletions ietf/templates/submit/tool_instructions.html
Expand Up @@ -38,7 +38,7 @@ <h2>I-D submission tool instructions</h2>

<h3>Upload screen</h3>
<p>
The Upload screen is the first screen that a user will see when he or she starts the I-D submission process. A user can submit four different formats of an I-D, plain text, XML, PDF, and postscript, at the same time. Failure to submit at least one of a plain-text or xml version will cause an error, and an error screen will be displayed. A single v3 .xml source is preferred. A single v2 .xml source will be accepted. If neither of those are available, a plain-text document may be provided.
The Upload screen is the first screen that a user will see when he or she starts the I-D submission process. A user can submit three different formats of an I-D, XML, plain-text, and PDF, at the same time. Failure to submit at least one of a plain-text or xml version will cause an error, and an error screen will be displayed. A single v3 .xml source is preferred. A single v2 .xml source will be accepted. If neither of those are available, a plain-text document may be provided.
</p>

<p>
Expand Down Expand Up @@ -70,10 +70,6 @@ <h3>Upload screen</h3>
<th>.pdf format</th>
<td>Button to select a PDF file of an I-D from a user's local file system. </td>
</tr>
<tr>
<th>.ps format</th>
<td>Button to select a postscript file of an I-D from a user's local file system. </td>
</tr>
<tr>
<th>Upload</th>
<td>Button to upload the document(s). The tool will begin parsing the plain-text document (or creating it from the xml if only xml is provided) and validate the document. The parsed meta-data will be displayed for user confirmation along with the validation results.</td>
Expand Down
8 changes: 0 additions & 8 deletions ietf/templates/submit/upload_submission.html
Expand Up @@ -80,14 +80,6 @@
on the submitted XML.
</p>
</div>

<div class="form-group">
{% bootstrap_field form.ps label='<i class="fa fw-fw fa-file-image-o" aria-hidden="true"></i> Postscript rendering of the I-D'%}
<p class="help-block">
Optional to submit, will be auto-generated based
on the submitted XML.
</p>
</div>
</div>

{% bootstrap_form_errors form %}
Expand Down

0 comments on commit b058ba2

Please sign in to comment.