Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a1a88c5
docs: update VS Code extensions names (#5997)
maybe-hello-world Jul 20, 2023
8e439df
fix: HTML-escape person name in tests (#5986)
larseggert Jul 21, 2023
a38b6c1
docs: update docker/README.md
NGPixel Jul 21, 2023
98634ea
chore(dev): fails to build a container in a GitHub Codespace (#6006)
darrelmiller Jul 22, 2023
5f8fca6
chore: Remove unused "rendertest" stuff (#6015)
larseggert Jul 22, 2023
f82988d
fix: restore ability to create status change documents (#5963)
rjsparks Jul 22, 2023
91297f1
fix: Provide human-friendly status in submission status API response …
nectostr Jul 22, 2023
9aea2a2
fix: Make name/email lookups case-insensitive (#5972) (#6007)
richsalz Jul 22, 2023
8a88210
fix: Clarify no-action-needed (#5918) (#6020)
richsalz Jul 22, 2023
c717673
fix: Fix menu hover issue (#6019)
larseggert Jul 22, 2023
3a499cd
fix: Server error from api_get_session_materials() (#6025)
nectostr Jul 22, 2023
ebad948
fix: Clarify Questionnaire label (#4688) (#6017)
richsalz Jul 22, 2023
36a7c5c
chore: Merge from @martinthomson's rfc-txt-html (#6023)
larseggert Jul 22, 2023
00c0389
fix:no history entry when changing RFC Editor note for doc (#6021)
PriyankaGitCom Jul 23, 2023
e61f779
fix: avoid deprecation warning on view_list() for objs without Commun…
alireza83 Jul 23, 2023
4d61170
fix: return 404 for non-existing revisions (#6014)
maybe-hello-world Jul 23, 2023
001719b
fix: provide date for revisions in bibtex output (#6029)
maybe-hello-world Jul 23, 2023
14b4f82
fix: review refactoring issue
kivinen Jul 23, 2023
5a0ea56
fix: Remove automatically suggested document for document that is al…
kivinen Jul 23, 2023
dbe1749
feat: IAB statements (#5940)
rjsparks Jul 23, 2023
ab0b8e1
feat: include submitter in email about submitted slides (#6033)
rjsparks Jul 23, 2023
f124af8
chore(dev): update .vscode/settings.json with new taskExplorer settings
NGPixel Jul 23, 2023
101963d
fix: Add editorial stream to proceedings (#6027)
kesara Jul 24, 2023
e1e15da
fix: Add editorial stream to meeting materials (#6047)
kesara Jul 25, 2023
b24dd44
fix: Shows requested reviews for doc fixes (#6022)
kivinen Jul 25, 2023
593bdb4
feat: allow openId to choose an unactive email if there are none acti…
rjsparks Jul 25, 2023
04df797
fix: Make review table more responsive (#6053)
larseggert Jul 27, 2023
416ffb0
ci: add --validate-html-harder to tests
NGPixel Jul 27, 2023
ff07286
ci: add --validate-html-harder to build.yml workflow
NGPixel Jul 28, 2023
22624a3
fix: Set colspan to actual number of columns (#6069)
jennifer-richards Aug 1, 2023
4e46032
fix: Clean up view_feedback_pending (#6070)
pselkirk Aug 1, 2023
59c1db1
docs: Update LICENSE year
NGPixel Aug 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ jobs:
echo "Running tests..."
if [[ "x${{ github.event.inputs.ignoreLowerCoverage }}" == "xtrue" ]]; then
echo "Lower coverage failures will be ignored."
./ietf/manage.py test --settings=settings_postgrestest --ignore-lower-coverage
./ietf/manage.py test --validate-html-harder --settings=settings_postgrestest --ignore-lower-coverage
else
./ietf/manage.py test --settings=settings_postgrestest
./ietf/manage.py test --validate-html-harder --settings=settings_postgrestest
fi
coverage xml

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
exit 1
fi
echo "Running tests..."
./ietf/manage.py test --settings=settings_postgrestest
./ietf/manage.py test --validate-html-harder --settings=settings_postgrestest
coverage xml

- name: Upload Coverage Results to Codecov
Expand Down
115 changes: 58 additions & 57 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,60 @@
{
"taskExplorer.exclude": [
"**/.vscode-test/**",
"**/bin/**",
"**/build/**",
"**/CompiledOutput/**",
"**/dist/**",
"**/doc/**",
"**/ext/**",
"**/out/**",
"**/output/**",
"**/packages/**",
"**/release/**",
"**/releases/**",
"**/samples/**",
"**/sdks/**",
"**/static/**",
"**/target/**",
"**/test/**",
"**/third_party/**",
"**/vendor/**",
"**/work/**",
"/workspace/bootstrap/nuget/MyGet.ps1"
],
"taskExplorer.enableAnt": false,
"taskExplorer.enableAppPublisher": false,
"taskExplorer.enablePipenv": false,
"taskExplorer.enableBash": false,
"taskExplorer.enableBatch": false,
"taskExplorer.enableGradle": false,
"taskExplorer.enableGrunt": false,
"taskExplorer.enableGulp": false,
"taskExplorer.enablePerl": false,
"taskExplorer.enableMake": false,
"taskExplorer.enableMaven": false,
"taskExplorer.enableNsis": false,
"taskExplorer.enableNpm": false,
"taskExplorer.enablePowershell": false,
"taskExplorer.enablePython": false,
"taskExplorer.enableRuby": false,
"taskExplorer.enableTsc": false,
"taskExplorer.enableWorkspace": true,
"taskExplorer.enableExplorerView": false,
"taskExplorer.enableSideBar": true,
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"eslint.nodePath": ".yarn/sdks",
"eslint.validate": [
"javascript",
"javascriptreact",
"vue"
],
"python.linting.pylintArgs": ["--load-plugins", "pylint_django"],
"python.testing.pytestEnabled": false,
"python.testing.unittestEnabled": false,
"python.linting.enabled": true
"taskExplorer.exclude": [
"**/.vscode-test/**",
"**/bin/**",
"**/build/**",
"**/CompiledOutput/**",
"**/dist/**",
"**/doc/**",
"**/ext/**",
"**/out/**",
"**/output/**",
"**/packages/**",
"**/release/**",
"**/releases/**",
"**/samples/**",
"**/sdks/**",
"**/static/**",
"**/target/**",
"**/test/**",
"**/third_party/**",
"**/vendor/**",
"**/work/**",
"/workspace/bootstrap/nuget/MyGet.ps1"
],
"taskExplorer.enabledTasks": {
"ant": false,
"bash": false,
"batch": false,
"composer": false,
"gradle": false,
"grunt": false,
"gulp": false,
"make": false,
"maven": false,
"npm": false,
"perl": false,
"pipenv": false,
"powershell": false,
"python": false,
"ruby": false,
"tsc": false
},
"taskExplorer.enableExplorerView": false,
"taskExplorer.enableSideBar": true,
"taskExplorer.showLastTasks": false,
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"eslint.nodePath": ".yarn/sdks",
"eslint.validate": [
"javascript",
"javascriptreact",
"vue"
],
"python.linting.pylintArgs": ["--load-plugins", "pylint_django"],
"python.testing.pytestEnabled": false,
"python.testing.unittestEnabled": false,
"python.linting.enabled": true
}
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2008-2022, The IETF Trust
Copyright (c) 2008-2023, The IETF Trust
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -26,4 +26,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ services:
CELERY_APP: ietf
CELERY_ROLE: worker
UPDATE_REQUIREMENTS_FROM: requirements.txt
DEV_MODE: yes
DEV_MODE: "yes"
command:
- '--loglevel=INFO'
depends_on:
Expand Down
20 changes: 8 additions & 12 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ This project includes a devcontainer configuration which automates the setup of
### Initial Setup

1. Launch [VS Code](https://code.visualstudio.com/)
2. Under the **Extensions** tab, ensure you have the **Remote - Containers** ([ms-vscode-remote.remote-containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)) extension installed.
2. Under the **Extensions** tab, ensure you have the **Dev Containers** ([ms-vscode-remote.remote-containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)) extension installed.
* On Linux, note that the Snap installation of VS Code is [incompatible with this plugin](https://code.visualstudio.com/docs/devcontainers/containers#_system-requirements:~:text=snap%20package%20is%20not%20supported).
* On Windows, you also need the **Remote - WSL** ([ms-vscode-remote.remote-wsl](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)) extension to take advantage of the WSL 2 *(Windows Subsystem for Linux)* native integration.
* On Windows, you also need the **WSL** ([ms-vscode-remote.remote-wsl](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)) extension to take advantage of the WSL 2 *(Windows Subsystem for Linux)* native integration.
2. Open the top-level directory of the datatracker code you fetched above.
3. A prompt inviting you to reopen the project in containers will appear in the bottom-right corner. Click the **Reopen in Container** button. If you missed the prompt, you can press `F1`, start typing `reopen in container` task and launch it.
4. VS Code will relaunch in the dev environment and create the containers automatically.
Expand All @@ -45,7 +45,7 @@ You can also open the datatracker project folder and click the **Reopen in conta

### Usage

- Under the **Run and Debug** tab, you can run the server with the debugger attached using **Run Server** (F5). Once the server is ready to accept connections, you'll be prompted to open in a browser. You can also open [http://localhost:8000](http://localhost:8000) in a browser.
- Under the **Run and Debug** tab, you can run the server with the debugger attached using **Run Server** (F5). Once the server is ready to accept connections, you'll be prompted to open in a browser. Navigate to [http://localhost:8000](http://localhost:8000) in your preferred browser.

> An alternate profile **Run Server with Debug Toolbar** is also available from the dropdown menu, which displays various tools
on top of the webpage. However, note that this configuration has a significant performance impact.
Expand All @@ -64,11 +64,7 @@ You can also open the datatracker project folder and click the **Reopen in conta

![](assets/vscode-terminal-new.png)

- Under the **SQL Tools** tab, a connection **Local Dev** is preconfigured to connect to the DB container. Using this tool, you can list tables, view records and execute SQL queries directly from VS Code.

> The port `3306` is also exposed to the host automatically, should you prefer to use your own SQL tool.

![](assets/vscode-sqltools.png)
- The pgAdmin web interface, a PostgreSQL DB browser / management UI, is available at [http://localhost:8000/pgadmin/](http://localhost:8000/pgadmin/).

- Under the **Task Explorer** tab, a list of available preconfigured tasks is displayed. *(You may need to expand the tree to `src > vscode` to see it.)* These are common scritps you can run *(e.g. run tests, fetch assets, etc.)*.

Expand Down Expand Up @@ -103,7 +99,7 @@ You can also open the datatracker project folder and click the **Reopen in conta
2. Wait for the containers to initialize. Upon completion, you will be dropped into a shell from which you can start the datatracker and execute related commands as usual, for example

```
ietf/manage.py runserver 0.0.0.0:8000
ietf/manage.py runserver 0.0.0.0:8001
```

to start the datatracker.
Expand Down Expand Up @@ -161,11 +157,11 @@ docker compose down -v --rmi all
docker image prune
```

### Accessing MariaDB Port
### Accessing PostgreSQL Port

The port is exposed but not mapped to `3306` to avoid potential conflicts with the host. To get the mapped port, run the command *(from the project `/docker` directory)*:
The port is exposed but not automatically mapped to `5432` to avoid potential conflicts with the host. To get the mapped port, run the command *(from the project `/docker` directory)*:
```sh
docker compose port db 3306
docker compose port db 5432
```

## Notes / Troubleshooting
Expand Down
2 changes: 1 addition & 1 deletion docker/configs/settings_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# 'ietf.context_processors.sql_debug',
# ]

DOCUMENT_PATH_PATTERN = '/assets/ietf-ftp/{doc.type_id}/'
DOCUMENT_PATH_PATTERN = '/assets/ietfdata/doc/{doc.type_id}/'
INTERNET_DRAFT_PATH = '/assets/ietf-ftp/internet-drafts/'
RFC_PATH = '/assets/ietf-ftp/rfc/'
CHARTER_PATH = '/assets/ietf-ftp/charter/'
Expand Down
9 changes: 9 additions & 0 deletions ietf/api/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,15 @@ def test_api_appauth(self):
self.assertEqual(r.status_code, 200)
jsondata = r.json()
self.assertEqual(jsondata['success'], True)

def test_api_get_session_matherials_no_agenda_meeting_url(self):
meeting = MeetingFactory(type_id='ietf')
session = SessionFactory(meeting=meeting)
url = urlreverse('ietf.meeting.views.api_get_session_materials', kwargs={'session_id': session.pk})
r = self.client.get(url)
self.assertEqual(r.status_code, 200)



class DirectAuthApiTests(TestCase):

Expand Down
2 changes: 1 addition & 1 deletion ietf/community/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def view_list(request, username=None):
docs = docs_tracked_by_community_list(clist)
docs, meta = prepare_document_table(request, docs, request.GET)

subscribed = request.user.is_authenticated and EmailSubscription.objects.filter(community_list=clist, email__person__user=request.user)
subscribed = request.user.is_authenticated and (EmailSubscription.objects.none() if clist.pk is None else EmailSubscription.objects.filter(community_list=clist, email__person__user=request.user))

return render(request, 'community/view_list.html', {
'clist': clist,
Expand Down
32 changes: 29 additions & 3 deletions ietf/doc/factories.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright The IETF Trust 2016-2020, All Rights Reserved
# Copyright The IETF Trust 2016-2023, All Rights Reserved
# -*- coding: utf-8 -*-


Expand All @@ -23,7 +23,6 @@
from ietf.utils.timezone import date_today



def draft_name_generator(type_id,group,n):
return '%s-%s-%s-%s%d'%(
type_id,
Expand Down Expand Up @@ -577,4 +576,31 @@ def states(obj, create, extracted, **kwargs):
def reset_canonical_name(obj, create, extracted, **kwargs):
if hasattr(obj, '_canonical_name'):
del obj._canonical_name
return None
return None

class StatementFactory(BaseDocumentFactory):
type_id = "statement"
title = factory.Faker("sentence")
group = factory.SubFactory("ietf.group.factories.GroupFactory", acronym="iab")

name = factory.LazyAttribute(
lambda o: "statement-%s-%s" % (xslugify(o.group.acronym), xslugify(o.title))
)
uploaded_filename = factory.LazyAttribute(lambda o: f"{o.name}-{o.rev}.md")

published_statement_event = factory.RelatedFactory(
"ietf.doc.factories.DocEventFactory",
"doc",
type="published_statement",
time=timezone.now() - datetime.timedelta(days=1),
)

@factory.post_generation
def states(obj, create, extracted, **kwargs):
if not create:
return
if extracted:
for state_type_id, state_slug in extracted:
obj.set_state(State.objects.get(type_id=state_type_id, slug=state_slug))
else:
obj.set_state(State.objects.get(type_id="statement", slug="active"))
Loading