ci: merge branch 'main' into feat/rfc

This commit is contained in:
Robert Sparks 2023-09-05 12:02:07 -05:00
commit e0f27b9d52
No known key found for this signature in database
GPG key ID: 6E2A6A5775F91318
57 changed files with 8715 additions and 1530 deletions

View file

@ -100,163 +100,14 @@ jobs:
# -----------------------------------------------------------------
# TESTS
# -----------------------------------------------------------------
tests-python:
name: Run Tests (Python)
tests:
name: Run Tests
uses: ./.github/workflows/tests.yml
if: ${{ github.event.inputs.skiptests == 'false' || github.ref_name == 'release' }}
needs: [prepare]
runs-on: ubuntu-latest
container: ghcr.io/ietf-tools/datatracker-app-base:latest
services:
db:
image: ghcr.io/ietf-tools/datatracker-db:latest
steps:
- uses: actions/checkout@v3
- name: Prepare for tests
run: |
chmod +x ./dev/tests/prepare.sh
sh ./dev/tests/prepare.sh
- name: Ensure DB is ready
run: |
/usr/local/bin/wait-for db:5432 -- echo "DB ready"
- name: Run all tests
shell: bash
run: |
echo "Running checks..."
./ietf/manage.py check
./ietf/manage.py migrate --fake-initial
echo "Validating migrations..."
if ! ( ietf/manage.py makemigrations --dry-run --check --verbosity 3 ) ; then
echo "Model changes without migrations found."
exit 1
fi
echo "Running tests..."
if [[ "x${{ github.event.inputs.ignoreLowerCoverage }}" == "xtrue" ]]; then
echo "Lower coverage failures will be ignored."
./ietf/manage.py test --validate-html-harder --settings=settings_test --ignore-lower-coverage
else
./ietf/manage.py test --validate-html-harder --settings=settings_test
fi
coverage xml
- name: Upload Coverage Results to Codecov
uses: codecov/codecov-action@v3.1.4
with:
files: coverage.xml
- name: Convert Coverage Results
if: ${{ always() }}
run: |
mv latest-coverage.json coverage.json
- name: Upload Coverage Results as Build Artifact
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: coverage
path: coverage.json
tests-playwright:
name: Run Tests (Playwright)
if: ${{ github.event.inputs.skiptests == 'false' || github.ref_name == 'release' }}
needs: [prepare]
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
project: [chromium, firefox]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Run all tests
run: |
echo "Installing dependencies..."
yarn
echo "Installing Playwright..."
cd playwright
mkdir test-results
npm ci
npx playwright install --with-deps ${{ matrix.project }}
echo "Running tests..."
npx playwright test --project=${{ matrix.project }}
- name: Upload Report
uses: actions/upload-artifact@v3
if: ${{ always() }}
continue-on-error: true
with:
name: playwright-results-${{ matrix.project }}
path: playwright/test-results/
if-no-files-found: ignore
tests-playwright-legacy:
name: Run Tests (Playwright Legacy)
if: ${{ github.event.inputs.skiptests == 'false' || github.ref_name == 'release' }}
needs: [prepare]
runs-on: ubuntu-latest
container: ghcr.io/ietf-tools/datatracker-app-base:latest
strategy:
fail-fast: false
matrix:
project: [chromium, firefox]
services:
db:
image: ghcr.io/ietf-tools/datatracker-db:latest
steps:
- uses: actions/checkout@v3
- name: Prepare for tests
run: |
chmod +x ./dev/tests/prepare.sh
sh ./dev/tests/prepare.sh
- name: Ensure DB is ready
run: |
/usr/local/bin/wait-for db:5432 -- echo "DB ready"
- name: Start Datatracker
run: |
echo "Running checks..."
./ietf/manage.py check
echo "Starting datatracker..."
./ietf/manage.py runserver 0.0.0.0:8000 --settings=settings_local &
echo "Waiting for datatracker to be ready..."
/usr/local/bin/wait-for localhost:8000 -- echo "Datatracker ready"
- name: Run all tests
env:
# Required to get firefox to run as root:
HOME: ""
run: |
echo "Installing dependencies..."
yarn
echo "Installing Playwright..."
cd playwright
mkdir test-results
npm ci
npx playwright install --with-deps ${{ matrix.project }}
echo "Running tests..."
npx playwright test --project=${{ matrix.project }} -c playwright-legacy.config.js
- name: Upload Report
uses: actions/upload-artifact@v3
if: ${{ always() }}
continue-on-error: true
with:
name: playwright-legacy-results-${{ matrix.project }}
path: playwright/test-results/
if-no-files-found: ignore
with:
ignoreLowerCoverage: ${{ github.event.inputs.ignoreLowerCoverage == 'true' }}
# -----------------------------------------------------------------
# RELEASE
@ -264,7 +115,7 @@ jobs:
release:
name: Make Release
if: ${{ !failure() && !cancelled() }}
needs: [tests-python, tests-playwright, tests-playwright-legacy, prepare]
needs: [tests, prepare]
runs-on: ubuntu-latest
env:
SHOULD_DEPLOY: ${{needs.prepare.outputs.should_deploy}}
@ -389,7 +240,7 @@ jobs:
notify:
name: Notify
if: ${{ always() }}
needs: [prepare, tests-python, tests-playwright, tests-playwright-legacy, release]
needs: [prepare, tests, release]
runs-on: ubuntu-latest
env:
PKG_VERSION: ${{needs.prepare.outputs.pkg_version}}

View file

@ -1,4 +1,4 @@
name: Run All Tests
name: PR - Run All Tests
on:
pull_request:
@ -13,150 +13,7 @@ on:
- 'package.json'
jobs:
tests-python:
name: Run Tests (Python)
runs-on: ubuntu-latest
container: ghcr.io/ietf-tools/datatracker-app-base:latest
services:
db:
image: ghcr.io/ietf-tools/datatracker-db:latest
steps:
- uses: actions/checkout@v3
- name: Prepare for tests
run: |
chmod +x ./dev/tests/prepare.sh
sh ./dev/tests/prepare.sh
- name: Ensure DB is ready
run: |
/usr/local/bin/wait-for db:5432 -- echo "DB ready"
- name: Run all tests
run: |
echo "Running checks..."
./ietf/manage.py check
./ietf/manage.py migrate --fake-initial
echo "Validating migrations..."
if ! ( ietf/manage.py makemigrations --dry-run --check --verbosity 3 ) ; then
echo "Model changes without migrations found."
echo ${MSG}
exit 1
fi
echo "Running tests..."
./ietf/manage.py test --validate-html-harder --settings=settings_test
coverage xml
- name: Upload Coverage Results to Codecov
uses: codecov/codecov-action@v3.1.4
with:
files: coverage.xml
- name: Convert Coverage Results
if: ${{ always() }}
run: |
mv latest-coverage.json coverage.json
- name: Upload Coverage Results as Build Artifact
uses: actions/upload-artifact@v3.0.0
if: ${{ always() }}
with:
name: coverage
path: coverage.json
tests-playwright:
name: Run Tests (Playwright)
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
project: [chromium, firefox]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Run all tests
run: |
echo "Installing dependencies..."
yarn
echo "Installing Playwright..."
cd playwright
mkdir test-results
npm ci
npx playwright install --with-deps ${{ matrix.project }}
echo "Running tests..."
npx playwright test --project=${{ matrix.project }}
- name: Upload Report
uses: actions/upload-artifact@v3.0.0
if: ${{ always() }}
continue-on-error: true
with:
name: playwright-results-${{ matrix.project }}
path: playwright/test-results/
if-no-files-found: ignore
tests-playwright-legacy:
name: Run Tests (Playwright Legacy)
runs-on: ubuntu-latest
container: ghcr.io/ietf-tools/datatracker-app-base:latest
strategy:
fail-fast: false
matrix:
project: [chromium, firefox]
services:
db:
image: ghcr.io/ietf-tools/datatracker-db:latest
steps:
- uses: actions/checkout@v3
- name: Prepare for tests
run: |
chmod +x ./dev/tests/prepare.sh
sh ./dev/tests/prepare.sh
- name: Ensure DB is ready
run: |
/usr/local/bin/wait-for db:5432 -- echo "DB ready"
- name: Start Datatracker
run: |
echo "Running checks..."
./ietf/manage.py check
./ietf/manage.py migrate --fake-initial
echo "Starting datatracker..."
./ietf/manage.py runserver 0.0.0.0:8000 --settings=settings_local &
echo "Waiting for datatracker to be ready..."
/usr/local/bin/wait-for localhost:8000 -- echo "Datatracker ready"
- name: Run all tests
env:
# Required to get firefox to run as root:
HOME: ""
run: |
echo "Installing dependencies..."
yarn
echo "Installing Playwright..."
cd playwright
mkdir test-results
npm ci
npx playwright install --with-deps ${{ matrix.project }}
echo "Running tests..."
npx playwright test --project=${{ matrix.project }} -c playwright-legacy.config.js
- name: Upload Report
uses: actions/upload-artifact@v3
if: ${{ always() }}
continue-on-error: true
with:
name: playwright-legacy-results-${{ matrix.project }}
path: playwright/test-results/
if-no-files-found: ignore
tests:
uses: ./.github/workflows/tests.yml
with:
ignoreLowerCoverage: false

164
.github/workflows/tests.yml vendored Normal file
View file

@ -0,0 +1,164 @@
name: Reusable Tests Workflow
on:
workflow_call:
inputs:
ignoreLowerCoverage:
description: 'Ignore Lower Coverage'
default: false
required: true
type: boolean
jobs:
tests-python:
name: Python Tests
runs-on: ubuntu-latest
container: ghcr.io/ietf-tools/datatracker-app-base:latest
services:
db:
image: ghcr.io/ietf-tools/datatracker-db:latest
steps:
- uses: actions/checkout@v3
- name: Prepare for tests
run: |
chmod +x ./dev/tests/prepare.sh
sh ./dev/tests/prepare.sh
- name: Ensure DB is ready
run: |
/usr/local/bin/wait-for db:5432 -- echo "DB ready"
- name: Run all tests
shell: bash
run: |
echo "Running checks..."
./ietf/manage.py check
./ietf/manage.py migrate --fake-initial
echo "Validating migrations..."
if ! ( ietf/manage.py makemigrations --dry-run --check --verbosity 3 ) ; then
echo "Model changes without migrations found."
exit 1
fi
echo "Running tests..."
if [[ "x${{ github.event.inputs.ignoreLowerCoverage }}" == "xtrue" ]]; then
echo "Lower coverage failures will be ignored."
./ietf/manage.py test --validate-html-harder --settings=settings_test --ignore-lower-coverage
else
./ietf/manage.py test --validate-html-harder --settings=settings_test
fi
coverage xml
- name: Upload Coverage Results to Codecov
uses: codecov/codecov-action@v3.1.4
with:
files: coverage.xml
- name: Convert Coverage Results
if: ${{ always() }}
run: |
mv latest-coverage.json coverage.json
- name: Upload Coverage Results as Build Artifact
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: coverage
path: coverage.json
tests-playwright:
name: Playwright Tests
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
project: [chromium, firefox]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Run all tests
run: |
echo "Installing dependencies..."
yarn
echo "Installing Playwright..."
cd playwright
mkdir test-results
npm ci
npx playwright install --with-deps ${{ matrix.project }}
echo "Running tests..."
npx playwright test --project=${{ matrix.project }}
- name: Upload Report
uses: actions/upload-artifact@v3
if: ${{ always() }}
continue-on-error: true
with:
name: playwright-results-${{ matrix.project }}
path: playwright/test-results/
if-no-files-found: ignore
tests-playwright-legacy:
name: Playwright Legacy Tests
runs-on: ubuntu-latest
container: ghcr.io/ietf-tools/datatracker-app-base:latest
strategy:
fail-fast: false
matrix:
project: [chromium, firefox]
services:
db:
image: ghcr.io/ietf-tools/datatracker-db:latest
steps:
- uses: actions/checkout@v3
- name: Prepare for tests
run: |
chmod +x ./dev/tests/prepare.sh
sh ./dev/tests/prepare.sh
- name: Ensure DB is ready
run: |
/usr/local/bin/wait-for db:5432 -- echo "DB ready"
- name: Start Datatracker
run: |
echo "Running checks..."
./ietf/manage.py check
./ietf/manage.py migrate --fake-initial
echo "Starting datatracker..."
./ietf/manage.py runserver 0.0.0.0:8000 --settings=settings_local &
echo "Waiting for datatracker to be ready..."
/usr/local/bin/wait-for localhost:8000 -- echo "Datatracker ready"
- name: Run all tests
env:
# Required to get firefox to run as root:
HOME: ""
run: |
echo "Installing dependencies..."
yarn
echo "Installing Playwright..."
cd playwright
mkdir test-results
npm ci
npx playwright install --with-deps ${{ matrix.project }}
echo "Running tests..."
npx playwright test --project=${{ matrix.project }} -c playwright-legacy.config.js
- name: Upload Report
uses: actions/upload-artifact@v3
if: ${{ always() }}
continue-on-error: true
with:
name: playwright-legacy-results-${{ matrix.project }}
path: playwright/test-results/
if-no-files-found: ignore

View file

@ -0,0 +1,157 @@
#!/usr/bin/env python
import sys
print("This is only here as documention - please read the file")
sys.exit(0)
# #!/usr/bin/env python
# # Copyright The IETF Trust 2017-2019, All Rights Reserved
# import datetime
# import os
# import sys
# from pathlib import Path
# from contextlib import closing
# os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
# import django
# django.setup()
# from django.conf import settings
# from django.core.validators import validate_email, ValidationError
# from ietf.utils.draft import PlaintextDraft
# from ietf.submit.utils import update_authors
# from ietf.utils.timezone import date_today
# import debug # pyflakes:ignore
# from ietf.doc.models import Document, NewRevisionDocEvent, DocEvent, State
# from ietf.person.models import Person
# system = Person.objects.get(name="(System)")
# expired = State.objects.get(type='draft',slug='expired')
# names = set()
# print 'collecting draft names ...'
# versions = 0
# for p in Path(settings.INTERNET_DRAFT_PATH).glob('draft*.txt'):
# n = str(p).split('/')[-1].split('-')
# if n[-1][:2].isdigit():
# name = '-'.join(n[:-1])
# if '--' in name or '.txt' in name or '[' in name or '=' in name or '&' in name:
# continue
# if name.startswith('draft-draft-'):
# continue
# if name == 'draft-ietf-trade-iotp-v1_0-dsig':
# continue
# if len(n[-1]) != 6:
# continue
# if name.startswith('draft-mlee-'):
# continue
# names.add('-'.join(n[:-1]))
# count=0
# print 'iterating through names ...'
# for name in sorted(names):
# if not Document.objects.filter(name=name).exists():
# paths = list(Path(settings.INTERNET_DRAFT_PATH).glob('%s-??.txt'%name))
# paths.sort()
# doc = None
# for p in paths:
# n = str(p).split('/')[-1].split('-')
# rev = n[-1][:2]
# with open(str(p)) as txt_file:
# raw = txt_file.read()
# try:
# text = raw.decode('utf8')
# except UnicodeDecodeError:
# text = raw.decode('latin1')
# try:
# draft = PlaintextDraft(text, txt_file.name, name_from_source=True)
# except Exception as e:
# print name, rev, "Can't parse", p,":",e
# continue
# if draft.errors and draft.errors.keys()!=['draftname',]:
# print "Errors - could not process", name, rev, datetime.datetime.fromtimestamp(p.stat().st_mtime, datetime.timezone.utc), draft.errors, draft.get_title().encode('utf8')
# else:
# time = datetime.datetime.fromtimestamp(p.stat().st_mtime, datetime.timezone.utc)
# if not doc:
# doc = Document.objects.create(name=name,
# time=time,
# type_id='draft',
# title=draft.get_title(),
# abstract=draft.get_abstract(),
# rev = rev,
# pages=draft.get_pagecount(),
# words=draft.get_wordcount(),
# expires=time+datetime.timedelta(settings.INTERNET_DRAFT_DAYS_TO_EXPIRE),
# )
# DocAlias.objects.create(name=doc.name).docs.add(doc)
# doc.states.add(expired)
# # update authors
# authors = []
# for author in draft.get_author_list():
# full_name, first_name, middle_initial, last_name, name_suffix, email, country, company = author
# author_name = full_name.replace("\n", "").replace("\r", "").replace("<", "").replace(">", "").strip()
# if email:
# try:
# validate_email(email)
# except ValidationError:
# email = ""
# def turn_into_unicode(s):
# if s is None:
# return u""
# if isinstance(s, unicode):
# return s
# else:
# try:
# return s.decode("utf-8")
# except UnicodeDecodeError:
# try:
# return s.decode("latin-1")
# except UnicodeDecodeError:
# return ""
# author_name = turn_into_unicode(author_name)
# email = turn_into_unicode(email)
# company = turn_into_unicode(company)
# authors.append({
# "name": author_name,
# "email": email,
# "affiliation": company,
# "country": country
# })
# dummysubmission=type('', (), {})() #https://stackoverflow.com/questions/19476816/creating-an-empty-object-in-python
# dummysubmission.authors = authors
# update_authors(doc,dummysubmission)
# # add a docevent with words explaining where this came from
# events = []
# e = NewRevisionDocEvent.objects.create(
# type="new_revision",
# doc=doc,
# rev=rev,
# by=system,
# desc="New version available: <b>%s-%s.txt</b>" % (doc.name, doc.rev),
# time=time,
# )
# events.append(e)
# e = DocEvent.objects.create(
# type="comment",
# doc = doc,
# rev = rev,
# by = system,
# desc = "Revision added from id-archive on %s by %s"%(date_today(),sys.argv[0]),
# time=time,
# )
# events.append(e)
# doc.time = time
# doc.rev = rev
# doc.save_with_history(events)
# print "Added",name, rev

View file

@ -581,6 +581,7 @@ class CustomApiTests(TestCase):
url = urlreverse('ietf.api.views.PersonalInformationExportView')
login_testing_unauthorized(self, person.user.username, url)
r = self.client.get(url)
self.assertEqual(r.status_code, 200)
jsondata = r.json()
data = jsondata['person.person'][str(person.id)]
self.assertEqual(data['name'], person.name)

2
ietf/bin/.gitignore vendored
View file

@ -1,2 +0,0 @@
/*.pyc
/settings_local.py

View file

@ -1,296 +0,0 @@
#!/usr/bin/env python
import os, re, sys, shutil, pathlib
from collections import namedtuple
from PIL import Image
# boilerplate
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
sys.path = [ basedir ] + sys.path
os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
if os.path.exists(virtualenv_activation):
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
import django
django.setup()
from django.conf import settings
from django.utils.text import slugify
import debug
from ietf.group.models import Role, Person
from ietf.person.name import name_parts
old_images_dir = ''
new_images_dir = settings.PHOTOS_DIR
if not os.path.exists(new_images_dir):
print("New images directory does not exist: %s" % new_images_dir)
sys.exit(1)
old_image_files = []
for dir in settings.OLD_PHOTO_DIRS:
if not os.path.exists(dir):
print("Old images directory does not exist: %s" % dir)
sys.exit(1)
old_image_files += [ f for f in pathlib.Path(dir).iterdir() if f.is_file() and f.suffix.lower() in ['.jpg', '.jpeg', '.png'] ]
photo = namedtuple('photo', ['path', 'name', 'ext', 'width', 'height', 'time', 'file'])
old_images = []
for f in old_image_files:
path = str(f)
img = Image.open(path)
old_images.append(photo(path, f.stem.decode('utf8'), f.suffix, img.size[0], img.size[1], f.stat().st_mtime, f))
# Fix up some names:
def fix_missing_surnames(images):
replacement = {
"alissa": "alissa-cooper",
"alissa1": "alissa-cooper",
"andrei": "andrei-robachevsky",
"bernard": "bernard-aboba",
"danny": "danny-mcpherson",
"danny1": "danny-mcpherson",
"dthaler": "dave-thaler",
"eliot-mug": "eliot-lear",
"erik.nordmark-300": "erik-nordmark",
"hannes": "hannes-tschofenig",
"hildebrand": "joe-hildebrand",
"housley": "russ-housley",
"jariarkko": "jari-arkko",
"joel": "joel-jaeggli",
"joel1": "joel-jaeggli",
"joel2": "joel-jaeggli",
"jon": "jon-peterson",
"kessens": "david-kessens",
"klensin": "john-klensin",
"lars": "lars-eggert",
"lars1": "lars-eggert",
"marc_blanchet": "marc-blanchet",
"marcelo": "marcelo-bagnulo",
"olaf": "olaf-kolkman",
"olaf1": "olaf-kolkman",
"ross": "ross-callon",
"spencer": "spencer-dawkins",
"spencer1": "spencer-dawkins",
"vijay": "vijay-gurbani",
"xing": "xing-li",
}
for i in range(len(images)):
img = images[i]
name = re.sub('-[0-9]+x[0-9]+', '', img.name)
if '/iab/' in img.path and name in replacement:
name = replacement[name]
images[i] = photo(img.path, name, img.ext, img.width, img.height, img.time, img.file)
fix_missing_surnames(old_images)
interesting_persons = set(Person.objects.all())
name_alias = {
u"andy": [u"andrew", ],
u"ben": [u"benjamin", ],
u"bill": [u"william", ],
u"bob": [u"robert", ],
u"chris": [u"christopher", u"christian"],
u"dan": [u"daniel", ],
u"dave": [u"david", ],
u"dick": [u"richard", ],
u"fred": [u"alfred", ],
u"geoff": [u"geoffrey", ],
u"jake": [u"jacob", ],
u"jerry": [u"gerald", ],
u"jim": [u"james", ],
u"joe": [u"joseph", ],
u"jon": [u"jonathan", ],
u"mike": [u"michael", ],
u"ned": [u"edward", ],
u"pete": [u"peter", ],
u"ron": [u"ronald", ],
u"russ": [u"russel", ],
u"steve": [u"stephen", ],
u"ted": [u"edward", ],
u"terry": [u"terence", ],
u"tom": [u"thomas", ],
u"wes": [u"wesley", ],
u"will": [u"william", ],
u"beth": [u"elizabeth", ],
u"liz": [u"elizabeth", ],
u"lynn": [u"carolyn", ],
u"pat": [u"patricia", u"patrick", ],
u"sue": [u"susan", ],
}
# Add lookups from long to short, from the initial set
for key,value in name_alias.items():
for item in value:
if item in name_alias:
name_alias[item] += [ key ];
else:
name_alias[item] = [ key ];
exceptions = {
'Aboba' : 'aboba-bernard',
'Bernardos' : 'cano-carlos',
'Bormann' : 'bormann-carsten',
'Hinden' : 'hinden-bob',
'Hutton' : 'hutton-andy',
'Narten' : 'narten-thomas', # but there's no picture of him
'O\'Donoghue' : 'odonoghue-karen',
'Przygienda' : 'przygienda-antoni',
'Salowey' : 'salowey-joe',
'Gunter Van de Velde' : 'vandevelde-gunter',
'Eric Vyncke' : 'vynke-eric',
'Zuniga' : 'zuniga-carlos-juan',
'Zhen Cao' : 'zhen-cao',
'Jamal Hadi Salim': 'hadi-salim-jamal',
}
# Manually copied Bo Burman and Thubert Pascal from wg/photos/
# Manually copied Victor Pascual (main image, not thumb) from wg/
# Manually copied Eric Vync?ke (main image, not thumb) from wg/photos/
# Manually copied Danial King (main image, not thumb) from wg/photos/
# Manually copied the thumb (not labelled as such) for Tianran Zhou as both the main and thumb image from wg/photos/
processed_files = []
for person in sorted(list(interesting_persons),key=lambda x:x.last_name()+x.ascii):
substr_pattern = None
for exception in exceptions:
if exception in person.ascii:
substr_pattern = exceptions[exception]
break
if not person.ascii.strip():
print(" Setting person.ascii for %s" % person.name)
person.ascii = person.name.encode('ascii', errors='replace').decode('ascii')
_, first, _, last, _ = person.ascii_parts()
first = first.lower()
last = last. lower()
if not substr_pattern:
substr_pattern = slugify("%s %s" % (last, first))
if first in ['', '<>'] or last in ['', '<>']:
continue
#debug.show('1, substr_pattern')
candidates = [x for x in old_images if x.name.lower().startswith(substr_pattern)]
# Also check the reverse the name order (necessary for Deng Hui, for instance)
substr_pattern = slugify("%s %s" % (first, last))
#debug.show('2, substr_pattern')
prev_len = len(candidates)
candidates += [x for x in old_images if x.name.lower().startswith(substr_pattern)]
if prev_len < len(candidates) :
print(" Found match with '%s %s' for '%s %s'" % (last, first, first, last, ))
# If no joy, try a short name
if first in name_alias:
prev_len = len(candidates)
for alias in name_alias[first]:
substr_pattern = slugify("%s %s" % (last, alias))
#debug.show('3, substr_pattern')
candidates += [x for x in old_images if x.name.lower().startswith(substr_pattern)]
if prev_len < len(candidates):
print(" Found match with '%s %s' for '%s %s'" % (alias, last, first, last, ))
# # If still no joy, try with Person.plain_name() (necessary for Donald Eastlake)
# if not candidates:
# prefix, first, middle, last, suffix = person.name_parts()
# name_parts = person.plain_name().lower().split()
#
# substr_pattern = u'-'.join(name_parts[-1:]+name_parts[0:1])
# candidates = [x for x in old_images if x.name.lower().startswith(substr_pattern)]
# # If no joy, try a short name
# if not candidates and first in name_alias:
# prev_len = len(candidates)
# for alias in name_alias[first]:
# substr_pattern = u'-'.join(name_parts[-1:]+[alias])
# candidates += [x for x in old_images if x.name.lower().startswith(substr_pattern)]
# if prev_len < len(candidates) :
# print(" Used '%s %s' instead of '%s %s'" % (alias, last, first, last, ))
# # Fixup for other exceptional cases
# if person.ascii=="David Oran":
# candidates = ['oran-dave-th.jpg','oran-david.jpg']
#
# if person.ascii=="Susan Hares":
# candidates = ['hares-sue-th.jpg','hares-susan.JPG']
#
# if person.ascii=="Mahesh Jethanandani":
# candidates = ['Mahesh-Jethanandani-th.jpg','Jethanandani-Mahesh.jpg']
processed_files += [ c.path for c in candidates ]
# We now have a list of candidate photos.
# * Consider anything less than 200x200 a thumbnail
# * For the full photo, sort by size (width) and time
# * For the thumbnail:
# - first look for a square photo less than 200x200
# - if none found, then for the first in the sorted list less than 200x200
# - if none found, then the smallest photo
if candidates:
candidates.sort(key=lambda x: "%04d-%d" % (x.width, x.time))
iesg_cand = [ c for c in candidates if '/iesg/' in c.path ]
iab_cand = [ c for c in candidates if '/iab/' in c.path ]
if iesg_cand:
full = iesg_cand[-1]
thumb = iesg_cand[-1]
elif iab_cand:
full = iab_cand[-1]
thumb = iab_cand[0]
else:
full = candidates[-1]
thumbs = [ c for c in candidates if c.width==c.height and c.width <= 200 ]
if not thumbs:
thumbs = [ c for c in candidates if c.width==c.height ]
if not thumbs:
thumbs = [ c for c in candidates if c.width <= 200 ]
if not thumbs:
thumbs = candidates[:1]
thumb = thumbs[-1]
candidates = [ thumb, full ]
# At this point we either have no candidates or two. If two, the first will be the thumb
def copy(old, new):
if not os.path.exists(new):
print("Copying "+old+" to "+new)
shutil.copy(old, new)
shutil.copystat(old, new)
assert(len(candidates) in [0,2])
if len(candidates)==2:
thumb, full = candidates
new_name = person.photo_name(thumb=False)+full.ext.lower()
new_thumb_name = person.photo_name(thumb=True)+thumb.ext.lower()
copy( full.path, os.path.join(new_images_dir,new_name) )
#
copy( thumb.path, os.path.join(new_images_dir,new_thumb_name) )
print("")
not_processed = 0
for file in old_image_files:
if ( file.is_file()
and not file.suffix.lower() in ['.txt', '.lck', '.html',]
and not file.name.startswith('index.')
and not file.name.startswith('milestoneupdate')
and not file.name.startswith('nopicture')
and not file.name.startswith('robots.txt')
):
if not str(file).decode('utf8') in processed_files:
not_processed += 1
print(u"Not processed: "+str(file).decode('utf8'))
print("")
print("Not processed: %s files" % not_processed)

View file

@ -1,48 +0,0 @@
#!/usr/bin/env python
import sys, os, sys
import datetime
# boilerplate
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
sys.path = [ basedir ] + sys.path
os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
if os.path.exists(virtualenv_activation):
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
import django
django.setup()
from django.core import management
from django.template.loader import render_to_string
from ietf import settings
from ietf.utils.mail import send_mail_preformatted
from ietf.utils.mail import send_mail
target_date=datetime.date(year=2014,month=1,day=24)
send_mail(request = None,
to = "IETF-Announce <ietf-announce@ietf.org>",
frm = "The IESG <iesg-secretary@ietf.org>",
subject = "Upcoming change to announcement email header fields (using old header)",
template = "utils/header_change_content.txt",
context = dict(oldornew='old', target_date=target_date),
extra = {'Reply-To' : 'ietf@ietf.org',
'Sender' : '<iesg-secretary@ietf.org>',
}
)
send_mail(request = None,
to = "IETF-Announce:;",
frm = "The IESG <noreply@ietf.org>",
subject = "Upcoming change to announcement email header fields (using new header)",
template = "utils/header_change_content.txt",
context = dict(oldornew='new', target_date=target_date),
extra = {'Reply-To' : 'IETF Discussion List <ietf@ietf.org>',
'Sender' : '<iesg-secretary@ietf.org>',
},
bcc = '<ietf-announce@ietf.org>',
)

View file

@ -1,43 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- Python -*-
#
import os, sys
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
sys.path = [ basedir ] + sys.path
os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
if os.path.exists(virtualenv_activation):
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
import django
django.setup()
from ietf.group.models import Group
from ietf.person.models import Person
from ietf.name.models import SessionStatusName
from ietf.meeting.models import Meeting, Session, ScheduledSession as ScheduleTimeslotSSessionAssignment
secretariat = Group.objects.get(acronym='secretariat')
system = Person.objects.get(id=1, name='(System)')
scheduled = SessionStatusName.objects.get(slug='sched')
for meeting in Meeting.objects.filter(type="ietf").order_by("date"):
print "Checking %s schedules ..." % meeting
brk, __ = Session.objects.get_or_create(meeting=meeting, group=secretariat, requested_by=system, status=scheduled, name='Break', type_id='break',)
reg, __ = Session.objects.get_or_create(meeting=meeting, group=secretariat, requested_by=system, status=scheduled, name='Registration', type_id='reg',)
for schedule in meeting.schedule_set.all():
print " Checking for missing Break and Reg sessions in %s" % schedule
for timeslot in meeting.timeslot_set.all():
if timeslot.type_id == 'break' and not (schedule.base and SchedTimeSessAssignment.objects.filter(timeslot=timeslot, session=brk, schedule=schedule.base).exists()):
assignment, created = SchedTimeSessAssignment.objects.get_or_create(timeslot=timeslot, session=brk, schedule=schedule)
if created:
print " Added %s break assignment" % timeslot
if timeslot.type_id == 'reg' and not (schedule.base and SchedTimeSessAssignment.objects.filter(timeslot=timeslot, session=reg, schedule=schedule.base).exists()):
assignment, created = SchedTimeSessAssignment.objects.get_or_create(timeslot=timeslot, session=reg, schedule=schedule)
if created:
print " Added %s registration assignment" % timeslot

View file

@ -1,72 +0,0 @@
#!/usr/bin/env python
import os
import sys
version = "0.10"
program = os.path.basename(sys.argv[0])
progdir = os.path.dirname(sys.argv[0])
# boilerplate
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
sys.path = [ basedir ] + sys.path
os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
if os.path.exists(virtualenv_activation):
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
# ----------------------------------------------------------------------
def note(string):
sys.stdout.write("%s\n" % (string))
# ----------------------------------------------------------------------
def warn(string):
sys.stderr.write(" * %s\n" % (string))
# ------------------------------------------------------------------------------
import re
import datetime
import django
django.setup()
from django.conf import settings
from ietf.utils.path import path as Path
from ietf.doc.models import Document, NewRevisionDocEvent
from ietf.person.models import Person
system_entity = Person.objects.get(name="(System)")
charterdir = Path(settings.CHARTER_PATH)
for file in charterdir.files("charter-ietf-*.txt"):
fname = file.name
ftime = datetime.datetime.fromtimestamp(file.mtime, datetime.timezone.utc)
match = re.search("^(?P<name>[a-z0-9-]+)-(?P<rev>\d\d-\d\d)\.txt$", fname)
if match:
name = match.group("name")
rev = match.group("rev")
else:
match = re.search("^(?P<name>[a-z0-9-]+)-(?P<rev>\d\d)\.txt$", fname)
if match:
name = match.group("name")
rev = match.group("rev")
else:
warn("Failed extracting revision from filename: '%s'" % fname)
try:
doc = Document.objects.get(type="charter", name=name)
try:
event = NewRevisionDocEvent.objects.get(doc=doc, type='new_revision', rev=rev)
note(".")
except NewRevisionDocEvent.MultipleObjectsReturned, e:
warn("Multiple NewRevisionDocEvent exists for '%s'" % fname)
except NewRevisionDocEvent.DoesNotExist:
event = NewRevisionDocEvent(doc=doc, type='new_revision', rev=rev, by=system_entity, time=ftime, desc="")
event.save()
note("Created new NewRevisionDocEvent for %s-%s" % (name, rev))
except Document.DoesNotExist:
warn("Document not found: '%s'; no NewRevisionDocEvent created for '%s'" % (name, fname))

View file

@ -1,41 +0,0 @@
#!/usr/bin/env python
import os
import sys
version = "0.10"
program = os.path.basename(sys.argv[0])
progdir = os.path.dirname(sys.argv[0])
# boilerplate
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
sys.path = [ basedir ] + sys.path
os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
if os.path.exists(virtualenv_activation):
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
import django
django.setup()
from django.template import Template, Context
from ietf.doc.models import Document
from ietf.person.models import Person
drafts = Document.objects.filter(type="draft")
ads = {}
for p in Person.objects.filter(ad_document_set__type="draft").distinct():
ads[p.id] = p.role_email("ad")
for d in drafts:
d.ad_email = ads.get(d.ad_id)
templ_text = """{% for draft in drafts %}{% if draft.notify or draft.ad_email %}{{ draft.name }}{% if draft.notify %} docnotify='{{ draft.notify|cut:"<"|cut:">" }}'{% endif %}{% if draft.ad_email %} docsponsor='{{ draft.ad_email }}'{% endif %}
{% endif %}{% endfor %}"""
template = Template(templ_text)
context = Context({ 'drafts':drafts })
print template.render(context).encode('utf-8')

View file

@ -1,37 +0,0 @@
#!/usr/bin/env python
import sys, os, sys
import syslog
# boilerplate
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
sys.path = [ basedir ] + sys.path
os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
if os.path.exists(virtualenv_activation):
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-t", "--to", dest="to",
help="Email address to send report to", metavar="EMAIL")
options, args = parser.parse_args()
syslog.openlog(os.path.basename(__file__), syslog.LOG_PID, syslog.LOG_USER)
import django
django.setup()
from ietf.sync.mails import email_discrepancies
receivers = ["iesg-secretary@ietf.org"]
if options.to:
receivers = [options.to]
email_discrepancies(receivers)
syslog.syslog("Emailed sync discrepancies to %s" % receivers)

View file

@ -1,106 +0,0 @@
#!/usr/bin/env python
import io
import os
import sys
version = "0.10"
program = os.path.basename(sys.argv[0])
progdir = os.path.dirname(sys.argv[0])
# boilerplate
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
sys.path = [ basedir ] + sys.path
os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
if os.path.exists(virtualenv_activation):
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
# ----------------------------------------------------------------------
def note(string):
sys.stdout.write("%s\n" % (string))
# ----------------------------------------------------------------------
def warn(string):
sys.stderr.write(" * %s\n" % (string))
# ------------------------------------------------------------------------------
import re
from datetime import datetime as Datetime
import time
import warnings
warnings.filterwarnings('ignore', message='the sets module is deprecated', append=True)
import django
django.setup()
from django.conf import settings
from ietf.utils.path import path as Path
from ietf.submit.models import Submission
from ietf.doc.models import Document
args = sys.argv[1:]
if len(args) < 3:
warn("Expected '$ %s DRAFTNAME USER.LOG POSTFIX.LOG', but found no arguments -- exiting" % program)
sys.exit(1)
draft = args[0]
if re.search("\.txt$", draft):
draft = draft[:-4]
if re.search("-\d\d$", draft):
draft = draft[:-3]
if len(args) == 1:
logfiles = [ arg[1] ]
else:
logfiles = args[1:]
from_email = settings.IDSUBMIT_FROM_EMAIL
if "<" in from_email:
from_email = from_email.split("<")[1].split(">")[0]
submission = Submission.objects.filter(name=draft).latest('submission_date')
document = Document.objects.get(name=draft)
emails = [ author.email.address for author in document.documentauthor_set.all() if author.email ]
timestrings = []
for file in [ Path(settings.INTERNET_DRAFT_PATH) / ("%s-%s.txt"%(draft, submission.rev)),
Path(settings.IDSUBMIT_STAGING_PATH) / ("%s-%s.txt"%(draft, submission.rev)) ]:
if os.path.exists(file):
upload_time = time.localtime(file.mtime)
ts = time.strftime("%b %d %H:%M", upload_time)
timestrings += [ ts ]
timestrings += [ ts[:-1] + chr(((ord(ts[-1])-ord('0')+1)%10)+ord('0')) ]
print "Looking for mail log lines timestamped %s, also checking %s ..." % (timestrings[0], timestrings[1])
for log in logfiles:
print "\n Checking %s ...\n" % log
if log.endswith('.gz'):
import gzip
logfile = gzip.open(log)
else:
logfile = io.open(log)
queue_ids = []
for line in logfile:
if from_email in line and "Confirmation for Auto-Post of I-D "+draft in line:
ts = line[:12]
timestrings += [ ts ]
print "Found a mention of %s, adding timestamp %s: \n %s" % (draft, ts, line)
for ts in timestrings:
if line.startswith(ts):
if from_email in line:
for to_email in emails:
if to_email in line:
sys.stdout.write(line)
if "queued_as:" in line:
queue_ids += [ line.split("queued_as:")[1].split(",")[0] ]
elif queue_ids:
for qi in queue_ids:
if qi in line:
sys.stdout.write(line)

View file

@ -1,27 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- Python -*-
#
'''
This script calls ietf.meeting.helpers.check_interim_minutes() which sends
a reminder email for interim meetings that occurred 10 days ago but still
don't have minutes.
'''
# Set PYTHONPATH and load environment variables for standalone script -----------------
import os, sys
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
sys.path = [ basedir ] + sys.path
os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
if os.path.exists(virtualenv_activation):
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
import django
django.setup()
# -------------------------------------------------------------------------------------
from ietf.meeting.helpers import check_interim_minutes
check_interim_minutes()

View file

@ -1,36 +0,0 @@
#!/usr/bin/env python
import os, sys
import syslog
# boilerplate
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
sys.path = [ basedir ] + sys.path
os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
if os.path.exists(virtualenv_activation):
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
syslog.openlog(os.path.basename(__file__), syslog.LOG_PID, syslog.LOG_USER)
import django
django.setup()
from django.utils.encoding import force_str
from ietf.group.models import Role
addresses = set()
for role in Role.objects.filter(
group__state__slug='active',
group__type__in=['ag','area','dir','iab','ietf','irtf','nomcom','rg','team','wg','rag']):
#sys.stderr.write(str(role)+'\n')
for e in role.person.email_set.all():
if e.active and not e.address.startswith('unknown-email-'):
addresses.add(e.address)
addresses = list(addresses)
addresses.sort()
for a in addresses:
print(force_str(a))

View file

@ -1,5 +0,0 @@
#!/bin/sh
python manage.py dumpdata --format=xml "$@" | sed -e 's/<\/*object/\
&/g' -e 's/<field/\
&/g' -e 's/<\/django-objects/\
&/g'

File diff suppressed because it is too large Load diff

View file

@ -1,9 +0,0 @@
#!/bin/sh
#
# Copyright The IETF Trust 2007, All Rights Reserved
#
#python manage.py dumpdata --format=xml redirects | xmllint --format -
python manage.py dumpdata --format=xml redirects | sed -e 's/<\/*object/\
&/g' -e 's/<field/\
&/g' -e 's/<\/django-objects/\
&/g'

View file

@ -1,38 +0,0 @@
#!/usr/bin/env python
#
# Run some non-modifying tests on top of the real database, to
# exercise the code with real data.
#
import os, subprocess, datetime
base_dir = os.path.relpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
path = os.path.abspath(os.path.join(base_dir, ".."))
if os.environ.get("PYTHONPATH"):
path += ":" + os.environ.get("PYTHONPATH")
os.environ["PYTHONPATH"] = path
def run_script(script, *args):
script_base = os.path.splitext(os.path.basename(script))[0]
script_path = os.path.join(base_dir, script)
output_path = os.path.join(base_dir, script_base)
arg_str = " " + " ".join(args) if args else ""
cmd_line = "%s%s > %s.output" % (script_path, arg_str, output_path)
print "Running %s" % cmd_line
before = datetime.datetime.now()
returncode = subprocess.call(cmd_line, shell=True)
print " (took %.3f seconds)" % (datetime.datetime.now() - before).total_seconds()
return returncode
# idindex
run_script("idindex/generate_id_abstracts_txt.py")
run_script("idindex/generate_id_index_txt.py")
run_script("idindex/generate_all_id_txt.py")
run_script("idindex/generate_all_id2_txt.py")
# test crawler
crawl_input = os.path.join(base_dir, "utils/crawlurls.txt")
run_script("bin/test-crawl", "--urls %s" % crawl_input)

View file

@ -1,87 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- Python -*-
#
'''
This script configures Django Admin permissions
'''
# Set PYTHONPATH and load environment variables for standalone script -----------------
import os, sys
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
sys.path = [ basedir ] + sys.path
os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
if os.path.exists(virtualenv_activation):
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
import django
django.setup()
# -------------------------------------------------------------------------------------
from django.contrib.auth.models import Group as AuthGroup
from django.contrib.auth.models import Permission
from ietf.group.models import Group
def permission_names_to_objects(names):
"""
Given an iterable of permission names (e.g. 'app_label.add_model'),
return an iterable of Permission objects for them. The permission
must already exist, because a permission name is not enough information
to create a new permission.
"""
result = []
for name in names:
app_label, codename = name.split(".", 1)
try:
result.append(Permission.objects.get(content_type__app_label=app_label,
codename=codename))
except Permission.DoesNotExist:
print ("NO SUCH PERMISSION: %s, %s" % (app_label, codename))
raise
return result
def main():
secretariat = Group.objects.get(acronym='secretariat')
users = [ r.person.user for r in secretariat.role_set.filter(name='secr') ]
# Set Auth Group members
auth_group, _ = AuthGroup.objects.get_or_create(name='secretariat')
auth_group.user_set.set(users)
# Set Auth Group Admin Permissions
names = ['auth.add_user','auth.change_user','auth.delete_user',
'dbtemplate.change_dbtemplate',
'group.add_group','group.change_group','group.delete_group',
'group.add_role','group.change_role','group.delete_role',
'group.add_groupevent','group.change_groupevent','group.delete_groupevent',
'iesg.add_telechatagendaitem','iesg.change_telechatagendaitem','iesg.delete_telechatagendaitem',
'iesg.add_telechatdate','iesg.change_telechatdate','iesg.delete_telechatdate',
'liaisons.add_liaisonstatementgroupcontacts', 'liaisons.change_liaisonstatementgroupcontacts', 'liaisons.delete_liaisonstatementgroupcontacts',
'mailinglists.add_list','mailinglists.change_list','mailinglists.delete_list',
'mailtrigger.add_mailtrigger','mailtrigger.change_mailtrigger','mailtrigger.delete_mailtrigger',
'mailtrigger.add_recipient','mailtrigger.change_recipient','mailtrigger.delete_recipient',
'meeting.add_floorplan','meeting.change_floorplan','meeting.delete_floorplan',
'meeting.add_importantdate','meeting.change_importantdate','meeting.delete_importantdate',
'meeting.add_meeting','meeting.change_meeting','meeting.delete_meeting',
'meeting.add_room','meeting.change_room','meeting.delete_room',
'meeting.add_urlresource','meeting.change_urlresource','meeting.delete_urlresource',
'message.add_announcementfrom','message.change_announcementfrom','message.delete_announcementfrom',
'nomcom.add_nomcom','nomcom.change_nomcom','nomcom.delete_nomcom',
'nomcom.add_volunteer','nomcom.change_volunteer','nomcom.delete_volunteer',
'person.add_person','person.change_person','person.delete_person',
'person.add_alias','person.change_alias','person.delete_alias',
'person.add_email','person.change_email','person.delete_email',
'submit.add_submission','submit.change_submission','submit.delete_submission',
]
permissions = permission_names_to_objects(names)
auth_group.permissions.set(permissions)
if __name__ == '__main__':
main()

View file

@ -1 +0,0 @@
/*.pyc

View file

@ -1,2 +0,0 @@
/*.pyc
/settings_local.py

View file

@ -35,6 +35,7 @@ def draft_name_generator(type_id,group,n):
class BaseDocumentFactory(factory.django.DjangoModelFactory):
class Meta:
model = Document
skip_postgeneration_save = True
title = factory.Faker('sentence',nb_words=5)
abstract = factory.Faker('paragraph', nb_sentences=5)
@ -305,6 +306,7 @@ class NewRevisionDocEventFactory(DocEventFactory):
class StateDocEventFactory(DocEventFactory):
class Meta:
model = StateDocEvent
skip_postgeneration_save = True
type = 'changed_state'
state_type_id = 'draft-iesg'
@ -378,6 +380,7 @@ class WgDocumentAuthorFactory(DocumentAuthorFactory):
class BofreqEditorDocEventFactory(DocEventFactory):
class Meta:
model = BofreqEditorDocEvent
skip_postgeneration_save = True
type = "changed_editors"
doc = factory.SubFactory('ietf.doc.factories.BofreqFactory')
@ -392,10 +395,12 @@ class BofreqEditorDocEventFactory(DocEventFactory):
else:
obj.editors.set(PersonFactory.create_batch(3))
obj.desc = f'Changed editors to {", ".join(obj.editors.values_list("name",flat=True)) or "(None)"}'
obj.save()
class BofreqResponsibleDocEventFactory(DocEventFactory):
class Meta:
model = BofreqResponsibleDocEvent
skip_postgeneration_save = True
type = "changed_responsible"
doc = factory.SubFactory('ietf.doc.factories.BofreqFactory')
@ -411,6 +416,7 @@ class BofreqResponsibleDocEventFactory(DocEventFactory):
ad = RoleFactory(group__type_id='area',name_id='ad').person
obj.responsible.set([ad])
obj.desc = f'Changed responsible leadership to {", ".join(obj.responsible.values_list("name",flat=True)) or "(None)"}'
obj.save()
class BofreqFactory(BaseDocumentFactory):
type_id = 'bofreq'

View file

@ -1,319 +0,0 @@
# Copyright The IETF Trust 2023, All Rights Reserved
import debug # pyflakes:ignore
import csv
import datetime
import io
import os
import shutil
import subprocess
import tempfile
from collections import defaultdict
from pathlib import Path
from django.conf import settings
from django.core.management.base import BaseCommand
from ietf.doc.models import Document, DocEvent, State
from ietf.utils.text import xslugify
class Command(BaseCommand):
help = "Performs a one-time import of IAB statements"
def handle(self, *args, **options):
if Document.objects.filter(type="statement", group__acronym="iab").exists():
print("IAB statement documents already exist - exiting")
exit(-1)
tmpdir = tempfile.mkdtemp()
process = subprocess.Popen(
["git", "clone", "https://github.com/kesara/iab-scraper.git", tmpdir],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
stdout, stderr = process.communicate()
if not Path(tmpdir).joinpath("iab_minutes", "2022-12-14.md").exists():
print("Git clone of the iab-scraper directory did not go as expected")
print("stdout:", stdout)
print("stderr:", stderr)
print(f"Clean up {tmpdir} manually")
exit(-1)
spreadsheet_rows = load_spreadsheet()
with open("iab_statement_redirects.csv", "w") as redirect_file:
redirect_writer = csv.writer(redirect_file)
for index, (file_fix, date_string, title, url, _) in enumerate(
spreadsheet_rows
):
name = url.split("/")[6].lower()
if name.startswith("iabs"):
name = name[5:]
elif name.startswith("iab"):
name = name[4:]
if index == 1:
name += "-archive" # https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-statement-on-identifiers-and-unicode-7-0-0/archive/
if index == 100:
name = (
"2010-" + name
) # https://www.iab.org/documents/correspondence-reports-documents/docs2010/iab-statement-on-the-rpki/
if index == 152:
name = (
"2018-" + name
) # https://www.iab.org/documents/correspondence-reports-documents/2018-2/iab-statement-on-the-rpki/
docname = f"statement-iab-{xslugify(name)}"
ext = None
base_sourcename = (
f"{date_string}-{file_fix}" if file_fix != "" else date_string
)
if (
Path(tmpdir)
.joinpath("iab_statements", f"{base_sourcename}.md")
.exists()
):
ext = "md"
elif (
Path(tmpdir)
.joinpath("iab_statements", f"{base_sourcename}.pdf")
.exists()
):
ext = "pdf"
if ext is None:
debug.show(
'f"Could not find {Path(tmpdir).joinpath("iab_statements", f"{base_path}.md")}"'
)
continue
filename = f"{docname}-00.{ext}"
# Create Document
doc = Document.objects.create(
name=docname,
type_id="statement",
title=title,
group_id=7, # The IAB group
rev="00",
uploaded_filename=filename,
)
doc.set_state(State.objects.get(type_id="statement", slug="active"))
year, month, day = [int(part) for part in date_string.split("-")]
e1 = DocEvent.objects.create(
time=datetime.datetime(
year, month, day, 12, 00, tzinfo=datetime.timezone.utc
),
type="published_statement",
doc=doc,
rev="00",
by_id=1,
desc="Statement published (note: The 1200Z time of day is inaccurate - the actual time of day is not known)",
)
e2 = DocEvent.objects.create(
type="added_comment",
doc=doc,
rev="00",
by_id=1, # The "(System)" person
desc="Statement moved into datatracker from iab wordpress website",
)
doc.save_with_history([e1, e2])
# Put file in place
source = Path(tmpdir).joinpath(
"iab_statements", f"{base_sourcename}.{ext}"
)
dest = Path(settings.DOCUMENT_PATH_PATTERN.format(doc=doc)).joinpath(
filename
)
if dest.exists():
print(f"WARNING: {dest} already exists - not overwriting it.")
else:
os.makedirs(dest.parent, exist_ok=True)
shutil.copy(source, dest)
redirect_writer.writerow(
[
url,
f"https://datatracker.ietf.org/doc/{docname}",
]
)
shutil.rmtree(tmpdir)
def load_spreadsheet():
csv_dump = '''2002-03-01,IAB RFC Publication Process Description(txt) March 2003,https://www.iab.org/documents/correspondence-reports-documents/docs2003/iab-rfc-publication-process/,deprecated
2015-01-27,IAB Statement on Identifiers and Unicode 7.0.0 (archive),https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-statement-on-identifiers-and-unicode-7-0-0/archive/,deprecated
2010-02-05,Response to the ECs RFI on Forums and Consortiums,https://www.iab.org/documents/correspondence-reports-documents/docs2010/response-to-the-ecs-rfi-on-forums-and-consortiums/,https://www.iab.org/wp-content/IAB-uploads/2011/03/2010-02-05-IAB-Response-Euro-ICT-Questionnaire.pdf
2011-03-30,IAB responds to NTIA Request for Comments on the IANA Functions,https://www.iab.org/documents/correspondence-reports-documents/2011-2/iab-responds-to-ntia-request-for-comments-on-the-iana-functions/,https://www.iab.org/wp-content/IAB-uploads/2011/04/2011-03-30-iab-iana-noi-response.pdf
2011-07-28,IAB's response to the NTIA FNOI on IANA,https://www.iab.org/documents/correspondence-reports-documents/2011-2/iabs-response-to-the-ntia-fnoi-on-iana/,https://www.iab.org/wp-content/IAB-uploads/2011/07/IANA-IAB-FNOI-2011.pdf
2011-12-16,"Questionnaire in support of the ICANN bid for the IANA function [Dec 16, 2011]",https://www.iab.org/documents/correspondence-reports-documents/2011-2/questionnaire-in-support-of-the-icann-bid-for-the-iana-function/,https://www.iab.org/wp-content/IAB-uploads/2011/12/IAB-Past-Performance-Questionnaire.pdf
2012-04-03,IETF Oversight of the IANA Protocol Parameter Function,https://www.iab.org/documents/correspondence-reports-documents/2012-2/ietf-oversight-of-the-iana-protocol-parameter-function/,https://www.iab.org/wp-content/IAB-uploads/2012/04/IETF-IANA-Oversight.pdf
2012-04-29,IETF and IAB comment on OMB Circular A-119,https://www.iab.org/documents/correspondence-reports-documents/2012-2/ietf-and-iab-comment-on-omb-circular-a-119/,https://www.iab.org/wp-content/IAB-uploads/2012/04/OMB-119.pdf
2012-05-24,IAB submits updated ICANN performance evaluation,https://www.iab.org/documents/correspondence-reports-documents/2012-2/iab-submits-updated-icann-performance-evaluation/,https://www.iab.org/wp-content/IAB-uploads/2012/05/IAB-Past-Performance-Questionnaire-FINAL.pdf
2013-07-02,Open letter to the European Commission and the European Parliament in the matter of the Transatlantic Trade and Investment Partnership (TTIP),https://www.iab.org/documents/correspondence-reports-documents/2013-2/open-letter-to-the-ec/,https://www.iab.org/wp-content/IAB-uploads/2013/07/TTIP_market_driven_standards_EU_letter.pdf
2013-05-10,Comments In the matter of Transatlantic Trade and Investment Partnership (TTIP) (USTR-2013-0019),https://www.iab.org/documents/correspondence-reports-documents/2013-2/comments-in-the-matter-of-transatlantic-trade-and-investment-partnership-ttip-ustr-2013-0019/,https://www.iab.org/wp-content/IAB-uploads/2013/07/TTIP_market_driven_standards_FINAL.pdf
2013-10-23,IAB Comments on Recommendation for Random Number Generation Using Deterministic Random Bit Generators,https://www.iab.org/documents/correspondence-reports-documents/2013-2/nist-sp-800-90a/,https://www.iab.org/wp-content/IAB-uploads/2013/10/IAB-NIST-FINAL.pdf
2014-04-07,IAB Comments on NISTIR 7977,https://www.iab.org/documents/correspondence-reports-documents/2014-2/iab-comments-on-nistir-7977/,https://www.iab.org/wp-content/IAB-uploads/2014/04/IAB-NIST7977-20140407.pdf
2014-04-29,Comments to ICANN on the Transition of NTIAs Stewardship of the IANA Functions,https://www.iab.org/documents/correspondence-reports-documents/2014-2/iab-response-to-icann-iana-transition-proposal/,https://www.iab.org/wp-content/IAB-uploads/2014/04/iab-response-to-20140408-20140428a.pdf
2016-05-27,"IAB Comments to US NTIA Request for Comments, ""The Benefits, Challenges, and Potential Roles for the Government in Fostering the Advancement of the Internet of Things""",https://www.iab.org/documents/correspondence-reports-documents/2016-2/iab-comments-to-ntia-request-for-comments-the-benefits-challenges-and-potential-roles-for-the-government/,https://www.iab.org/wp-content/IAB-uploads/2016/05/ntia-iot-20160525.pdf
2016-05-24,"IAB Chair Testifies before the United States Senate Committee on Commerce, Science, and Transportation on ""Examining the Multistakeholder Plan for Transitioning the Internet Assigned Number Authority""",https://www.iab.org/documents/correspondence-reports-documents/2016-2/iab-chair-statement-before-us-senate-committee-on-iana-transition/,https://www.iab.org/wp-content/IAB-uploads/2016/05/sullivan-to-senate-commerce-20160524.pdf
2018-07-16,IAB Response to NTIA Notice of Inquiry on International Internet Policy Priorities,https://www.iab.org/documents/correspondence-reports-documents/2018-2/iab-response-to-ntia-notice-of-inquiry-on-international-internet-policy-priorities-response/,https://www.iab.org/wp-content/IAB-uploads/2018/07/IAB-response-to-the-2018-NTIA-Notice-of-Inquiry.pdf
2018-09-09,Internet Architecture Board Comments on the Australian Assistance and Access Bill 2018,https://www.iab.org/documents/correspondence-reports-documents/2018-2/internet-architecture-board-comments-on-the-australian-assistance-and-access-bill-2018/,https://www.iab.org/wp-content/IAB-uploads/2018/09/IAB-Comments-on-Australian-Assistance-and-Access-Bill-2018.pdf
2023-03-03,IAB Response to the Office of the High Commissioner for Human Rights Call for Input on The relationship between human rights and technical standard-setting processes for new and emerging digital technologies,https://www.iab.org/documents/correspondence-reports-documents/2023-2/iab-response-to-the-ohchr-call-for-input-on-the-relationship-between-human-rights-and-technical-standard/,https://www.iab.org/wp-content/IAB-uploads/2023/03/IAB-Response-to-OHCHR-consultation.pdf
1998-12-09,"IAB Request to IANA for Delegating IPv6 Address Space, Mail Message, December 1998",https://www.iab.org/documents/correspondence-reports-documents/docs98/iab-request-to-iana-for-delegating-ipv6-address-space-mail-message-december-1998/,
1998-12-18,"1998 Statements on Cryptography, Mail Message, December 1998.",https://www.iab.org/documents/correspondence-reports-documents/docs98/1998-statements-on-cryptography/,
1999-02-22,Correspondence between Bradner and Dyson on Protocol Parameter Parameters,https://www.iab.org/documents/correspondence-reports-documents/docs99/correspondence-between-bradner-and-dyson-on-protocol-parameter-parameters/,
1999-08-13,Comment on ICANN ASO membership,https://www.iab.org/documents/correspondence-reports-documents/docs99/comment-on-icann-aso-membership/,
1999-10-19,Ad Hoc Group on Numbering,https://www.iab.org/documents/correspondence-reports-documents/docs99/ad-hoc-group-on-numbering/,
2000-05-01,"IAB Statement on Infrastructure Domain and Subdomains, May 2000.",https://www.iab.org/documents/correspondence-reports-documents/docs2000/iab-statement-on-infrastructure-domain-and-subdomains-may-2000/,
2002-05-01,"IETF and ITU-T Cooperation Arrangements, May 2002",https://www.iab.org/documents/correspondence-reports-documents/docs2002/ietf-and-itu-t-cooperation-arrangements-may-2002/,
2002-05-03,"IAB replyto ENUM liaison statement, May 2002",https://www.iab.org/documents/correspondence-reports-documents/docs2002/enum-response/,
2002-05-24,"Interim Approval for Internet Telephone Numbering System (ENUM) Provisioning, 24 May 2002",https://www.iab.org/documents/correspondence-reports-documents/docs2002/enum-pr/,
2002-06-01,"IAB response to ICANN Evolution and Reform, June 2002",https://www.iab.org/documents/correspondence-reports-documents/docs2002/icann-response/,
2002-09-01,"IAB response to ICANN Evolution and Reform Committee's Second Interim Report, September 2002",https://www.iab.org/documents/correspondence-reports-documents/docs2002/icann-response-2/,
2002-10-01,"IAB response to ICANN Evolution and Reform Committee's Final Implementation Report, October 2002",https://www.iab.org/documents/correspondence-reports-documents/docs2002/icann-response-3/,
2002-12-10,"IAB Response to RIRs request regarding 6bone address entries in ip6.arpa, December 2002",https://www.iab.org/documents/correspondence-reports-documents/docs2002/3ffe/,
2003-01-03,"IETF Notice of Withdrawal from the Protocol Support Organization, January 2003",https://www.iab.org/documents/correspondence-reports-documents/docs2003/icann-pso-notice/,
2003-01-25,"IAB Response to Verisign GRS IDN Announcement, January 2003",https://www.iab.org/documents/correspondence-reports-documents/docs2003/icann-vgrs-response/,
2003-07-10,"Note: Unified Notification Protocol Considerations, July 2003",https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-07-10-iab-notification/,
2003-08-01,Open Architectural Issues in the Development of the Internet,https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-08-architectural-issues/,
2003-08-28,RFC Document editing/ queueing suggestion,https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-08-28-klensin-rfc-editor/,
2003-09-02,"IAB Chair's announcement of an Advisory Committee, September 2003",https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-09-02-adv-committee/,
2003-09-19,"IAB Commentary: Architectural Concerns on the Use of DNS Wildcards, September 2003",https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-09-20-dns-wildcards/,
2003-09-24,"IAB to ICANN: IAB input related to the .cs code in ISO 3166, 24 September 2003",https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-09-25-icann-cs-code/,
2003-09-24,"IAB to ISO: IAB comment on stability of ISO 3166 and other infrastructure standards, 24 September 2003",https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-09-25-iso-cs-code/,
2003-09-25,"Correspondance to ISO concerning .cs code, and advice to ICANN, 25 September 2003",https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-09-25-icann-cs-code-2/,
2003-09-25,"Correspondance to ISO concerning .cs code, and advice to ICANN, 25 September 2003",https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-09-25-iso-cs-code-2/,
2003-09-26,ISO Codes,https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-09-23-isocodes/,
2003-10-02,"IESG to IAB: Checking data for validity before usage in a protocol, 2 October 2003",https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-10-02-iesg-dns-validity-check-query/,
2003-10-14,"Survey of Current Security Work in the IETF, October 2003",https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-10-14-security-survey/,
2003-10-17,"IAB to ICANN SESAC:Wildcard entries in DNS domains, 17 October 2003",https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-10-17-crocker-wildcards-2/,
2003-10-17,"IAB note to Steve Crocker, Chair, ICANN Security and Stability Advisory Committee, October 2003",https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-10-17-crocker-wildcards/,
2003-10-18,"IAB concerns against permanent deployment of edge-based port filtering, October 2003",https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-10-18-edge-filters/,
2003-11-08,"IAB Response to IESG architectural query: Checking data for validity before usage in protocol, November 2003",https://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-11-08-iesg-dns-validity-check-query-response/,
2004-01-19,"Number Resource Organisation (NRO) formation, 19 January 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-01-19-nro/,
2004-01-22,"IAB to RIPE NCC:ENUM Administration, 22 January 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-01-22-enum-subcodes/,
2004-02-09,"IAB to IANA: Instructions to IANA -Delegation of 2.0.0.2.ip6.arpa, 9 February, 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-02-09-6to4-rev-delegation/,
2004-02-26,The IETF -- what is it?,https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-02-26-ietf-defn/,
2004-04-15,"IAB to ICANN: Validity checks for names, 15 April, 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-04-15-icann-dns-validity-check/,
2004-05-07,"IAB to IANA: IPv6 Allocation Policy , 7 May, 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-05-07-iana-v6alloc/,
2004-05-24,"IAB to IANA: Instructions to IANA -Delegation of 3.f.f.e.ip6.arpa, 24 May, 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-05-24-3ffe-rev-delegation/,
2004-05-27,"IAB to ICANN:Concerns regarding IANA Report, 27 May, 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-05-27-iana-report/,
2004-07-16,"Upcoming clarifications to RIPE NCC instructions for e164.arpa operation, 16 July 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-07-15-enum-instructions/,
2004-07-16,"IANA Delegation Requests, 16 July 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-07-16-iana-delegation/,
2004-08-06,OMA-IETF Standardization Collaboration,https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-08-draft-iab-oma-liaison-00/,
2004-08-12,"IAB to RIPE NCC:Notice of revision of instructions concerning the ENUM Registry, 12 August, 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-08-12-enum-instructions/,
2004-08-12,"Response to your letter of August 4, 12 August 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-08-12-icann-wildcard/,
2004-09-27,"IAB to ICANN:Report of Concerns over IANA Performance , 27 September, 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-09-27-iana-concerns/,
2004-09-27,"IAB Report of IETF IANA Functions , 27 September 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-09-27-iana-report/,
2004-11-03,"IAB to IESG:Comments on Teredo , 3 November, 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-11-03-teredo-comments/,
2004-11-12,"IAB to ICANN:Response to ICANN Request for assistance with new TLD Policy , 12 November, 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-11-12-icann-new-tld-policy/,
2004-11-29,"The IETF and IPv6 Address Allocation , 29 November 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-11-29-ipv6-allocs/,
2004-12-15,"IAB Comment to Internet AD:Comments on IANA Considerations in IPv6 ULA draft, 15 December, 2004",https://www.iab.org/documents/correspondence-reports-documents/docs2004/2004-12-15-ipv6-ula-iana-considerations/,
2005-02-16,"IAB review of Structure of the IETF Administrative Support Activity, 16 February 2005",https://www.iab.org/documents/correspondence-reports-documents/docs2005/2005-02-16-iasa/,
2005-08-26,"SiteFinder returns, 26 August 2005",https://www.iab.org/documents/correspondence-reports-documents/docs2005/2005-08-26-ssac-note/,
2005-09-01,"Re: SiteFinder returns, 1 September 2005",https://www.iab.org/documents/correspondence-reports-documents/docs2005/2005-09-01-ssac-response/,
2005-10-14,"IAB to ICANN: IAB comments on ICANN IDN Guidelines, 14 October 2005",https://www.iab.org/documents/correspondence-reports-documents/docs2005/2005-10-14-idn-guidelines/,
2005-11-07,"IAB to ICANN Nameserver change for e164.arpa, 7 November 2005",https://www.iab.org/documents/correspondence-reports-documents/docs2005/2005-11-07-nameserver-change/,
2005-11-22,"IETF to ICANN IANA structural status, 22 November 2005",https://www.iab.org/documents/correspondence-reports-documents/docs2005/2005-11-22-iana-structure/,
2005-11-29,"IAB to IANA Teredo prefix assignment, 29 November 2005",https://www.iab.org/documents/correspondence-reports-documents/docs2005/2005-11-29-teredo-prefix/,
2005-12-22,"IAB to ICANN dot arpa TLD management, 22 December 2005",https://www.iab.org/documents/correspondence-reports-documents/docs2005/2005-12-22-dot-arpa/,
2006-03-06,"IAB Position on the IETF IANA Technical Parameter Function, 6 March 2006",https://www.iab.org/documents/correspondence-reports-documents/docs2006/iab-iana-position/,
2006-03-28,"IAB to ICANN Name server changes for ip6.arpa, 28 March 2006",https://www.iab.org/documents/correspondence-reports-documents/docs2006/2006-03-28-nameserver-change/,
2006-04-20,"IAB to IANA Administrative contact information change for arpa, 20 April 2006",https://www.iab.org/documents/correspondence-reports-documents/docs2006/2006-04-20-update-to-administrative-contact-information-for-arpa-iana/,
2006-04-20,"IAB to ITU TSB FYI re contact info changes for e164.arpa, 20 April 2006",https://www.iab.org/documents/correspondence-reports-documents/docs2006/2006-04-20-update-to-contact-information-for-e164-arpa-hill/,
2006-04-20,"IAB to IANA Contact information changes for e164.arpa, 20 April 2006",https://www.iab.org/documents/correspondence-reports-documents/docs2006/2006-04-20-update-to-contact-information-for-e164-arpa-iana/,
2006-05-15,"IAB to IANA Request to IANA for status update on deployment of DNSSEC on IANA managed zones, 15 May 2006",https://www.iab.org/documents/correspondence-reports-documents/docs2006/2006-05-15-iab-request-to-iana-to-sign-dnssec-zones/,
2006-06-07,"The IAB announces the mailing list for the discussion of the independent submissions process, 7 June 2006",https://www.iab.org/documents/correspondence-reports-documents/docs2006/2006-06-07-independent-submissions/,
2006-06-19,"Procedural issues with liaison on nextsteps, 19 June 2006",https://www.iab.org/documents/correspondence-reports-documents/docs2006/2006-06-16-response-to-idn-liaison-issues/,
2006-10-12,"The IAB sends a note to the Registry Services Technical Evaluation Panel on the use of wildcards in the .travel TLD, 12 October 2006",https://www.iab.org/documents/correspondence-reports-documents/docs2006/2006-10-12-rstep-note/,
2006-10-19,"The IAB sends a note to the OIF Technical Committee Chair on IETF Protocol Extensions, 19 October 2006",https://www.iab.org/documents/correspondence-reports-documents/docs2006/2006-10-19-oifnote/,
2007-05-21,"The IAB responds to ITU Consultation on Resolution 102, 21 May 2007",https://www.iab.org/documents/correspondence-reports-documents/docs2007/2007-05-21-itu-resolution-102/,
2007-07-05,"Correspondence from the RIPE NCC regarding deployment of DNSSEC in the E164.ARPA zone, 5 July 2007",https://www.iab.org/documents/correspondence-reports-documents/docs2007/2007-07-05-ripe-ncc-dnssec-e164/,
2007-07-24,"Correspondence from the IAB to the ITU-TSB Director regarding deployment of DNSSEC in the E164.ARPA zone, 24 July 2007",https://www.iab.org/documents/correspondence-reports-documents/docs2007/2007-07-24-iab-itu-dnssec-e164/,
2007-10-10,"Follow-up work on NAT-PT, 10 October 2007",https://www.iab.org/documents/correspondence-reports-documents/docs2007/follow-up-work-on-nat-pt/,
2008-02-15,"Correspondence from the IAB to the National Telecommunications and Information Administration, US Department of Commerce regarding the ICANN/DoC Joint Project Agreement, 15 February 2008",https://www.iab.org/documents/correspondence-reports-documents/docs2008/2008-02-15-midterm-view-icann-doc-jpa/,
2008-03-07,"The IABs response to ICANNs solicitation on DNS stability, 7 March 2008",https://www.iab.org/documents/correspondence-reports-documents/docs2008/2008-03-07-icann-new-gtlds/,
2008-06-04,Proposed RFC Editor Structure,https://www.iab.org/documents/correspondence-reports-documents/docs2008/2008-06-04-rfc-editor-model/,
2008-08-16,"The IABs response to Geoff Hustons request concerning 32-bit AS numbers, 16 August 2008",https://www.iab.org/documents/correspondence-reports-documents/docs2008/2008-08-16-32bit-as-huston/,
2008-09-05,Proposed RFC Editor Structure,https://www.iab.org/documents/correspondence-reports-documents/docs2008/2008-09-05-rfc-editor-model/,
2008-11-18,"The IABs correspondence with NTIA on DNSSEC deployment at the root, 18 November 2008",https://www.iab.org/documents/correspondence-reports-documents/docs2008/2008-11-18-dnssec-deployment-at-the-root/,
2008-12-04,"IAB correspondence with Geoff Huston on TAs, IANA, RIRs et al.., 4 December 2008",https://www.iab.org/documents/correspondence-reports-documents/docs2008/2008-12-04-huston-tas-iana-rirs/,
2009-06-02,"IAB correspondence with IANA on the Signing of .ARPA, 2 June 2009",https://www.iab.org/documents/correspondence-reports-documents/docs2009/2009-06-02-roseman-signing-by-iana-of-arpa/,
2009-10-14,"IAB correspondence with ICANN on their “Scaling the Root” study., 14 October 2009",https://www.iab.org/documents/correspondence-reports-documents/docs2009/2009-10-14-icann-scaling-the-root/,
2010-01-27,IAB statement on the RPKI,https://www.iab.org/documents/correspondence-reports-documents/docs2010/iab-statement-on-the-rpki/,
2010-07-30,Transition of IN-ADDR.ARPA generation,https://www.iab.org/documents/correspondence-reports-documents/docs2010/transition-of-in-addr-arpa-generation/,
2011-06-22,Response to ARIN's request for guidance regarding Draft Policy ARIN-2011-5,https://www.iab.org/documents/correspondence-reports-documents/2011-2/response-to-arins-request-for-guidance-regarding-draft-policy-arin-2011-5/,
2011-07-25,"IAB Response to ""Some IESG Thoughts on Liaisons""",https://www.iab.org/documents/correspondence-reports-documents/2011-2/iab-response-to-some-iesg-thoughts-on-liaisons/,
2011-09-16,Letter to the European Commission on Global Interoperability in Emergency Services,https://www.iab.org/documents/correspondence-reports-documents/2011-2/letter-to-the-european-commission-on-global-interoperability-in-emergency-services/,
2012-02-08,"IAB Statement: ""The interpretation of rules in the ICANN gTLD Applicant Guidebook""",https://www.iab.org/documents/correspondence-reports-documents/2012-2/iab-statement-the-interpretation-of-rules-in-the-icann-gtld-applicant-guidebook/,
2012-03-26,"Response to ICANN questions concerning ""The interpretation of rules in the ICANN gTLD Applicant Guidebook""",https://www.iab.org/documents/correspondence-reports-documents/2012-2/response-to-icann-questions-concerning-the-interpretation-of-rules-in-the-icann-gtld-applicant-guidebook/,
2012-03-30,IAB Member Roles in Evaluating New Work Proposals,https://www.iab.org/documents/correspondence-reports-documents/2012-2/iab-member-roles-in-evaluating-new-work-proposals/,
2012-08-29,Leading Global Standards Organizations Endorse OpenStand Principles that Drive Innovation and Borderless Commerce,https://www.iab.org/documents/correspondence-reports-documents/2012-2/leading-global-standards-organizations-endorse-%e2%80%98openstand/,
2013-03-28,IAB Response to RSSAC restructure document (28 March 2013),https://www.iab.org/documents/correspondence-reports-documents/2013-2/iab-response-to-rssac-restructure-document-28-march-2013/,
2013-05-28,Consultation on Root Zone KSK Rollover from the IAB,https://www.iab.org/documents/correspondence-reports-documents/2013-2/consultation-on-root-zone-ksk-rollover-from-the-iab/,
2013-07-10,IAB Statement: Dotless Domains Considered Harmful,https://www.iab.org/documents/correspondence-reports-documents/2013-2/iab-statement-dotless-domains-considered-harmful/,
2013-07-16,IAB Response to ICANN Consultation on the Source of Policies & User Instructions for Internet Number Resource Requests,https://www.iab.org/documents/correspondence-reports-documents/2013-2/iab-response-to-iana-policies-user-instructions-25jun13/,
2013-10-03,Statement from the IAB on the Strengths of the OpenStand Principles,https://www.iab.org/documents/correspondence-reports-documents/2013-2/statement-from-openstand-on-the-strengths-of-the-openstand-principles/,
2013-10-07,Montevideo Statement on the Future of Internet Cooperation,https://www.iab.org/documents/correspondence-reports-documents/2013-2/montevideo-statement-on-the-future-of-internet-cooperation/,
2013-11-27,IAB Statement on draft-farrell-perpass-attack-00,https://www.iab.org/documents/correspondence-reports-documents/2013-2/iab-statement-on-draft-farrell-perpass-attack-00/,
2014-01-23,IAB Comments Regarding the IRTF CFRG chair,https://www.iab.org/documents/correspondence-reports-documents/2014-2/0123-iab-comments-regarding-the-irtf-cfrg-chair/,
2014-02-14,"Statement from the I* Leaders Coordination Meeting, Santa Monica, 14 February 2014",https://www.iab.org/documents/correspondence-reports-documents/2014-2/statement-from-the-i-leaders-coordination-meeting-santa-monica-14-february-2014/,
2014-03-11,Re: Guiding the Evolution of the IANA Protocol Parameter Registries,https://www.iab.org/documents/correspondence-reports-documents/2014-2/re-guiding-the-evolution-of-the-iana-protocol-parameter-registries/,
2014-03-14,Internet Technical Leaders Welcome IANA Globalization Progress,https://www.iab.org/documents/correspondence-reports-documents/2014-2/internet-technical-leaders-welcome-iana-globalization-progress/,
2014-05-13,I* Post-NETmundial Meeting Statement,https://www.iab.org/documents/correspondence-reports-documents/2014-2/i-post-netmundial-meeting-statement/,
2014-06-05,Comments on ICANN Board Member Compensation from the IAB,https://www.iab.org/documents/correspondence-reports-documents/2014-2/comments-on-icann-board-member-compensation/,
2014-11-13,IAB Statement on Internet Confidentiality,https://www.iab.org/documents/correspondence-reports-documents/2014-2/iab-statement-on-internet-confidentiality/,
2014-12-04,IAB statement on the NETmundial Initiative,https://www.iab.org/documents/correspondence-reports-documents/2014-2/iab-statement-on-the-netmundial-initiative/,
2014-12-17,IAB Comments on CSTD Report Mapping International Internet Public Policy Issues,https://www.iab.org/documents/correspondence-reports-documents/2014-2/iab-comments-on-cstd-report-mapping-international-public-policy-issues/,
2015-02-11,IAB liaison to ICANN Root Server System Advisory Committee (RSSAC),https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-liaison-to-icann-root-server-system-advisory-council-rssac/,
2015-02-11,IAB Statement on Identifiers and Unicode 7.0.0,https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-statement-on-identifiers-and-unicode-7-0-0/,
2015-03-02,IAB Statement on Liaison Compensation,https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-statement-on-liaison-compensation/,
2015-04-09,IAB Comments on The HTTPS-Only Standard,https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-comments-on-the-https-only-standard/,
2015-06-03,IAB comments on CCWG-Accountability Draft Report,https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-comments-on-ccwg-accountability-draft-report/,
2015-06-12,IAB Statement on the Trade in Security Technologies,https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-statement-on-the-trade-in-security-technologies/,
2015-06-24,"IAB Correspondence to U.S. Bureau of Industry and Security, re RIN 0694-AG49",https://www.iab.org/documents/correspondence-reports-documents/2015-2/rin-0694-ag49/,
2015-09-07,Internet Architecture Board comments on the ICG Proposal,https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-comments-on-icg-proposal/,
2015-09-09,IAB comments on the CCWG accountability 2d draft report,https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-comments-on-ccwg-accountability/,
2015-10-07,IAB Comments to FCC on Rules regarding Authorization of Radiofrequency Equipment,https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-comments-on-fcc-15-92/,
2015-12-16,IAB comments on the CCWG accountability 3d draft report,https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-comments-on-the-ccwg-accountability-3d-draft-report/,
2016-01-13,"Comments from the Internet Architecture Board (IAB) on ""Registration Data Access Protocol (RDAP) Operational Profile for gTLD Registries and Registrars""",https://www.iab.org/documents/correspondence-reports-documents/2016-2/comments-from-the-internet-architecture-board-iab-on-registration-data-access-protocol-rdap-operational-profile-for-gtld-registries-and-registrars/,
2016-05-04,IAB comments on Draft New ICANN Bylaws,https://www.iab.org/documents/correspondence-reports-documents/2016-2/iab-comments-on-draft-new-icann-bylaws/,
2016-05-11,IAB Comments on Proposed Changes to Internet Society Bylaws,https://www.iab.org/documents/correspondence-reports-documents/2016-2/iab-comments-on-proposed-changes-to-internet-society-bylaws/,
2016-07-17,Comments from the IAB on LGRs for second level,https://www.iab.org/documents/correspondence-reports-documents/2016-2/comments-from-the-iab-on-lgrs-for-second-level/,
2016-09-01,IAB statement on IANA Intellectual Property Rights,https://www.iab.org/documents/correspondence-reports-documents/2016-2/iab-statement-on-iana-intellectual-property-rights/,
2016-09-14,IAB Statement on the IANA Stewardship Transition,https://www.iab.org/documents/correspondence-reports-documents/2016-2/iab-statement-on-the-iana-stewardship-transition/,
2016-11-07,IAB Statement on IPv6,https://www.iab.org/documents/correspondence-reports-documents/2016-2/iab-statement-on-ipv6/,
2016-12-07,"IAB comment on ""Revised Proposed Implementation of GNSO Thick Whois Consensus Policy Requiring Consistent Labeling and Display of RDDS (Whois) Output for All gTLDs""",https://www.iab.org/documents/correspondence-reports-documents/2016-2/iab-comment-on-revised-proposed-implementation-of-gnso-thick-whois-consensus-policy-requiring-consistent-labeling-and-display-of-rdds-whois-output-for-all-gtlds/,
2017-01-04,IAB comments on Identifier Technology Health Indicators: Definition,https://www.iab.org/documents/correspondence-reports-documents/2017-2/iab-comments-on-identifier-technology-health-indicators-definition/,
2017-02-01,IAB Statement on OCSP Stapling,https://www.iab.org/documents/correspondence-reports-documents/2017-2/iab-statement-on-ocsp-stapling/,
2017-02-16,Follow up on barriers to entry blog post,https://www.iab.org/documents/correspondence-reports-documents/2017-2/follow-up-on-barriers-to-entry-blog-post/,
2017-03-02,IAB Comments to United States NTIA on the Green Paper: Fostering the Advancement of the Internet of Things,https://www.iab.org/documents/correspondence-reports-documents/2017-2/iab-comments-to-ntia-on-fostering-the-advancement-of-iot/,
2017-03-30,Internet Architecture Board statement on the registration of special use names in the ARPA domain,https://www.iab.org/documents/correspondence-reports-documents/2017-2/iab-statement-on-the-registration-of-special-use-names-in-the-arpa-domain/,
2017-05-01,Comments from the IAB on IDN Implementation Guidelines,https://www.iab.org/documents/correspondence-reports-documents/2017-2/comments-from-the-iab-on-idn-implementation-guidelines/,
2017-07-31,IAB Response to FCC-17-89,https://www.iab.org/documents/correspondence-reports-documents/2017-2/iab-response-to-fcc-17-89/,
2018-03-15,IAB Statement on Identifiers and Unicode,https://www.iab.org/documents/correspondence-reports-documents/2018-2/iab-statement-on-identifiers-and-unicode/,
2018-04-03,IAB Statement on the RPKI,https://www.iab.org/documents/correspondence-reports-documents/2018-2/iab-statement-on-the-rpki/,
2019-05-02,Revised Operating Instructions for e164.arpa (ENUM),https://www.iab.org/documents/correspondence-reports-documents/2019-2/revised-operating-instructions-for-e164-arpa-enum/,
2019-06-26,Comments on Evolving the Governance of the Root Server System,https://www.iab.org/documents/correspondence-reports-documents/2019-2/comments-on-evolving-the-governance-of-the-root-server-system/,
2019-09-04,Avoiding Unintended Harm to Internet Infrastructure,https://www.iab.org/documents/correspondence-reports-documents/2019-2/avoiding-unintended-harm-to-internet-infrastructure/,
2020-07-01,"IAB correspondence with the National Telecommunications and Information Administration (NTIA) on DNSSEC deployment for the Root Zone [Docket No. 100603240-0240-01], 1 July 2010",https://www.iab.org/documents/correspondence-reports-documents/docs2010/2010-07-01-alexander-dnssec-deployment-for-the-root-zone/,
2020-09-29,IAB Comments on the Draft Final Report on the new gTLD Subsequent Procedures Policy Development Process,https://www.iab.org/documents/correspondence-reports-documents/2020-2/iab-comments-on-new-gtld-subsequent-procedures/,
2021-07-14,IAB Statement on Inclusive Language in IAB Stream Documents,https://www.iab.org/documents/correspondence-reports-documents/2021-2/iab-statement-on-inclusive-language-in-iab-stream-documents/,
2022-04-08,IAB comment on Mandated Browser Root Certificates in the European Unions eIDAS Regulation on the Internet,https://www.iab.org/documents/correspondence-reports-documents/2022-2/iab-comment-on-mandated-browser-root-certificates-in-the-european-unions-eidas-regulation-on-the-internet/,
2022-04-08,"IAB Comments on A Notice by the Federal Communications Commission on Secure Internet Routing, issued 03/11/2022",https://www.iab.org/documents/correspondence-reports-documents/2022-2/iab-comments-on-a-notice-by-the-federal-communications-commission-on-secure-internet-routing-issued-03-11-2022/,
2022-07-08,IAB Statement to OSTP on Privacy-Enhancing Technologies,https://www.iab.org/documents/correspondence-reports-documents/2022-2/iab-statement-to-ostp-on-privacy-enhancing-technologies/,
2022-11-21,IAB Comments on a notice by the Federal Trade Commission on Trade Regulation Rule on Commercial Surveillance and Data Security (16 CFR Part 464),https://www.iab.org/documents/correspondence-reports-documents/2022-2/iab-comments-on-a-notice-by-the-federal-trade-commission-on-trade-regulation-rule-on-commercial-surveillance-and-data-security-16-cfr-part-464/,
'''
rows = []
date_count = defaultdict(lambda: 0)
with io.StringIO(csv_dump) as csv_file:
reader = csv.reader(csv_file)
for row in reader:
date = row[0]
if date_count[date] == 0:
row.insert(0, "")
else:
row.insert(0, date_count[date])
date_count[date] += 1
rows.append(row)
return rows

View file

@ -25,6 +25,7 @@ class GroupFactory(factory.django.DjangoModelFactory):
class Meta:
model = Group
django_get_or_create = ('acronym',)
skip_postgeneration_save = True
name = factory.Faker('sentence',nb_words=6)
acronym = factory.Sequence(lambda n: 'acronym%d' %n)
@ -87,6 +88,7 @@ class DatelessGroupMilestoneFactory(BaseGroupMilestoneFactory):
class GroupHistoryFactory(factory.django.DjangoModelFactory):
class Meta:
model=GroupHistory
skip_postgeneration_save = True
time = lambda: timezone.now()
group = factory.SubFactory(GroupFactory, state_id='active')
@ -138,6 +140,7 @@ class AppealFactory(factory.django.DjangoModelFactory):
class AppealArtifactFactory(factory.django.DjangoModelFactory):
class Meta:
model=AppealArtifact
skip_postgeneration_save = True
appeal = factory.SubFactory(AppealFactory)
artifact_type = factory.SubFactory("ietf.name.factories.AppealArtifactTypeNameFactory", slug="appeal")
@ -158,4 +161,5 @@ class AppealArtifactFactory(factory.django.DjangoModelFactory):
if isinstance(using, str):
using = using.encode("utf-8")
obj.bits = memoryview(using)
obj.save()

View file

@ -1,2 +0,0 @@
/*.pyc
/settings_local.py

View file

@ -1,2 +0,0 @@
/*.pyc
/settings_local.py

View file

@ -1,2 +0,0 @@
/*.swp
/*.pyc

View file

@ -14,6 +14,7 @@ from ietf.person.factories import UserFactory, PersonFactory
class OidClientRecordFactory(factory.django.DjangoModelFactory):
class Meta:
model = OidClientRecord
skip_postgeneration_save = True
name = factory.Faker('company')
owner = factory.SubFactory(UserFactory)

2
ietf/ipr/.gitignore vendored
View file

@ -1,2 +0,0 @@
/*.pyc
/settings_local.py

View file

@ -26,6 +26,7 @@ def _fake_patent_info():
class IprDisclosureBaseFactory(factory.django.DjangoModelFactory):
class Meta:
model = IprDisclosureBase
skip_postgeneration_save = True
by = factory.SubFactory('ietf.person.factories.PersonFactory')
compliant = True

View file

@ -1,2 +0,0 @@
/*.pyc
/settings_local.py

View file

@ -6,6 +6,7 @@ from ietf.liaisons.models import LiaisonStatement, LiaisonStatementEvent, Liaiso
class LiaisonStatementFactory(factory.django.DjangoModelFactory):
class Meta:
model = LiaisonStatement
skip_postgeneration_save = True
title = factory.Faker('sentence')
from_contact = factory.SubFactory('ietf.person.factories.EmailFactory')

View file

@ -1 +0,0 @@
/*.pyc

View file

@ -1,2 +0,0 @@
/*.pyc
/settings_local.py

View file

@ -1,2 +0,0 @@
/*.pyc
/*.swp

View file

@ -23,6 +23,7 @@ from ietf.utils.text import xslugify
class MeetingFactory(factory.django.DjangoModelFactory):
class Meta:
model = Meeting
skip_postgeneration_save = True
type_id = factory.Iterator(['ietf','interim'])
@ -103,6 +104,7 @@ class MeetingFactory(factory.django.DjangoModelFactory):
class SessionFactory(factory.django.DjangoModelFactory):
class Meta:
model = Session
skip_postgeneration_save = True
meeting = factory.SubFactory(MeetingFactory)
purpose_id = 'regular'
@ -156,6 +158,7 @@ class ScheduleFactory(factory.django.DjangoModelFactory):
class RoomFactory(factory.django.DjangoModelFactory):
class Meta:
model = Room
skip_postgeneration_save = True
meeting = factory.SubFactory(MeetingFactory)
name = factory.Faker('name')
@ -172,6 +175,7 @@ class RoomFactory(factory.django.DjangoModelFactory):
class TimeSlotFactory(factory.django.DjangoModelFactory):
class Meta:
model = TimeSlot
skip_postgeneration_save = True
meeting = factory.SubFactory(MeetingFactory)
type_id = 'regular'
@ -225,6 +229,7 @@ class FloorPlanFactory(factory.django.DjangoModelFactory):
class SlideSubmissionFactory(factory.django.DjangoModelFactory):
class Meta:
model = SlideSubmission
skip_postgeneration_save = True
session = factory.SubFactory(SessionFactory)
title = factory.Faker('sentence')
@ -238,6 +243,7 @@ class SlideSubmissionFactory(factory.django.DjangoModelFactory):
class ConstraintFactory(factory.django.DjangoModelFactory):
class Meta:
model = Constraint
skip_postgeneration_save = True
meeting = factory.SubFactory(MeetingFactory)
source = factory.SubFactory(GroupFactory)

View file

@ -16584,7 +16584,7 @@
"fields": {
"command": "xym",
"switch": "--version",
"time": "2023-08-30T07:09:44.025Z",
"time": "2023-08-22T07:09:39.542Z",
"used": true,
"version": "xym 0.7.0"
},
@ -16595,7 +16595,7 @@
"fields": {
"command": "pyang",
"switch": "--version",
"time": "2023-08-30T07:09:44.374Z",
"time": "2023-08-22T07:09:39.881Z",
"used": true,
"version": "pyang 2.5.3"
},
@ -16606,7 +16606,7 @@
"fields": {
"command": "yanglint",
"switch": "--version",
"time": "2023-08-30T07:09:44.394Z",
"time": "2023-08-22T07:09:39.899Z",
"used": true,
"version": "yanglint SO 1.9.2"
},
@ -16617,7 +16617,7 @@
"fields": {
"command": "xml2rfc",
"switch": "--version",
"time": "2023-08-30T07:09:45.312Z",
"time": "2023-08-22T07:09:40.791Z",
"used": true,
"version": "xml2rfc 3.18.0"
},

View file

@ -84,6 +84,7 @@ def nomcom_kwargs_for_year(year=None, *args, **kwargs):
class NomComFactory(factory.django.DjangoModelFactory):
class Meta:
model = NomCom
skip_postgeneration_save = True
group = factory.SubFactory(GroupFactory,type_id='nomcom')
@ -167,6 +168,7 @@ class NomineePositionFactory(factory.django.DjangoModelFactory):
class FeedbackFactory(factory.django.DjangoModelFactory):
class Meta:
model = Feedback
skip_postgeneration_save = True
nomcom = factory.SubFactory(NomComFactory)
subject = factory.Faker('sentence')
@ -176,6 +178,7 @@ class FeedbackFactory(factory.django.DjangoModelFactory):
def comments(obj, create, extracted, **kwargs):
comment_text = Faker().paragraph()
obj.comments = obj.nomcom.encrypt(comment_text)
obj.save()
class TopicFactory(factory.django.DjangoModelFactory):
class Meta:

View file

@ -46,6 +46,7 @@ class UserFactory(factory.django.DjangoModelFactory):
model = User
django_get_or_create = ('username',)
exclude = ['faker', ]
skip_postgeneration_save = True
faker = factory.LazyFunction(random_faker)
# normalize these i18n Unicode strings in the same way the database does
@ -55,13 +56,16 @@ class UserFactory(factory.django.DjangoModelFactory):
slugify(unidecode(u.last_name)), n, fake.domain_name())) # type: ignore
username = factory.LazyAttribute(lambda u: u.email)
# Consider using PostGenerationMethodCall instead
@factory.post_generation
def set_password(obj, create, extracted, **kwargs): # pylint: disable=no-self-argument
obj.set_password( '%s+password' % obj.username ) # pylint: disable=no-value-for-parameter
obj.save()
class PersonFactory(factory.django.DjangoModelFactory):
class Meta:
model = Person
skip_postgeneration_save = True
user = factory.SubFactory(UserFactory)
name = factory.LazyAttribute(lambda p: normalize_name('%s %s'%(p.user.first_name, p.user.last_name)))
@ -106,6 +110,7 @@ class PersonFactory(factory.django.DjangoModelFactory):
def delete_file(file):
os.unlink(file)
atexit.register(delete_file, photodst)
obj.save()
class AliasFactory(factory.django.DjangoModelFactory):
class Meta:

View file

@ -1,2 +0,0 @@
/*.pyc
/settings_local.py

View file

@ -1,2 +0,0 @@
/*.pyc
/settings_local.py

View file

@ -11,6 +11,7 @@ from ietf.name.models import ReviewTypeName, ReviewResultName
class ReviewTeamSettingsFactory(factory.django.DjangoModelFactory):
class Meta:
model = ReviewTeamSettings
skip_postgeneration_save = True
group = factory.SubFactory('ietf.group.factories.GroupFactory',type_id='review')
reviewer_queue_policy_id = 'RotateAlphabetically'

View file

@ -1 +0,0 @@
/*.pyc

View file

@ -1 +0,0 @@
/*.pyc

View file

@ -1 +0,0 @@
/*.pyc

View file

@ -1 +0,0 @@
/*.pyc

View file

@ -1 +0,0 @@
/*.pyc

View file

@ -1 +0,0 @@
/*.pyc

View file

@ -1 +0,0 @@
/*.pyc

View file

@ -1 +0,0 @@
/*.pyc

View file

@ -1 +0,0 @@
/*.pyc

View file

@ -1 +0,0 @@
/*.pyc

View file

@ -1 +0,0 @@
/*.pyc

View file

@ -1,2 +0,0 @@
/*.pyc
/*.swp

View file

@ -1,18 +0,0 @@
# List of starting points for the test crawler (see
# bin/run-real-data-tests). Add URLs that have no link from inside the
# project.
/
/doc/all/
/doc/iesg/last-call/
/doc/in-last-call/
/iesg/decisions/
/iesg/agenda/documents.txt
/iesg/agenda/agenda.json
/wg/1wg-summary.txt
/wg/1wg-summary-by-acronym.txt
/wg/1wg-charters.txt
/wg/1wg-charters-by-acronym.txt
/sitemap.xml
/sitemap-ipr.xml
/sitemap-liaison.xml

View file

@ -30,7 +30,7 @@ django-widget-tweaks>=1.4.12
djlint>=1.0.0 # To auto-indent templates via "djlint --profile django --reformat"
docutils>=0.18.1 # Used only by dbtemplates for RestructuredText
types-docutils>=0.18.1
factory-boy>=3.2.1,<3.3
factory-boy>=3.3
github3.py>=3.2.0
gunicorn>=20.1.0
hashids>=1.3.1