chore: Use codespell to fix typos in code. (#4797)
* chore: Use codespell to fix typos in code. Second part of replacement of #4651 @rjsparks, I probably need to revert some things here, and I also still need to add that new migration - how do I do that? * Revert migrations * Migrate "Whitelisted" to "Allowlisted" * TEST_COVERAGE_MASTER_FILE -> TEST_COVERAGE_MAIN_FILE * Fix permissions * Add suggestions from @jennifer-richards
This commit is contained in:
parent
015ac316fb
commit
220be21998
|
@ -80,7 +80,7 @@ class PersonalInformationExportView(DetailView, JsonExportMixin):
|
|||
person = get_object_or_404(self.model, user=request.user)
|
||||
expand = ['searchrule', 'documentauthor', 'ad_document_set', 'ad_dochistory_set', 'docevent',
|
||||
'ballotpositiondocevent', 'deletedevent', 'email_set', 'groupevent', 'role', 'rolehistory', 'iprdisclosurebase',
|
||||
'iprevent', 'liaisonstatementevent', 'whitelisted', 'schedule', 'constraint', 'schedulingevent', 'message',
|
||||
'iprevent', 'liaisonstatementevent', 'allowlisted', 'schedule', 'constraint', 'schedulingevent', 'message',
|
||||
'sendqueue', 'nominee', 'topicfeedbacklastseen', 'alias', 'email', 'apikeys', 'personevent',
|
||||
'reviewersettings', 'reviewsecretarysettings', 'unavailableperiod', 'reviewwish',
|
||||
'nextreviewerinteam', 'reviewrequest', 'meetingregistration', 'submissionevent', 'preapproval',
|
||||
|
|
|
@ -166,7 +166,7 @@ Thank you,</field>
|
|||
Thank you for accepting your nomination for the position of $position.
|
||||
|
||||
Please remember to complete and return the questionnaire for this position at your earliest opportunity.
|
||||
The questionaire is repeated below for your convenience.
|
||||
The questionnaire is repeated below for your convenience.
|
||||
|
||||
--------</field>
|
||||
<field to="group.group" name="group" rel="ManyToOneRel"><None></None></field>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<dd>{{ template.type.name }}
|
||||
{% if template.type.slug == "rst" %}
|
||||
<p class="help-block">This template uses the syntax of reStructuredText. Get a quick reference at <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html">http://docutils.sourceforge.net/docs/user/rst/quickref.html</a>.</p>
|
||||
<p class="help-block">You can do variable interpolation with $varialbe if the template allows any variable.</p>
|
||||
<p class="help-block">You can do variable interpolation with $variable if the template allows any variable.</p>
|
||||
{% endif %}
|
||||
{% if template.type.slug == "django" %}
|
||||
<p class="help-block">This template uses the syntax of the default django template framework. Get more info at <a href="https://docs.djangoproject.com/en/dev/topics/templates/">https://docs.djangoproject.com/en/dev/topics/templates/</a>.</p>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<dd>{{ template.type.name }}
|
||||
{% if template.type.slug == "rst" %}
|
||||
<p class="help-block">This template uses the syntax of reStructuredText. Get a quick reference at <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html">http://docutils.sourceforge.net/docs/user/rst/quickref.html</a>.</p>
|
||||
<p class="help-block">You can do variable interpolation with $varialbe if the template allows any variable.</p>
|
||||
<p class="help-block">You can do variable interpolation with $variable if the template allows any variable.</p>
|
||||
{% endif %}
|
||||
{% if template.type.slug == "django" %}
|
||||
<p class="help-block">This template uses the syntax of the default django template framework. Get more info at <a href="https://docs.djangoproject.com/en/dev/topics/templates/">https://docs.djangoproject.com/en/dev/topics/templates/</a>.</p>
|
||||
|
|
|
@ -489,7 +489,7 @@ Table of Contents
|
|||
1. Introduction
|
||||
|
||||
This document describes how to make the Martian networks work. The
|
||||
methods used in Earth do not directly translate to the efficent
|
||||
methods used in Earth do not directly translate to the efficient
|
||||
networks on Mars, as the topographical differences caused by planets.
|
||||
For example the avian carriers, cannot be used in the Mars, thus
|
||||
RFC1149 ([RFC1149]) cannot be used in Mars.
|
||||
|
|
|
@ -133,15 +133,15 @@ class Group(GroupInfo):
|
|||
role_names = [role_names]
|
||||
return user.is_authenticated and self.role_set.filter(name__in=role_names, person__user=user).exists()
|
||||
|
||||
def is_decendant_of(self, sought_parent):
|
||||
def is_descendant_of(self, sought_parent):
|
||||
parent = self.parent
|
||||
decendants = [ self, ]
|
||||
while (parent != None) and (parent not in decendants):
|
||||
decendants = [ parent ] + decendants
|
||||
descendants = [ self, ]
|
||||
while (parent != None) and (parent not in descendants):
|
||||
descendants = [ parent ] + descendants
|
||||
if parent.acronym == sought_parent:
|
||||
return True
|
||||
parent = parent.parent
|
||||
log.assertion('parent not in decendants')
|
||||
log.assertion('parent not in descendants')
|
||||
return False
|
||||
|
||||
def get_chair(self):
|
||||
|
|
|
@ -1937,12 +1937,12 @@ class GroupParentLoopTests(TestCase):
|
|||
import signal
|
||||
|
||||
def timeout_handler(signum, frame):
|
||||
raise Exception("Infinite loop in parent links is not handeled properly.")
|
||||
raise Exception("Infinite loop in parent links is not handled properly.")
|
||||
|
||||
signal.signal(signal.SIGALRM, timeout_handler)
|
||||
signal.alarm(1) # One second
|
||||
try:
|
||||
test2.is_decendant_of("ietf")
|
||||
test2.is_descendant_of("ietf")
|
||||
except AssertionError:
|
||||
pass
|
||||
except Exception:
|
||||
|
|
|
@ -18,7 +18,7 @@ from django_password_strength.widgets import PasswordStrengthInput, PasswordConf
|
|||
import debug # pyflakes:ignore
|
||||
|
||||
from ietf.person.models import Person, Email
|
||||
from ietf.mailinglists.models import Whitelisted
|
||||
from ietf.mailinglists.models import Allowlisted
|
||||
from ietf.utils.text import isascii
|
||||
|
||||
class RegistrationForm(forms.Form):
|
||||
|
@ -203,9 +203,9 @@ class ResetPasswordForm(forms.Form):
|
|||
class TestEmailForm(forms.Form):
|
||||
email = forms.EmailField(required=False)
|
||||
|
||||
class WhitelistForm(forms.ModelForm):
|
||||
class AllowlistForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Whitelisted
|
||||
model = Allowlisted
|
||||
exclude = ['by', 'time' ]
|
||||
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ class IetfAuthTests(TestCase):
|
|||
|
||||
self.assertTrue(self.username_in_htpasswd_file(email))
|
||||
|
||||
def test_create_whitelisted_account(self):
|
||||
def test_create_allowlisted_account(self):
|
||||
email = "new-account@example.com"
|
||||
|
||||
# add allowlist entry
|
||||
|
@ -202,13 +202,13 @@ class IetfAuthTests(TestCase):
|
|||
self.assertEqual(r.status_code, 302)
|
||||
self.assertEqual(urlsplit(r["Location"])[2], urlreverse(ietf.ietfauth.views.profile))
|
||||
|
||||
r = self.client.get(urlreverse(ietf.ietfauth.views.add_account_whitelist))
|
||||
r = self.client.get(urlreverse(ietf.ietfauth.views.add_account_allowlist))
|
||||
self.assertEqual(r.status_code, 200)
|
||||
self.assertContains(r, "Add a whitelist entry")
|
||||
self.assertContains(r, "Add an allowlist entry")
|
||||
|
||||
r = self.client.post(urlreverse(ietf.ietfauth.views.add_account_whitelist), {"email": email})
|
||||
r = self.client.post(urlreverse(ietf.ietfauth.views.add_account_allowlist), {"email": email})
|
||||
self.assertEqual(r.status_code, 200)
|
||||
self.assertContains(r, "Whitelist entry creation successful")
|
||||
self.assertContains(r, "Allowlist entry creation successful")
|
||||
|
||||
# log out
|
||||
r = self.client.get(urlreverse('django.contrib.auth.views.logout'))
|
||||
|
|
|
@ -24,5 +24,5 @@ urlpatterns = [
|
|||
url(r'^review/$', views.review_overview),
|
||||
url(r'^testemail/$', views.test_email),
|
||||
url(r'^username/$', views.change_username),
|
||||
url(r'^whitelist/add/?$', views.add_account_whitelist),
|
||||
url(r'^allowlist/add/?$', views.add_account_allowlist),
|
||||
]
|
||||
|
|
|
@ -62,13 +62,11 @@ import debug # pyflakes:ignore
|
|||
|
||||
from ietf.group.models import Role, Group
|
||||
from ietf.ietfauth.forms import ( RegistrationForm, PasswordForm, ResetPasswordForm, TestEmailForm,
|
||||
WhitelistForm, ChangePasswordForm, get_person_form, RoleEmailForm,
|
||||
AllowlistForm, ChangePasswordForm, get_person_form, RoleEmailForm,
|
||||
NewEmailForm, ChangeUsernameForm, PersonPasswordForm)
|
||||
from ietf.ietfauth.htpasswd import update_htpasswd_file
|
||||
from ietf.ietfauth.utils import role_required, has_role
|
||||
from ietf.mailinglists.models import Whitelisted
|
||||
# needed if we revert to higher barrier for account creation
|
||||
#from ietf.mailinglists.models import Subscribed, Whitelisted
|
||||
from ietf.mailinglists.models import Allowlisted
|
||||
from ietf.name.models import ExtResourceName
|
||||
from ietf.nomcom.models import NomCom
|
||||
from ietf.person.models import Person, Email, Alias, PersonalApiKey, PERSON_API_KEY_VALUES
|
||||
|
@ -128,7 +126,7 @@ def create_account(request):
|
|||
|
||||
# The following is what to revert to should that lowered barrier prove problematic
|
||||
# existing = Subscribed.objects.filter(email=to_email).first()
|
||||
# ok_to_create = ( Whitelisted.objects.filter(email=to_email).exists()
|
||||
# ok_to_create = ( Allowlisted.objects.filter(email=to_email).exists()
|
||||
# or existing and (existing.time + TimeDelta(seconds=settings.LIST_ACCOUNT_DELAY)) < DateTime.now() )
|
||||
# if ok_to_create:
|
||||
# send_account_creation_email(request, to_email)
|
||||
|
@ -522,19 +520,19 @@ def test_email(request):
|
|||
return r
|
||||
|
||||
@role_required('Secretariat')
|
||||
def add_account_whitelist(request):
|
||||
def add_account_allowlist(request):
|
||||
success = False
|
||||
if request.method == 'POST':
|
||||
form = WhitelistForm(request.POST)
|
||||
form = AllowlistForm(request.POST)
|
||||
if form.is_valid():
|
||||
email = form.cleaned_data['email']
|
||||
entry = Whitelisted(email=email, by=request.user.person)
|
||||
entry = Allowlisted(email=email, by=request.user.person)
|
||||
entry.save()
|
||||
success = True
|
||||
else:
|
||||
form = WhitelistForm()
|
||||
form = AllowlistForm()
|
||||
|
||||
return render(request, 'ietfauth/whitelist_form.html', {
|
||||
return render(request, 'ietfauth/allowlist_form.html', {
|
||||
'form': form,
|
||||
'success': success,
|
||||
})
|
||||
|
|
|
@ -134,7 +134,7 @@ class IprTests(TestCase):
|
|||
def test_search(self):
|
||||
WgDraftFactory() # The test matching the prefix "draft" needs more than one thing to find
|
||||
draft = WgDraftFactory()
|
||||
ipr = HolderIprDisclosureFactory(docs=[draft,],patent_info='Number: US12345\nTitle: A method of transfering bits\nInventor: A. Nonymous\nDate: 2000-01-01')
|
||||
ipr = HolderIprDisclosureFactory(docs=[draft,],patent_info='Number: US12345\nTitle: A method of transferring bits\nInventor: A. Nonymous\nDate: 2000-01-01')
|
||||
|
||||
url = urlreverse("ietf.ipr.views.search")
|
||||
|
||||
|
@ -262,7 +262,7 @@ class IprTests(TestCase):
|
|||
"iprdocrel_set-1-document": DocAlias.objects.filter(name__startswith="rfc").first().pk,
|
||||
"patent_number": "SE12345678901",
|
||||
"patent_inventor": "A. Nonymous",
|
||||
"patent_title": "A method of transfering bits",
|
||||
"patent_title": "A method of transferring bits",
|
||||
"patent_date": "2000-01-01",
|
||||
"has_patent_pending": False,
|
||||
"licensing": "royalty-free",
|
||||
|
@ -277,7 +277,7 @@ class IprTests(TestCase):
|
|||
ipr = iprs[0]
|
||||
self.assertEqual(ipr.holder_legal_name, "Test Legal")
|
||||
self.assertEqual(ipr.state.slug, 'pending')
|
||||
for item in ['SE12345678901','A method of transfering bits','2000-01-01']:
|
||||
for item in ['SE12345678901','A method of transferring bits','2000-01-01']:
|
||||
self.assertIn(item, ipr.get_child().patent_info)
|
||||
self.assertTrue(isinstance(ipr.get_child(),HolderIprDisclosure))
|
||||
self.assertEqual(len(outbox),1)
|
||||
|
@ -318,7 +318,7 @@ class IprTests(TestCase):
|
|||
"iprdocrel_set-1-document": DocAlias.objects.filter(name__startswith="rfc").first().pk,
|
||||
"patent_number": "SE12345678901",
|
||||
"patent_inventor": "A. Nonymous",
|
||||
"patent_title": "A method of transfering bits",
|
||||
"patent_title": "A method of transferring bits",
|
||||
"patent_date": "2000-01-01",
|
||||
"has_patent_pending": False,
|
||||
"licensing": "royalty-free",
|
||||
|
@ -332,7 +332,7 @@ class IprTests(TestCase):
|
|||
ipr = iprs[0]
|
||||
self.assertEqual(ipr.holder_legal_name, "Test Legal")
|
||||
self.assertEqual(ipr.state.slug, "pending")
|
||||
for item in ['SE12345678901','A method of transfering bits','2000-01-01' ]:
|
||||
for item in ['SE12345678901','A method of transferring bits','2000-01-01' ]:
|
||||
self.assertIn(item, ipr.get_child().patent_info)
|
||||
self.assertTrue(isinstance(ipr.get_child(),ThirdPartyIprDisclosure))
|
||||
self.assertEqual(len(outbox),1)
|
||||
|
@ -368,7 +368,7 @@ class IprTests(TestCase):
|
|||
"patent_date": "2000-01-01",
|
||||
"patent_inventor": "A. Nonymous",
|
||||
"patent_number": "SE12345678901",
|
||||
"patent_title": "A method of transfering bits",
|
||||
"patent_title": "A method of transferring bits",
|
||||
"submitter_email": "test@holder.com",
|
||||
"submitter_name": "Test Holder",
|
||||
"updates": [],
|
||||
|
@ -414,7 +414,7 @@ class IprTests(TestCase):
|
|||
"iprdocrel_set-1-document": DocAlias.objects.filter(name__startswith="rfc").first().pk,
|
||||
"patent_number": "SE12345678901",
|
||||
"patent_inventor": "A. Nonymous",
|
||||
"patent_title": "A method of transfering bits",
|
||||
"patent_title": "A method of transferring bits",
|
||||
"patent_date": "2000-01-01",
|
||||
"has_patent_pending": False,
|
||||
"licensing": "royalty-free",
|
||||
|
@ -450,7 +450,7 @@ class IprTests(TestCase):
|
|||
"iprdocrel_set-0-revisions": '00',
|
||||
"patent_number": "SE12345678901",
|
||||
"patent_inventor": "A. Nonymous",
|
||||
"patent_title": "A method of transfering bits",
|
||||
"patent_title": "A method of transferring bits",
|
||||
"patent_date": "2000-01-01",
|
||||
"has_patent_pending": False,
|
||||
"licensing": "royalty-free",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
from django.contrib import admin
|
||||
|
||||
from ietf.mailinglists.models import List, Subscribed, Whitelisted
|
||||
from ietf.mailinglists.models import List, Subscribed, Allowlisted
|
||||
|
||||
|
||||
class ListAdmin(admin.ModelAdmin):
|
||||
|
@ -18,6 +18,6 @@ class SubscribedAdmin(admin.ModelAdmin):
|
|||
admin.site.register(Subscribed, SubscribedAdmin)
|
||||
|
||||
|
||||
class WhitelistedAdmin(admin.ModelAdmin):
|
||||
class AllowlistedAdmin(admin.ModelAdmin):
|
||||
list_display = ('id', 'time', 'email', 'by')
|
||||
admin.site.register(Whitelisted, WhitelistedAdmin)
|
||||
admin.site.register(Allowlisted, AllowlistedAdmin)
|
||||
|
|
22
ietf/mailinglists/migrations/0003_allowlisted.py
Normal file
22
ietf/mailinglists/migrations/0003_allowlisted.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Generated by Django 2.2.28 on 2022-12-05 14:26
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('person', '0029_use_timezone_now_for_person_models'),
|
||||
('mailinglists', '0002_auto_20190703_1344'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameModel(
|
||||
old_name='Whitelisted',
|
||||
new_name='Allowlisted',
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='allowlisted',
|
||||
options={'verbose_name_plural': 'Allowlisted'},
|
||||
),
|
||||
]
|
|
@ -28,12 +28,12 @@ class Subscribed(models.Model):
|
|||
class Meta:
|
||||
verbose_name_plural = "Subscribed"
|
||||
|
||||
class Whitelisted(models.Model):
|
||||
class Allowlisted(models.Model):
|
||||
time = models.DateTimeField(auto_now_add=True)
|
||||
email = models.CharField("Email address", max_length=64, validators=[validate_email])
|
||||
by = ForeignKey(Person)
|
||||
def __str__(self):
|
||||
return "<Whitelisted: %s at %s>" % (self.email, self.time)
|
||||
return "<Allowlisted: %s at %s>" % (self.email, self.time)
|
||||
class Meta:
|
||||
verbose_name_plural = "Whitelisted"
|
||||
verbose_name_plural = "Allowlisted"
|
||||
|
||||
|
|
|
@ -11,17 +11,17 @@ from tastypie.cache import SimpleCache
|
|||
from ietf import api
|
||||
from ietf.api import ToOneField # pyflakes:ignore
|
||||
|
||||
from ietf.mailinglists.models import Whitelisted, List, Subscribed
|
||||
from ietf.mailinglists.models import Allowlisted, List, Subscribed
|
||||
|
||||
|
||||
from ietf.person.resources import PersonResource
|
||||
class WhitelistedResource(ModelResource):
|
||||
class AllowlistedResource(ModelResource):
|
||||
by = ToOneField(PersonResource, 'by')
|
||||
class Meta:
|
||||
queryset = Whitelisted.objects.all()
|
||||
queryset = Allowlisted.objects.all()
|
||||
serializer = api.Serializer()
|
||||
cache = SimpleCache()
|
||||
#resource_name = 'whitelisted'
|
||||
#resource_name = 'allowlisted'
|
||||
ordering = ['id', ]
|
||||
filtering = {
|
||||
"id": ALL,
|
||||
|
@ -29,7 +29,7 @@ class WhitelistedResource(ModelResource):
|
|||
"email": ALL,
|
||||
"by": ALL_WITH_RELATIONS,
|
||||
}
|
||||
api.mailinglists.register(WhitelistedResource())
|
||||
api.mailinglists.register(AllowlistedResource())
|
||||
|
||||
class ListResource(ModelResource):
|
||||
class Meta:
|
||||
|
|
|
@ -385,7 +385,7 @@
|
|||
},
|
||||
{
|
||||
"fields": {
|
||||
"desc": "The document is in the RFC editor Queue (as confirmed by http://www.rfc-editor.org/queue.html).",
|
||||
"desc": "The document is in the RFC editor Queue (as confirmed by https://www.rfc-editor.org/queue.html).",
|
||||
"name": "RFC Ed Queue",
|
||||
"next_states": [
|
||||
7
|
||||
|
@ -2585,7 +2585,7 @@
|
|||
},
|
||||
{
|
||||
"fields": {
|
||||
"label": "Liason Statement State"
|
||||
"label": "Liaison Statement State"
|
||||
},
|
||||
"model": "doc.statetype",
|
||||
"pk": "liaison"
|
||||
|
@ -3844,7 +3844,7 @@
|
|||
{
|
||||
"fields": {
|
||||
"cc": [],
|
||||
"desc": "Recipients for message to adminstrators when a charter state edit needs followon administrative action",
|
||||
"desc": "Recipients for message to administrators when a charter state edit needs follow-on administrative action",
|
||||
"to": [
|
||||
"iesg_secretary"
|
||||
]
|
||||
|
@ -5909,7 +5909,7 @@
|
|||
},
|
||||
{
|
||||
"fields": {
|
||||
"desc": "The set of people who can approve this liasion statemetns",
|
||||
"desc": "The set of people who can approve this liaison statements",
|
||||
"template": "{{liaison.approver_emails|join:\", \"}}"
|
||||
},
|
||||
"model": "mailtrigger.recipient",
|
||||
|
|
|
@ -175,7 +175,7 @@ class MergeNomineeForm(forms.Form):
|
|||
secondary_emails = self.cleaned_data.get("secondary_emails")
|
||||
if primary_email and secondary_emails:
|
||||
if primary_email in secondary_emails:
|
||||
msg = "Primary and secondary email address must be differents"
|
||||
msg = "Primary and secondary email address must be different"
|
||||
self._errors["primary_email"] = self.error_class([msg])
|
||||
return self.cleaned_data
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ class Command(BaseCommand):
|
|||
email.origin = email.person.user.username if email.person.user_id else ('script: %s deactivation' % options['reason'])
|
||||
email.save()
|
||||
PersonEvent.objects.create(person=email.person, type='email_address_deactivated',
|
||||
desc="Deactivated the email addres <%s>. Reason: %s" % (email.address, options['reason']) )
|
||||
desc="Deactivated the email address <%s>. Reason: %s" % (email.address, options['reason']) )
|
||||
else:
|
||||
if email is None:
|
||||
not_found.append(a)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<input type="radio" name="wg_action_status" value="2"> External Review NOT APPROVED;
|
||||
<blockquote>
|
||||
<input type="radio" name="wg_action_status_sub" value="1"> The Secretariat will wait for instructions from <select name="note_draft_by"></select><br>
|
||||
<input type="radio" name="wg_action_status_sub" value="2"> The IESG decides the document needs more thime in INTERNAL REVIEW. The Secreatriat will put it back on the agenda for the next teleconference in the same category.<br>
|
||||
<input type="radio" name="wg_action_status_sub" value="2"> The IESG decides the document needs more time in INTERNAL REVIEW. The Secretariat will put it back on the agenda for the next teleconference in the same category.<br>
|
||||
<input type="radio" name="wg_action_status_sub" value="3"> The IESG has made changes since the charter was seen in INTERNAL REVIEW, and decides to send it back to INTERNAL REVIEW the charter again.
|
||||
</blockquote>
|
||||
{% endif %}
|
||||
|
|
|
@ -610,7 +610,7 @@ TEST_TEMPLATE_IGNORE = [
|
|||
"500.html" # isn't loaded by regular loader, but checked by test_500_page()
|
||||
]
|
||||
|
||||
TEST_COVERAGE_MASTER_FILE = os.path.join(BASE_DIR, "../release-coverage.json")
|
||||
TEST_COVERAGE_MAIN_FILE = os.path.join(BASE_DIR, "../release-coverage.json")
|
||||
TEST_COVERAGE_LATEST_FILE = os.path.join(BASE_DIR, "../latest-coverage.json")
|
||||
|
||||
TEST_CODE_COVERAGE_CHECKER = None
|
||||
|
@ -680,7 +680,7 @@ INTERNET_ALL_DRAFTS_ARCHIVE_DIR = '/a/ietfdata/doc/draft/archive'
|
|||
MEETING_RECORDINGS_DIR = '/a/www/audio'
|
||||
DERIVED_DIR = '/a/ietfdata/derived'
|
||||
|
||||
DOCUMENT_FORMAT_WHITELIST = ["txt", "ps", "pdf", "xml", "html", ]
|
||||
DOCUMENT_FORMAT_ALLOWLIST = ["txt", "ps", "pdf", "xml", "html", ]
|
||||
|
||||
# Mailing list info URL for lists hosted on the IETF servers
|
||||
MAILING_LIST_INFO_URL = "https://www.ietf.org/mailman/listinfo/%(list_addr)s"
|
||||
|
|
|
@ -315,7 +315,7 @@ function draw_graph(data, group) {
|
|||
})
|
||||
];
|
||||
|
||||
// // See https://github.com/d3/d3-force/blob/master/README.md#simulation_tick
|
||||
// // See https://github.com/d3/d3-force/blob/main/README.md#simulation_tick
|
||||
// for (let i = 0, n = Math.ceil(Math.log(simulation.alphaMin()) /
|
||||
// Math.log(1 - simulation.alphaDecay())); i <
|
||||
// n; ++i) {
|
||||
|
|
|
@ -345,7 +345,7 @@ def document_stats(request, stats_type=None):
|
|||
|
||||
basename, ext = t
|
||||
ext = ext.lower()
|
||||
if not any(ext==whitelisted_ext for whitelisted_ext in settings.DOCUMENT_FORMAT_WHITELIST):
|
||||
if not any(ext==allowlisted_ext for allowlisted_ext in settings.DOCUMENT_FORMAT_ALLOWLIST):
|
||||
continue
|
||||
|
||||
canonical_name = doc_names_with_missing_types.get(basename)
|
||||
|
|
|
@ -338,7 +338,7 @@ class SubmissionBaseUploadForm(forms.Form):
|
|||
if group:
|
||||
return group
|
||||
else:
|
||||
raise forms.ValidationError('Draft names starting with draft-%s- are restricted, please pick a differen name' % ntype)
|
||||
raise forms.ValidationError('Draft names starting with draft-%s- are restricted, please pick a different name' % ntype)
|
||||
return None
|
||||
|
||||
|
||||
|
|
|
@ -567,7 +567,7 @@ def post_approved_draft(url, name):
|
|||
"Authorization": "Basic %s" % force_str(base64.encodebytes(smart_bytes("%s:%s" % (username, password)))).replace("\n", ""),
|
||||
}
|
||||
|
||||
log("Posting RFC-Editor notifcation of approved draft '%s' to '%s'" % (name, url))
|
||||
log("Posting RFC-Editor notification of approved draft '%s' to '%s'" % (name, url))
|
||||
text = error = ""
|
||||
|
||||
try:
|
||||
|
|
|
@ -186,8 +186,8 @@
|
|||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item {% if flavor != 'top' %} text-wrap link-primary{% endif %}"
|
||||
href="{% url 'ietf.ietfauth.views.add_account_whitelist' %}">
|
||||
Account whitelist
|
||||
href="{% url 'ietf.ietfauth.views.add_account_allowlist' %}">
|
||||
Account allowlist
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% autoescape off %}As you requsted, the Internet Draft {{ doc.file_tag }}
|
||||
{% autoescape off %}As you requested, the Internet Draft {{ doc.file_tag }}
|
||||
has been resurrected.
|
||||
|
||||
Datatracker URL: {{ url }}
|
||||
|
|
|
@ -6,18 +6,18 @@
|
|||
{% block content %}
|
||||
{% origin %}
|
||||
{% if success %}
|
||||
<h1>Whitelist entry creation successful</h1>
|
||||
<h1>Allowlist entry creation successful</h1>
|
||||
<p>
|
||||
Please ask the requestor to try the
|
||||
<a href="{% url 'ietf.ietfauth.views.create_account' %}">account creation form</a>
|
||||
again, with the whitelisted email address.
|
||||
again, with the allowlisted email address.
|
||||
</p>
|
||||
{% else %}
|
||||
<h1>Add a whitelist entry for account creation.</h1>
|
||||
<h1>Add an allowlist entry for account creation.</h1>
|
||||
<p>
|
||||
When an email request comes in for assistance with account creation
|
||||
because the automated account creation has failed, you can add the
|
||||
address to an account creation whitelist here.
|
||||
address to an account creation allowlist here.
|
||||
</p>
|
||||
<p>
|
||||
Before you do so, please complete the following 3 verification steps:
|
||||
|
@ -35,7 +35,7 @@
|
|||
<li>
|
||||
Google for the person's name within the ietf.org site: "Jane Doe site:ietf.org". If
|
||||
found, and the email address matches an address used in drafts or discussions,
|
||||
things are fine, and it's OK to add the address to the whitelist using this form,
|
||||
things are fine, and it's OK to add the address to the allowlist using this form,
|
||||
and ask the person to please try the
|
||||
<a href="{% url 'ietf.ietfauth.views.create_account' %}">account creation form</a>
|
||||
again.
|
||||
|
@ -62,7 +62,7 @@
|
|||
question as given above, with lowercase "wgs".
|
||||
</p>
|
||||
<p>
|
||||
If the answer to this question shows clue, then add the address to the whitelist
|
||||
If the answer to this question shows clue, then add the address to the allowlist
|
||||
using this form, and ask the person to please try the
|
||||
<a href="{% url 'ietf.ietfauth.views.create_account' %}">account creation form</a>
|
||||
again.
|
||||
|
@ -72,7 +72,7 @@
|
|||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form form %}
|
||||
<button class="btn btn-primary" type="submit">Add address to account creation whitelist</button>
|
||||
<button class="btn btn-primary" type="submit">Add address to account creation allowlist</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -22,7 +22,7 @@
|
|||
<div class="alert alert-info my-3">
|
||||
This form will link additional drafts to this session with a revision of "Current at time of presentation". For more fine grained control of versions, or to remove a draft from a session, adjust the sessions associated with a draft from the draft's main page.
|
||||
</div>
|
||||
<h2 class="mt-5">Drafts already linked to this sesssion</h2>
|
||||
<h2 class="mt-5">Drafts already linked to this session</h2>
|
||||
<table class="table table-sm table-striped tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{% load static %}
|
||||
{% load nomcom_tags person_filters %}
|
||||
{% block pagehead %}{{ formset.media.css }}{% endblock %}
|
||||
{% block subtitle %}- Feeback pending{% endblock %}
|
||||
{% block subtitle %}- Feedback pending{% endblock %}
|
||||
{% block nomcom_content %}
|
||||
{% origin %}
|
||||
<h2>Feedback pending from email list</h2>
|
||||
|
|
|
@ -105,7 +105,7 @@ def _memoize(func, self, *args, **kwargs):
|
|||
return cache[key]
|
||||
def memoize(func):
|
||||
if not hasattr(func, '__class__'):
|
||||
raise NotImplementedError("Use @lru_cache instead of memoize() for funcitons.")
|
||||
raise NotImplementedError("Use @lru_cache instead of memoize() for functions.")
|
||||
# For methods, we want the cache on the object, not on the class, in order
|
||||
# to not having to think about cache bloat and content becoming stale, so
|
||||
# we cannot set up the cache here.
|
||||
|
|
|
@ -532,13 +532,13 @@ class PlaintextDraft(Draft):
|
|||
indent_lines.append(indent)
|
||||
percents = {}
|
||||
total = float(len(indent_lines))
|
||||
formated = False
|
||||
formatted = False
|
||||
for indent in set(indent_lines):
|
||||
count = indent_lines.count(indent)/total
|
||||
percents[indent] = count
|
||||
if count > 0.9:
|
||||
formated = True
|
||||
if not formated:
|
||||
formatted = True
|
||||
if not formatted:
|
||||
return abstract
|
||||
new_abstract = []
|
||||
for line in abstract.split('\n'):
|
||||
|
|
|
@ -533,7 +533,7 @@ def log_smtp_exception(e):
|
|||
def build_warning_message(request, e):
|
||||
(extype, value, tb) = exception_components(e)
|
||||
if request:
|
||||
warning = "An error occured while sending email:\n"
|
||||
warning = "An error occurred while sending email:\n"
|
||||
if getattr(e,'original_msg',None):
|
||||
warning += "Subject: %s\n" % e.original_msg.get('Subject','[no subject]')
|
||||
warning += "To: %s\n" % e.original_msg.get('To','[no to]')
|
||||
|
|
|
@ -34,7 +34,7 @@ class Command(BaseCommand):
|
|||
" $ manage.py {name} --absolute --sections=url | grep False\n"
|
||||
"\n".format(**locals())
|
||||
)
|
||||
args = "[[master_json] latest_json]"
|
||||
args = "[[main_json] latest_json]"
|
||||
|
||||
def create_parser(self, prog_name, subcommand):
|
||||
import argparse
|
||||
|
@ -78,13 +78,13 @@ class Command(BaseCommand):
|
|||
raise CommandError("There is no data for version %s available in %s" % (version, filename))
|
||||
return data[version], version
|
||||
|
||||
def coverage_diff(self, master, latest, sections, release=None, **options):
|
||||
master_coverage, mversion = self.read_coverage(master, release)
|
||||
def coverage_diff(self, main, latest, sections, release=None, **options):
|
||||
main_coverage, mversion = self.read_coverage(main, release)
|
||||
latest_coverage, lversion = self.read_coverage(latest)
|
||||
self.stdout.write("\nShowing coverage differeces between %s and %s:\n" % (mversion, lversion))
|
||||
for section in sections:
|
||||
mcoverage = master_coverage[section]["covered"]
|
||||
mformat = master_coverage[section].get("format", 1)
|
||||
mcoverage = main_coverage[section]["covered"]
|
||||
mformat = main_coverage[section].get("format", 1)
|
||||
lcoverage = latest_coverage[section]["covered"]
|
||||
lformat = latest_coverage[section].get("format", 1)
|
||||
#
|
||||
|
@ -235,7 +235,7 @@ class Command(BaseCommand):
|
|||
# verbosity = int(options.get('verbosity'))
|
||||
if not filenames:
|
||||
filenames = [
|
||||
getattr(settings, 'TEST_COVERAGE_MASTER_FILE'),
|
||||
getattr(settings, 'TEST_COVERAGE_MAIN_FILE'),
|
||||
getattr(settings, 'TEST_COVERAGE_LATEST_FILE'),
|
||||
]
|
||||
if len(filenames) != 2:
|
||||
|
|
|
@ -15,7 +15,7 @@ import debug # pyflakes:ignore
|
|||
class CoverageChangeTestCase(TestCase):
|
||||
|
||||
def test_coverage_change(self):
|
||||
master_txt ="""{
|
||||
main_txt ="""{
|
||||
"5.12.0": {
|
||||
"code": {
|
||||
"coverage": 0.5921474057048117,
|
||||
|
@ -81,16 +81,16 @@ class CoverageChangeTestCase(TestCase):
|
|||
"version":"latest"
|
||||
}
|
||||
"""
|
||||
mfh, master = tempfile.mkstemp(suffix='.json')
|
||||
with io.open(master, "w") as file:
|
||||
file.write(master_txt)
|
||||
mfh, main = tempfile.mkstemp(suffix='.json')
|
||||
with io.open(main, "w") as file:
|
||||
file.write(main_txt)
|
||||
lfh, latest = tempfile.mkstemp(suffix='.json')
|
||||
with io.open(latest, "w") as file:
|
||||
file.write(latest_txt)
|
||||
output = io.StringIO()
|
||||
call_command('coverage_changes', master, latest, stdout=output)
|
||||
call_command('coverage_changes', main, latest, stdout=output)
|
||||
text = output.getvalue()
|
||||
os.unlink(master)
|
||||
os.unlink(main)
|
||||
os.unlink(latest)
|
||||
|
||||
for l in [
|
||||
|
|
|
@ -31,7 +31,7 @@ class Command(BaseCommand):
|
|||
out = out.decode('utf-8')
|
||||
err = err.decode('utf-8')
|
||||
if code != 0:
|
||||
sys.stderr.write("Command '%s' retuned %s: \n%s\n%s\n" % (cmd, code, out, err))
|
||||
sys.stderr.write("Command '%s' returned %s: \n%s\n%s\n" % (cmd, code, out, err))
|
||||
else:
|
||||
c.version = (out.strip()+'\n'+err.strip()).strip()
|
||||
if options.get('verbosity', 1) > 1:
|
||||
|
|
|
@ -347,7 +347,7 @@ def make_test_data():
|
|||
title="Statement regarding rights",
|
||||
holder_legal_name="Native Martians United",
|
||||
state=IprDisclosureStateName.objects.get(slug='posted'),
|
||||
patent_info='Number: US12345\nTitle: A method of transfering bits\nInventor: A. Nonymous\nDate: 2000-01-01',
|
||||
patent_info='Number: US12345\nTitle: A method of transferring bits\nInventor: A. Nonymous\nDate: 2000-01-01',
|
||||
holder_contact_name='George',
|
||||
holder_contact_email='george@acme.com',
|
||||
holder_contact_info='14 Main Street\nEarth',
|
||||
|
|
|
@ -733,7 +733,7 @@ class IetfTestRunner(DiscoverRunner):
|
|||
settings.show_logging = show_logging
|
||||
#
|
||||
self.root_dir = os.path.dirname(settings.BASE_DIR)
|
||||
self.coverage_file = os.path.join(self.root_dir, settings.TEST_COVERAGE_MASTER_FILE)
|
||||
self.coverage_file = os.path.join(self.root_dir, settings.TEST_COVERAGE_MAIN_FILE)
|
||||
super(IetfTestRunner, self).__init__(**kwargs)
|
||||
if self.parallel > 1:
|
||||
if self.html_report == True:
|
||||
|
|
Loading…
Reference in a new issue