* chore: Remove unused "rendertest" stuff (#6015) * fix: restore ability to create status change documents (#5963) * fix: restore ability to create status change documents Fixes #5962 * chore: address review comment * fix: Provide human-friendly status in submission status API response (#6011) Co-authored-by: nectostr <bastinda96@gmail.com> * fix: Make name/email lookups case-insensitive (#5972) (#6007) * fix: Make name/email lookups case-insensitive (#5972) Use icontains so that looking up name or email is case insensitive Added a test Fixes: 5972 * fix: Use __iexact not __icontains * fix: Clarify no-action-needed (#5918) (#6020) When a draft is submitted for manual processing, clarify that no action is needed; the Secretariat has the next steps. Fixes: #5918 * fix: Fix menu hover issue (#6019) * fix: Fix menu hover issue Fixes #5702 * Fix leftmenu hover issue * fix: Server error from api_get_session_materials() (#6025) Fixes #5877 * fix: Clarify Questionnaire label (#4688) (#6017) When filtering nominees, `Questionnaire` implies `Accepted == yes` so fix the dropdown test tosay that. Fixes: #4688 * chore: Merge from @martinthomson's rfc-txt-html (#6023) * fix:no history entry when changing RFC Editor note for doc (#6021) * fix:no history entry when changing RFC Editor note for doc * fix:no history entry when changing RFC Editor note for doc --------- Co-authored-by: Priyanka Narkar <priyankanarkar@dhcp-91f8.meeting.ietf.org> * fix: avoid deprecation warning on view_list() for objs without CommunityList Fixes #5942 * fix: return 404 for non-existing revisions (#6014) * fix: return 404 for non-existing revisions Links to non-existing revisions to docs should return 404 * fix: change rfc/rev and search behaviour * refactor: fix tab level * fix: return 404 for rfc revision for bibtex * fix: provide date for revisions in bibtex output (#6029) * fix: provide date for revisions in bibtex output * refactor: change walrus to if's * fix: specify particular revision for events * fix: review refactoring issue fixes #5447 * fix: Remove automatically suggested document for document that is already has review request (fixes #3211) (#5425) * Added check that if there is already review request for the document in question, ignore the automatic suggestion for that document. Fixes #3211. * fix: dont block on open requests for a previous version. Add tests --------- Co-authored-by: Nicolas Giard <github@ngpixel.com> Co-authored-by: Robert Sparks <rjsparks@nostrum.com> * feat: IAB statements (#5940) * feat: support iab and iesg statements. Import iab statements. (#5895) * feat: infrastructure for statements doctype * chore: basic test framework * feat: basic statement document view * feat: show replaced statements * chore: black * fix: state help for statements * fix: cleanout non-relevant email expansions * feat: import iab statements, provide group statements tab * fix: guard against running import twice * feat: build redirect csv for iab statements * fix: set document state on import * feat: show published date on main doc view * feat: handle pdf statements * feat: create new and update statements * chore: copyright block updates * chore: remove flakes * chore: black * feat: add edit/new buttons for the secretariat * fix: address PR #5895 review comments * fix: pin pydantic until inflect catches up (#5901) (#5902) * chore: re-un-pin pydantic * feat: include submitter in email about submitted slides (#6033) * feat: include submitter in email about submitted slides fixes #6031 * chore: remove unintended whitespace change * chore(dev): update .vscode/settings.json with new taskExplorer settings * fix: Add editorial stream to proceedings (#6027) * fix: Add editorial stream to proceedings Fixes #5717 * fix: Move editorial stream after the irtf in proceedings * fix: Add editorial stream to meeting materials (#6047) Fixes #6042 * fix: Shows requested reviews for doc fixes (#6022) * Fix: Shows requested reviews for doc * Changed template includes to only give required variables to them. * feat: allow openId to choose an unactive email if there are none active (#6041) * feat: allow openId to choose an unactive email if there are no active ones * chore: correct typo * chore: rename unactive to inactive * fix: Make review table more responsive (#6053) * fix: Improve layout of review table * Progress * Progress * Final changes * Fix tests * Remove fluff * Undo commits * ci: add --validate-html-harder to tests * ci: add --validate-html-harder to build.yml workflow * fix: Set colspan to actual number of columns (#6069) * fix: Clean up view_feedback_pending (#6070) - Remove "Unclassified" column header, which caused misalignment in the table body. - Show the message author - previously displayed as `(None)`. * docs: Update LICENSE year * fix: Remove IESG state edit button when state is 'dead' (#6051) (#6065) * fix: Correctly order "last call requested" column in the IESG dashboard (#6079) * ci: update dev sandbox init script to start memcached * feat: Reclassify nomcom feedback (#6002) * fix: Clean up view_feedback_pending - Remove "Unclassified" column header, which caused misalignment in the table body. - Show the message author - previously displayed as `(None)`. * feat: Reclassify nomcom feedback (#4669) - There's a new `Chair/Advisor Tasks` menu item `Reclassify feedback`. - I overloaded `view_feedback*` URLs with a `?reclassify` parameter. - This adds a checkbox to each feedback message, and a `Reclassify` button at the bottom of each feedback page. - "Reclassifying" basically de-classifies the feedback, and punts it back to the "Pending emails" view for reclassification. - If a feedback has been applied to multiple nominees, declassifying it from one nominee removes it from all. * fix: Remove unused local variables * fix: Fix some missing and mis-nested html * test: Add tests for reclassifying feedback * refactor: Substantial redesign of feedback reclassification - Break out reclassify_feedback* as their own URLs and views, and revert changes to view_feedback*.html. - Replace checkboxes with a Reclassify button on each message. * fix: Remember to clear the feedback associations when reclassifying * feat: Add an 'Overcome by events' feedback type * refactor: When invoking reclassification from a view-feedback page, load the corresponding reclassify-feedback page * fix: De-conflict migration with 0004_statements Also change the coding style to match, and add a reverse migration. * fix: Fix a test case to account for new feedback type * fix: 842e730 broke the Back button * refactor: Reclassify feedback directly instead of putting it back in the work queue * fix: Adjust tests to new workflow * refactor: Further refine reclassification to avoid redirects * refactor: Impose a FeedbackTypeName ordering Also add FeedbackTypeName.legend field, rather than synthesizing it every time we classify or reclassify feedback. In the reclassification forms, only show the relevant feedback types. * refactor: Merge reclassify_feedback_* back into view_feedback_* This means the "Reclassify" button is always present, but eliminates some complexity. * refactor: Add filter(used=True) on FeedbackTypeName querysets * refactor: Add the new FeedbackTypeName to the reclassification success message * fix: Secure reclassification against rogue nomcom members * fix: Print decoded key and fully clean up test nomcom (#6094) * fix: Delete Person records when deleting a test nomcom * fix: Decode test nomcom private key before printing * test: Use correct time zone for test_statement_doc_view (#6064) * chore(deps): update all npm dependencies for playwright (#6061) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> * chore(deps): update all npm dependencies for dev/diff (#6062) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> * chore(deps): update all npm dependencies for dev/coverage-action (#6063) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> * fix: Hash cache key for default memcached cache (#6089) * feat: Show docs that an AD hasn't balloted on that need ballots to progress (#6075) * fix(doc): Unify help texts for document states (#6060) * Fix IESG State help text link (only) * Intermediate checkpoint * Correct URL filtering of state descriptions * Unify help texts for document states * Remove redundant load static from template --------- Co-authored-by: Robert Sparks <rjsparks@nostrum.com> * ci: fix sandbox start.sh memcached user * fix: refactor how settings handles cache definitions (#6099) * fix: refactor how settings handles cache definitions * chore: more english-speaker readable expression * fix: Cast cache key to str before calling encode (#6100) --------- Co-authored-by: Robert Sparks <rjsparks@nostrum.com> Co-authored-by: Liubov Kurafeeva <liubov.kurafeeva@gmail.com> Co-authored-by: nectostr <bastinda96@gmail.com> Co-authored-by: Rich Salz <rsalz@akamai.com> Co-authored-by: PriyankaN <priyanka@amsl.com> Co-authored-by: Priyanka Narkar <priyankanarkar@dhcp-91f8.meeting.ietf.org> Co-authored-by: Ali <alireza83@gmail.com> Co-authored-by: Roman Beltiukov <maybe.hello.world@gmail.com> Co-authored-by: Tero Kivinen <kivinen@iki.fi> Co-authored-by: Nicolas Giard <github@ngpixel.com> Co-authored-by: Kesara Rathnayake <kesara@fq.nz> Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org> Co-authored-by: Paul Selkirk <paul@painless-security.com> Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Co-authored-by: Jim Fenton <fenton@bluepopcorn.net> |
||
---|---|---|
.devcontainer | ||
.github | ||
.vscode | ||
.yarn | ||
bin | ||
client | ||
dev | ||
docker | ||
ietf | ||
media | ||
patch | ||
playwright | ||
pyzmail | ||
svn-history | ||
test | ||
vzic | ||
.dockerignore | ||
.editorconfig | ||
.eslintrc.js | ||
.gitattributes | ||
.gitignore | ||
.pnp.cjs | ||
.pnp.loader.mjs | ||
.pylintrc | ||
.yarnrc.yml | ||
debug.py | ||
docker-compose.yml | ||
jsconfig.json | ||
LICENSE | ||
mypy.ini | ||
package.json | ||
README.md | ||
requirements.txt | ||
tzparse.py | ||
vite.config.js | ||
yarn.lock |
- Production Website
- Changelog
- Contributing
- Getting Started - tl;dr
- Database & Assets
- Old Datatracker Branches
- Frontend Development
- Running Tests
Getting Started
This project is following the standard Git Feature Workflow development model. Learn about all the various steps of the development workflow, from creating a fork to submitting a pull request, in the Contributing guide.
Make sure to read the Styleguides section to ensure a cohesive code format across the project.
You can submit bug reports, enhancement and new feature requests in the discussions area. Accepted tickets will be converted to issues.
Creating a Fork
Click the Fork button in the top-right corner of the repository to create a personal copy that you can work on.
Note that some GitHub Actions might be enabled by default in your fork. You should disable them by going to Settings > Actions > General and selecting Disable actions (then Save).
Git Cloning Tips
As outlined in the Contributing guide, you will first want to create a fork of the datatracker project in your personal GitHub account before cloning it.
Windows developers: Start with WSL2 from the beginning.
Because of the extensive history of this project, cloning the datatracker project locally can take a long time / disk space. You can speed up the cloning process by limiting the history depth, for example (replace USERNAME
with your GitHub username):
- To fetch only up to the 10 latest commits:
git clone --depth=10 https://github.com/USERNAME/datatracker.git
- To fetch only up to a specific date:
git clone --shallow-since=DATE https://github.com/USERNAME/datatracker.git
The tl;dr to get going
Note that you will have to have cloned the datatracker code locally - please read the above sections.
Datatracker development is performed using Docker containers. You will need to be able to run docker (and docker-compose) on your machine to effectively develop. It is possible to get a purely native install working, but it is very complicated and typically takes a first time datatracker developer a full day of setup, where the docker setup completes in a small number of minutes.
Many developers are using VS Code and taking advantage of VS Code's ability to start a project in a set of containers. If you are using VS Code, simply start VS Code in your clone and inside VS Code choose Restart in container
.
If VS Code is not available to you, in your clone, type cd docker; ./run
Once the containers are started, run the tests to make sure your checkout is a good place to start from (all tests should pass - if any fail, ask for help at tools-develop@). Inside the app container's shell type:
ietf/manage.py test --settings=settings_postgrestest
Note that we recently moved the datatracker onto PostgreSQL - you may still find older documentation that suggests testing with settings_sqlitetest. That will no longer work.
For a more detailed description of getting going, see docker/README.md.
Overview of the datatracker models
A beginning of a walkthrough of the datatracker models was prepared for the IAB AID workshop.
Docker Dev Environment
In order to simplify and reduce the time required for setup, a preconfigured docker environment is available.
Read the Docker Dev Environment guide to get started.
Database & Assets
Nightly database dumps of the datatracker are available as Docker images: ghcr.io/ietf-tools/datatracker-db:latest
Note that to update the database in your dev environment to the latest version, you should run the
docker/cleandb
script.
Frontend Development
Intro
We now use yarn
to manage assets for the Datatracker, and vite
/parcel
to package them. yarn
maintains its node
packages under the .yarn
directory.
The datatracker uses 2 different build systems, depending on the use case:
Vite (Vue 3)
Pages will gradually be updated to Vue 3 components. These components are located under the /client
directory.
Each Vue 3 app has its own sub-directory. For example, the agenda app is located under /client/agenda
.
The datatracker makes use of the Django-Vite plugin to point to either the Vite.js server or the precompiled production files. The DJANGO_VITE_DEV_MODE
flag, found in the ietf/settings_local.py
file determines whether the Vite.js server is used or not.
In development mode, you must start the Vite.js development server, in addition to the usual Datatracker server:
yarn dev
Any changes made to the files under /client
will automatically trigger a hot-reload of the modified components.
To generate production assets, run the build command:
yarn build
This will create packages under ietf/static/dist-neue
, which are then served by the Django development server, and which must be uploaded to the CDN.
Parcel (Legacy/jQuery)
The Datatracker includes these packages from the various Javascript and CSS files in ietf/static/js
and ietf/static/css
respectively, bundled using Parcel.
Static images are likewise in ietf/static/images
.
Whenever changes are made to the files under ietf/static
, you must re-run the build command to package them:
yarn legacy:build
This will create packages under ietf/static/dist/ietf
, which are then served by the Django development server, and which must be uploaded to the CDN.
Bootstrap
The "new" datatracker uses Twitter Bootstrap for the UI.
Get familiar with https://getbootstrap.com/getting-started/ and use those UI elements, CSS classes, etc. instead of cooking up your own.
Some ground rules:
- Think hard before tweaking the bootstrap CSS, it will make it harder to upgrade to future releases.
- No
<style>
tags in the HTML! Put CSS into the "morecss" block of a template instead. - CSS that is used by multiple templates goes into static/css/ietf.css or a new CSS file.
- Javascript that is only used on one template goes into the "js" block of that template.
- Javascript that is used by multiple templates goes into static/js/ietf.js or a new js file.
- Avoid CSS, HTML styling or Javascript in the python code!
Serving Static Files via CDN
Production Mode
If resources served over a CDN and/or with a high max-age don't have different URLs for different versions, then any component upgrade which is accompanied by a change in template functionality will have a long transition time during which the new pages are served with old components, with possible breakage. We want to avoid this.
The intention is that after a release has been checked out, but before it is deployed, the standard django collectstatic
management command will be run, resulting in all static files being collected from their working directory location and placed in an appropriate location for serving via CDN. This location will have the datatracker release version as part of its URL, so that after the deployment of a new release, the CDN will be forced to fetch the appropriate static files for that release.
An important part of this is to set up the STATIC_ROOT
and STATIC_URL
settings appropriately. In 6.4.0, the setting is as follows in production mode:
STATIC_URL = "https://www.ietf.org/lib/dt/%s/"%__version__
STATIC_ROOT = CDN_ROOT + "/a/www/www6s/lib/dt/%s/"%__version__
The result is that all static files collected via the collectstatic
command will be placed in a location served via CDN, with the release version being part of the URL.
Development Mode
In development mode, STATIC_URL
is set to /static/
, and Django's staticfiles
infrastructure makes the static files available under that local URL root (unless you set settings.SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE
to False
). It is not necessary to actually populate the static/
directory by running collectstatic
in order for static files to be served when running ietf/manage.py runserver
-- the runserver
command has extra support for finding and serving static files without running collectstatic.
In order to work backwards from a file served in development mode to the location from which it is served, the mapping is as follows:
Development URL | Working copy location |
---|---|
localhost:8000/static/ietf/* | ietf/static/ietf/* |
localhost:8000/static/secr/* | ietf/secr/static/secr/* |
Handling of External Javascript and CSS Components
In order to make it easy to keep track of and upgrade external components, these are now handled by a tool called yarn
via the configuration in package.json
.
To add a new package, simply run (replace <package-name>
with the NPM module name):
yarn add <package-name>
Handling of Internal Static Files
Previous to this release, internal static files were located under static/
, mixed together with the external components. They are now located under ietf/static/ietf/
and ietf/secr/static/secr
, and will be collected for serving via CDN by the collectstatic
command. Any static files associated with a particular app will be handled the same way (which means that all admin/
static files automatically will be handled correctly, too).
Changes to Template Files
In order to make the template files refer to the correct versioned CDN URL (as given by the STATIC_URL root) all references to static files in the templates have been updated to use the static
template tag when referring to static files. This will automatically result in both serving static files from the right place in development mode, and referring to the correct versioned URL in production mode and the simpler /static/
URLs in development mode.
Deployment
During deployment, it is now necessary to run the management command:
ietf/manage.py collectstatic
before activating a new release.
Running Tests
Python Tests
From a datatracker container, run the command:
./ietf/manage.py test --settings=settings_postgrestest
You can limit the run to specific tests using the
--pattern
argument.
Frontend Tests
Frontend tests are done via Playwright. There're 2 different type of tests:
- Tests that test Vue pages / components and run natively without any external dependency.
- Tests that require a running datatracker instance to test against (usually legacy views).
Make sure you have Node.js 16.x or later installed on your machine.
Run Vue Tests
⚠️ All commands below MUST be run from the
./playwright
directory, unless noted otherwise.
-
Run once to install dependencies on your system:
npm install npm run install-deps
-
Run in a separate process, from the project root directory:
yarn preview
-
Run the tests, in of these 3 modes, from the
./playwright
directory:3.1 To run the tests headlessly (command line mode):
npm test
3.2 To run the tests visually (CANNOT run in docker):
npm run test:visual
3.3 To run the tests in debug mode (CANNOT run in docker):
npm run test:debug
Run Legacy Views Tests
First, you need to start a datatracker instance (dev or prod), ideally from a docker container, exposing the 8000 port.
⚠️ All commands below MUST be run from the
./playwright
directory.
- Run once to install dependencies on your system:
npm install
npm run install-deps
- Run the tests headlessly (command line mode):
npm run test:legacy
Diff Tool
To compare 2 different datatracker instances and look for diff, read the diff tool instructions.