From 6c62c737862307752ad2120767d0190e6460cbec Mon Sep 17 00:00:00 2001 From: Ryszard Knop Date: Sun, 12 Sep 2021 20:19:30 +0200 Subject: [PATCH 1/3] Add support for importing Indico Event JSONs Adds a new ImportHandler which handles Indico Event exports (with the "detail" export var set to "contributions"), along with a full example with real data from XDC 2021. Also makes datetime parsers a bit more universal and able to deal with 3-part timestamps (HH:MM or HH:MM:SS). --- demo/indico.ini | 37 + demo/indico.json | 2051 ++++++++++++++++++++++++++ fahrplan/datetime.py | 54 +- handlers/directory.py | 3 +- handlers/import_handlers/__init__.py | 1 + handlers/import_handlers/indico.py | 109 ++ requirements.txt | 3 +- 7 files changed, 2229 insertions(+), 29 deletions(-) create mode 100644 demo/indico.ini create mode 100644 demo/indico.json create mode 100644 handlers/import_handlers/indico.py diff --git a/demo/indico.ini b/demo/indico.ini new file mode 100644 index 0000000..f844ca5 --- /dev/null +++ b/demo/indico.ini @@ -0,0 +1,37 @@ +# Example config for the Indico import handler with real XDC2021 schedule +# Run from the repo root, like so: ./schedule.py -vvd -c demo/indico.ini + +# Download the event export with this URL (replace the event ID): +# https://indico.example.com/export/event/ID.json?occ=yes&detail=contributions&pretty=yes + +# self.global_config +[conference] +title = X Developers Conference 2021 +acronym = xdc2021 +day_count = 3 +start = 2021-09-15 +end = 2021-09-17 +time_slot_duration = 00:30 +license = CC-BY 4.0 + +# Indico-specific fields: +language = en +fallback_speaker = XDC 2021 Organizers + + +[import] +active = indico + +# self.config +[import:indico] +type = indico +path = demo/indico.json + + +[export] +active = basic + +# self.config +[export:basic] +type = xml-basic +path = xdc2021.xml diff --git a/demo/indico.json b/demo/indico.json new file mode 100644 index 0000000..3974c23 --- /dev/null +++ b/demo/indico.json @@ -0,0 +1,2051 @@ +{ + "count":1, + "additionalInfo":{}, + "_type":"HTTPAPIResult", + "url":"https:\/\/indico.freedesktop.org\/export\/event\/1.json?occ=yes&detail=contributions&pretty=yes", + "results":[ + { + "folders":[], + "startDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"06:00:00" + }, + "_type":"Conference", + "hasAnyProtection":false, + "endDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"18:00:00" + }, + "description":"

The X.Org Developers Conference 2020 is the event for developers working on all things Open graphics (Linux kernel, Mesa, DRM, Wayland, X11, etc.).<\/p>", + "roomMapURL":null, + "creator":{ + "affiliation":"X.Org \/ Valve contractor", + "_type":"Avatar", + "last_name":"Peres", + "emailHash":"09d3faed9c57c7d45ace5d9c33cab282", + "_fossil":"conferenceChairMetadata", + "fullName":"Peres, Martin", + "first_name":"Martin", + "id":"1" + }, + "material":[], + "visibility":{ + "id":"", + "name":"Everywhere" + }, + "roomFullname":"", + "references":[], + "occurrences":[ + { + "_fossil":"period", + "endDT":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"18:20:00" + }, + "startDT":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"11:00:00" + }, + "_type":"Period" + }, + { + "_fossil":"period", + "endDT":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"19:35:00" + }, + "startDT":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"11:00:00" + }, + "_type":"Period" + }, + { + "_fossil":"period", + "endDT":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"17:35:00" + }, + "startDT":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"11:00:00" + }, + "_type":"Period" + } + ], + "address":"", + "keywords":[], + "timezone":"Europe\/Warsaw", + "creationDate":{ + "date":"2021-03-31", + "tz":"UTC", + "time":"04:53:45.023225" + }, + "contributions":[ + { + "startDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"14:10:00" + }, + "endDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"14:30:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":12, + "duration":20, + "id":"12", + "speakers":[], + "primaryauthors":[ + { + "person_id":17, + "affiliation":"X.Org", + "_type":"ContributionParticipation", + "last_name":"Peres", + "db_id":37, + "emailHash":"09d3faed9c57c7d45ace5d9c33cab282", + "_fossil":"contributionParticipationMetadata", + "fullName":"Peres, Martin", + "first_name":"Martin", + "id":"37" + } + ], + "title":"Making bare-metal testing accessible to every developer", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":26, + "description":"With Freedesktop's move to Gitlab every project not only got access to a lot of machine time, but they also got all the infrastructure to automate their runs, inspect the results, and provide automated testing reports of merge requests. This has led to a lot of projects adopting it to reduce regressions and maintenance costs to the point of almost bankrupting Freedesktop.org! The only downside of the current testing infrastructure is that it is meant to run in the cloud, not on the GPUs we develop drivers for! Of course, some efforts are underway to make even the DRM subsystem testable in the cloud (VKMS) but if we are to prevent regressions through pre-merge testing, we need at some point to run on the real hardware!\r\n\r\nHardware-testing labs do exists, but they rarely seem to happen without a corporation to back them up as only they have the resources to pay for the development of the system interfacing with the hardware, its hosting, and its maintenance. In order to be within the reach of hobbyist projects, we estimate the cost should be limited to $1kUSD, one week-end of hardware set up time, and a couple of evenings of tweaking before reaching stability, and no more than an hour per week of maintenance after that. To reach this goal, we need to make the deployment as easy as assembling plastic bricks, keep maintenance costs down through self-configuration\/healing, and running Gitlab CI jobs in the farm as easy as inheriting from a CI template and setting a couple of environment variables!\r\n\r\nWhile we have not yet fully reached this loafty goal, we already are operating 3 farms in 3 locations with the above properties mostly implemented \\o\/ In this talk, we are presenting how easy it is to deploy a kernel and run containers in our farm, show what it takes to set up a test farm at home, and what can be done to get hobbyist projects like Nouveau tested!", + "track":"Talk (half slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/26\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"12:30:00" + }, + "endDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"14:30:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":16, + "duration":120, + "id":"16", + "speakers":[], + "primaryauthors":[ + { + "person_id":20, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Herrb", + "db_id":3, + "emailHash":"b6b3aeddb4d88ed40b1f4fe6aea0c8c7", + "_fossil":"contributionParticipationMetadata", + "fullName":"Herrb, Matthieu", + "first_name":"Matthieu", + "id":"3" + } + ], + "title":"X.Org security BoF", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":2, + "description":"I'm going to present a summary of the last 10 years or so of participating to the moderation and animation of the xorg-security@ mailing lists.\r\nThis is an opportunity for people interested in taking over this responsibility to have an insight of the kind of issues that are submitted and how we've been dealing with them.", + "track":"Workshop Discussion Topic", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/2\/", + "session":"Workshop", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"14:35:00" + }, + "endDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"15:20:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":23, + "duration":45, + "id":"23", + "speakers":[], + "primaryauthors":[ + { + "person_id":26, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Gilg", + "db_id":10, + "emailHash":"080fb86ca4747bf6f0643fea9abee748", + "_fossil":"contributionParticipationMetadata", + "fullName":"Gilg, Roman", + "first_name":"Roman", + "id":"10" + } + ], + "title":"KWinFT in 2021: Latest development, Next Steps", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":8, + "description":"This talk presents an overview of the KWinFT project in 2021. The following topics will be discussed:\r\n\r\n - original motives for founding the KWinFT project,\r\n - recap of previous developments in 2020,\r\n - overview of current developments,\r\n - project organisation and scaling,\r\n - embedding in the ecosystem: long-term plan for KWinFT as a C++ library collection for the creation of feature-rich Wayland (and X11) compositors.", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/8\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"14:35:00" + }, + "endDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"15:20:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":19, + "duration":45, + "id":"19", + "speakers":[], + "primaryauthors":[ + { + "person_id":23, + "affiliation":"Valve", + "_type":"ContributionParticipation", + "last_name":"Abbott", + "db_id":9, + "emailHash":"1108230ec2ea1e07ab314b397004a206", + "_fossil":"contributionParticipationMetadata", + "fullName":"Abbott, Connor", + "first_name":"Connor", + "id":"9" + }, + { + "person_id":24, + "affiliation":"Valve", + "_type":"ContributionParticipation", + "last_name":"Sch\u00fcrmann", + "db_id":8, + "emailHash":"643e3f34004625af9210e6828f33bdb8", + "_fossil":"contributionParticipationMetadata", + "fullName":"Sch\u00fcrmann, Daniel", + "first_name":"Daniel", + "id":"8" + } + ], + "title":"SSA-based Register Allocation for GPU Architectures", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":7, + "description":"SSA-based register allocation is a new strategy for register allocation which decouples register allocation from spilling and guarantees predictable register usage. It holds special promise for GPUs due to common architectural features like dynamic register sharing, but there are also challenges in real-world implementations. After first being used in Mesa by the ACO compiler backend for AMD GPUs, it is now also in use by the Freedreno driver for Qualcomm Adreno GPUs. In this talk we will explain the basic concepts, considerations for real-world implementations, and implementation choices made in freedreno and ACO.", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/7\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"17:25:00" + }, + "endDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"17:30:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":10, + "duration":5, + "id":"10", + "speakers":[], + "primaryauthors":[ + { + "person_id":15, + "affiliation":"Igalia, S.L.", + "_type":"ContributionParticipation", + "last_name":"Garcia", + "db_id":4, + "emailHash":"77dea4c30464804ed661bb4ae7c9f624", + "_fossil":"contributionParticipationMetadata", + "fullName":"Garcia, Ricardo", + "first_name":"Ricardo", + "id":"4" + } + ], + "title":"Quick Overview of VK_EXT_multi_draw", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":3, + "description":"The VK_EXT_multi_draw Vulkan extension was recently released and closes an existing gap between the OpenGL and Vulkan APIs. It can be used to improve the performance of some Vulkan apps and as a tool when implementing OpenGL on top of Vulkan as Zink does. This talk will give a quick overview of the extension.", + "track":"Lightning Talk", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/3\/", + "session":"Demos \/ Lightning talks I", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"17:15:00" + }, + "endDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"17:20:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":14, + "duration":5, + "id":"14", + "speakers":[], + "primaryauthors":[ + { + "person_id":18, + "affiliation":"Collabora", + "_type":"ContributionParticipation", + "last_name":"Rosenzweig", + "db_id":7, + "emailHash":"a2e94e6becb5b9ab85bfa121051a7b9d", + "_fossil":"contributionParticipationMetadata", + "fullName":"Rosenzweig, Alyssa", + "first_name":"Alyssa", + "id":"7" + } + ], + "title":"Another year, another ISA: Panfrost update", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":6, + "description":"A lightning talk about the state-of-the-art of the Panfrost driver for Arm Mali GPUs, including support for the new Valhall instruction set architecture in the latest Mali designs.", + "track":"Lightning Talk", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/6\/", + "session":"Demos \/ Lightning talks I", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"17:20:00" + }, + "endDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"17:25:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":25, + "duration":5, + "id":"25", + "speakers":[], + "primaryauthors":[ + { + "person_id":26, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Gilg", + "db_id":5, + "emailHash":"080fb86ca4747bf6f0643fea9abee748", + "_fossil":"contributionParticipationMetadata", + "fullName":"Gilg, Roman", + "first_name":"Roman", + "id":"5" + } + ], + "title":"The Input Method Hub", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":4, + "description":"Quick overview of [ongoing efforts][1] to improve upon the current state of text input and input method Wayland protocols.\r\n\r\n\r\n [1]: https:\/\/gitlab.freedesktop.org\/wayland\/wayland-protocols\/-\/issues\/39", + "track":"Lightning Talk", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/4\/", + "session":"Demos \/ Lightning talks I", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"15:25:00" + }, + "endDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"16:10:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":26, + "duration":45, + "id":"26", + "speakers":[], + "primaryauthors":[ + { + "person_id":27, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"konda", + "db_id":11, + "emailHash":"8e2856969b9dfc1cc7edc55ab63a1249", + "_fossil":"contributionParticipationMetadata", + "fullName":"konda, saikishore", + "first_name":"saikishore", + "id":"11" + }, + { + "person_id":28, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Ganapathi,", + "db_id":12, + "emailHash":"167e0093cd377052300b0e7115c9c3cf", + "_fossil":"contributionParticipationMetadata", + "fullName":"Ganapathi,, Ravindra Babu", + "first_name":" Ravindra Babu", + "id":"12" + } + ], + "title":"Enabling Level zero Sysman APIS for Tool developers to control the GPUs.", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":9, + "description":"We talk about a new programming interface \u201cSysman\u201d which is part of level zero library.\r\nSysman (System Resource Management) is used to monitor and control the power, frequency, temperature etc , of accelerator devices.\r\nSysman is an API that will,\r\n\u2022\tEnable HPC (High Performance Compute) GPU servers to optimize\/track power, temperature ,utilization, memory bandwidth & scheduling of Intel discrete graphics cards for the kind of workloads that run in those environments.\r\n\u2022\tProvide system level monitoring of important telemetry like power, frequencies, temperature and updating the firmwares \r\n\u2022\tBe integrated as part of OneAPI Level0 with hooks into the Level Zero UMD driver.", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[ + { + "person_id":30, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Sharma", + "db_id":14, + "emailHash":"a154573d970f9e66dd9118178e06ae2f", + "_fossil":"contributionParticipationMetadata", + "fullName":"Sharma, Jitendra", + "first_name":"Jitendra", + "id":"14" + }, + { + "person_id":29, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Vilvaraj,", + "db_id":13, + "emailHash":"5546d45af8f51da138a986014caa8e6e", + "_fossil":"contributionParticipationMetadata", + "fullName":"Vilvaraj,, T J Vivek", + "first_name":" T J Vivek", + "id":"13" + } + ], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/9\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"14:35:00" + }, + "endDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"16:35:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":20, + "duration":120, + "id":"20", + "speakers":[], + "primaryauthors":[ + { + "person_id":23, + "affiliation":"Valve", + "_type":"ContributionParticipation", + "last_name":"Abbott", + "db_id":2, + "emailHash":"1108230ec2ea1e07ab314b397004a206", + "_fossil":"contributionParticipationMetadata", + "fullName":"Abbott, Connor", + "first_name":"Connor", + "id":"2" + }, + { + "person_id":24, + "affiliation":"Valve", + "_type":"ContributionParticipation", + "last_name":"Sch\u00fcrmann", + "db_id":1, + "emailHash":"643e3f34004625af9210e6828f33bdb8", + "_fossil":"contributionParticipationMetadata", + "fullName":"Sch\u00fcrmann, Daniel", + "first_name":"Daniel", + "id":"1" + } + ], + "title":"SSA-based Register Allocation", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":1, + "description":"After the talk \"SSA-based Register Allocation for GPU Architectures\", this workshop will be for people considering implementing SSA-based register allocation or wanting to understand the ACO and Freedreno implementations. We can also go more in-depth with different strategies and heuristics used to optimize the register allocation problem, if there is interest.", + "track":"Workshop Discussion Topic", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/1\/", + "session":"Workshop", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"14:35:00" + }, + "endDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"14:55:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":17, + "duration":20, + "id":"17", + "speakers":[], + "primaryauthors":[ + { + "person_id":21, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Huang", + "db_id":6, + "emailHash":"43b20dd3e04abcf26bdd41f248e10e5c", + "_fossil":"contributionParticipationMetadata", + "fullName":"Huang, Ray", + "first_name":"Ray", + "id":"6" + } + ], + "title":"A new CPU performance scaling proposal for tuning VKD3D-Proton", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":5, + "description":"The CPU performance scaling is one of key parts in Linux Kernel, it is to manage the CPU frequency according to kernel and processor status and widely used by many user mode application to talk to the processors. The system information APIs in Wine will use the CPU performance scaling interfaces to manage the multi-core processor schedule timing compatibilities from windows application to Linux environment for VKD3D-Proton (the full Direct3D 12 API on top of Vulkan) on Steam. The original CPU performance scaling module is based on the legacy kernel common ACPI cpufreq driver on AMD processors. We found it was not very performance\/power efficiency for modern AMD platforms. So this talk is to introduce a new CPU performance scaling design for AMD platform which has better performance per watt scaling on such as 3D game like Horizon Zero Dawn with VKD3D-Proton on Steam. \r\n\r\nThe idea is inspired by co-working with Valve software guys for tuning animation slow down problem (https:\/\/github.com\/ValveSoftware\/Proton\/issues\/4125) of VKD3D-Proton on steam.", + "track":"Lightning Talk", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/5\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"12:30:00" + }, + "endDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"13:15:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":29, + "duration":45, + "id":"29", + "speakers":[], + "primaryauthors":[ + { + "person_id":37, + "affiliation":"Intel", + "_type":"ContributionParticipation", + "last_name":"Hellstrom", + "db_id":41, + "emailHash":"e05248bf534abb2f70e4499205d75c10", + "_fossil":"contributionParticipationMetadata", + "fullName":"Hellstrom, Thomas", + "first_name":"Thomas", + "id":"41" + } + ], + "title":"TTM conversion in i915", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":34, + "description":"The purpose of TTM is to provide buffer object contents in memory where it is mappable by the CPU and GPU when needed, and also to allow overcommitting by means of swapping or eviction.\r\n\r\nThis talk will cover the process of moving memory management in i915 kernel driver to TTM.", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/34\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"12:55:00" + }, + "endDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"13:40:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":13, + "duration":45, + "id":"13", + "speakers":[], + "primaryauthors":[ + { + "person_id":18, + "affiliation":"Collabora", + "_type":"ContributionParticipation", + "last_name":"Rosenzweig", + "db_id":15, + "emailHash":"a2e94e6becb5b9ab85bfa121051a7b9d", + "_fossil":"contributionParticipationMetadata", + "fullName":"Rosenzweig, Alyssa", + "first_name":"Alyssa", + "id":"15" + } + ], + "title":"The Occult and the Apple GPU", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":10, + "description":"The Internet has been under a spell over the M1 system-on-chip. Is Apple's GPU architecture magically faster than the rest of the industry? Or is it all smoke and mirrors? Only a reverse-engineering witch can divine that truth. Grab your cape, because we're about to spill the chip's secrets, solve mysteries we were never supposed to know about, and gain a Mesa driver along the way.", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/10\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"12:55:00" + }, + "endDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"13:40:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":6, + "duration":45, + "id":"6", + "speakers":[], + "primaryauthors":[ + { + "person_id":11, + "affiliation":"Igalia S.L.", + "_type":"ContributionParticipation", + "last_name":"Piliaiev", + "db_id":17, + "emailHash":"71de5dc888a8be6468d229c25a9a6253", + "_fossil":"contributionParticipationMetadata", + "fullName":"Piliaiev, Danylo", + "first_name":"Danylo", + "id":"17" + } + ], + "title":"Dissecting and fixing Vulkan rendering issues in drivers with RenderDoc", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":12, + "description":"Broken and flickering geometry, corrupted textures, and even hangs in real-world games and apps are common issues in open-source graphics driver development. While conformance tests are mostly narrow and confined, finding driver problems when running triple-A games can be a challenging task.\r\n\r\nThis talk will show a major misrendering example when running a game and the steps taken to pinpoint the underlying problem in shader compilation using RenderDoc. We will briefly touch the taxonomy of different issues, typical causes, and generic methods to try.", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/12\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"16:15:00" + }, + "endDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"17:00:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":27, + "duration":45, + "id":"27", + "speakers":[], + "primaryauthors":[ + { + "person_id":32, + "affiliation":"Intel", + "_type":"ContributionParticipation", + "last_name":"Arteaga", + "db_id":20, + "emailHash":"d9ca3c57a8369d9a439c1bf57c1a60ee", + "_fossil":"contributionParticipationMetadata", + "fullName":"Arteaga, Jaime", + "first_name":"Jaime", + "id":"20" + }, + { + "person_id":28, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Ganapathi,", + "db_id":21, + "emailHash":"167e0093cd377052300b0e7115c9c3cf", + "_fossil":"contributionParticipationMetadata", + "fullName":"Ganapathi,, Ravindra Babu", + "first_name":" Ravindra Babu", + "id":"21" + }, + { + "person_id":34, + "affiliation":"Intel", + "_type":"ContributionParticipation", + "last_name":"Gopalakrishnan", + "db_id":18, + "emailHash":"540d3ada64541a0e8440964ee7e24112", + "_fossil":"contributionParticipationMetadata", + "fullName":"Gopalakrishnan, Aravind", + "first_name":"Aravind", + "id":"18" + }, + { + "person_id":31, + "affiliation":"Intel", + "_type":"ContributionParticipation", + "last_name":"Mrozek", + "db_id":22, + "emailHash":"e146823d4818d1523c8feab5926ae9f5", + "_fossil":"contributionParticipationMetadata", + "fullName":"Mrozek, Michal", + "first_name":"Michal", + "id":"22" + }, + { + "person_id":35, + "affiliation":"Intel", + "_type":"ContributionParticipation", + "last_name":"Fliflet", + "db_id":19, + "emailHash":"e074db898e407d453888563a4c560b45", + "_fossil":"contributionParticipationMetadata", + "fullName":"Fliflet, Brandon", + "first_name":"Brandon", + "id":"19" + }, + { + "person_id":33, + "affiliation":"Intel", + "_type":"ContributionParticipation", + "last_name":"Ashbaugh", + "db_id":23, + "emailHash":"dbf020b39ca263bcf962549b1e9dd9c2", + "_fossil":"contributionParticipationMetadata", + "fullName":"Ashbaugh, Ben", + "first_name":"Ben", + "id":"23" + } + ], + "title":"Redefining the Future of Accelerator Computing with Level Zero", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":13, + "description":"Modern applications in areas like Machine Learning, Artificial Intelligence, and 3D Graphics, require a synergistic software\/hardware ecosystem that allow developers to take full advantage of hardware accelerators. In this scenario, it is critical to have a low-level API that can easily support and adapt to any device, in order to minimize the impact in upper-levels of the software stack when exposing novel hardware capabilities to higher-level programming models and frameworks.\r\n\r\nLevel-Zero API, part of Intel OneAPI product, defines a device-independent, vendor-agnostic, low-level, direct-to-metal interface to accelerator devices that abstracts users and upper-level components of the software stack from the specifics of the target devices, while providing them with the access needed to fully exploit their hardware capabilities. This is essential for Intel to expose new hardware features at a faster pace and to effectively compete against established CUDA-based ecosystem from NVIDIA.\r\n\r\nThis presentation offers an overview of the rich set of interfaces defined in Level-Zero, focusing on capabilities such as unified-shared memory, peer-to-peer communication, and inter-process communication. Additionally, the status of the implementation of Level-Zero and its adoption by higher-level compiler, analysis tools, performance libraries and other frameworks are presented.", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/13\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"11:15:00" + }, + "endDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"12:00:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":2, + "duration":45, + "id":"2", + "speakers":[], + "primaryauthors":[ + { + "person_id":6, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Ripard", + "db_id":16, + "emailHash":"ad07168ef43acf697d758d4d0d41762c", + "_fossil":"contributionParticipationMetadata", + "fullName":"Ripard, Maxime", + "first_name":"Maxime", + "id":"16" + } + ], + "title":"Improving the Linux display stack reliability", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":11, + "description":"Due to its nature, the display stack can be hard to test. Indeed, the component we want to test often sends the pixels to an external display without any way to retrieve the image being output, let alone make sure it's correct.\r\n\r\nAnd while a human can perform some of those tests by looking at the screen, some issues can prove to be difficult to spot, such as colours being slightly off or pixels being offset. More complex tests can also be tedious to set up or hard to trigger.\r\n\r\nThe ecosystem of devices that Linux supports also adds further constraints on the display interfaces we want to test, but also on the system size, the tools available, the connectivity of the device, etc. \r\n\r\nIn this talk, we will first discuss the constraints and what makes testing the display stack unique. We will then talk about the existing solutions, their limitations, and what we have been working on to improve the situation.", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/11\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"11:15:00" + }, + "endDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"13:15:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":37, + "duration":120, + "id":"37", + "speakers":[], + "primaryauthors":[ + { + "person_id":17, + "affiliation":"X.Org \/ Valve contractor", + "_type":"ContributionParticipation", + "last_name":"Peres", + "db_id":42, + "emailHash":"09d3faed9c57c7d45ace5d9c33cab282", + "_fossil":"contributionParticipationMetadata", + "fullName":"Peres, Martin", + "first_name":"Martin", + "id":"42" + } + ], + "title":"Coordinating the CI efforts for Linux + userspace", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":35, + "description":"With the ever-increasing focus on testing found in our community, let's try to coordinate the efforts of every individual.\r\n\r\nThe main focus for this workgroup will be two-fold:\r\n\r\n - Ramp up the trace-based testing in Mesa CI \/ DXVK \/ ...\r\n - Bring kernel testing to more drivers than i915\r\n\r\nPlease ping mupuf on IRC on OFTC's #freedesktop to add additional topics or show interest in one.", + "track":"Workshop Discussion Topic", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/35\/", + "session":"Workshop", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"17:05:00" + }, + "endDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"17:15:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":38, + "duration":10, + "id":"38", + "speakers":[], + "primaryauthors":[ + { + "person_id":41, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Rasmusson", + "db_id":44, + "emailHash":"1a11b833aa44cf8b8ae9d623cfb13dd6", + "_fossil":"contributionParticipationMetadata", + "fullName":"Rasmusson, Arthur", + "first_name":"Arthur", + "id":"44" + } + ], + "title":"LibVF.IO & Hyperborea - New tech for VFIO graphics passthrough users", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":36, + "description":"## LibVF.IO is a library providing automated mdev mediated dive partitioning, GPU scheduling, and memory allocation for VFIO graphics passthrough users.\r\n## Hyperborea is daemon driven by LibVF.IO allowing users to create, run, and manage unikernel VMs (single application per VM) with full performance graphics acceleration.\r\n\r\nIn our lightning talk we'd love to give a quick demo of how easy it is to create and run a VM with LibVFIO and show some of the underlying tech!", + "track":"Demo", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/36\/", + "session":"Demos \/ Lightning talks I", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"17:30:00" + }, + "endDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"17:35:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":39, + "duration":5, + "id":"39", + "speakers":[], + "primaryauthors":[ + { + "person_id":43, + "affiliation":"flibitijibibo", + "_type":"ContributionParticipation", + "last_name":"Lee", + "db_id":45, + "emailHash":"f72913968167f06b4c9e2c765eb60afe", + "_fossil":"contributionParticipationMetadata", + "fullName":"Lee, Ethan", + "first_name":"Ethan", + "id":"45" + } + ], + "title":"SDL: The Quest for Wayland By Default", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":37, + "description":"The recently-released SDL 2.0.16 dramatically improves native Wayland support. The experience is about 90% there! This lightning talk will go over the _other_ 90% needed to make Wayland the default video driver for Linux.\r\n\r\nEthan Lee is a Linux game developer with over 60 games of experience, including Celeste, Streets of Rage 4, Transistor, and many more! He is also the maintainer of FNA and is a co-maintainer of SDL.", + "track":"Lightning Talk", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/37\/", + "session":"Demos \/ Lightning talks I", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"17:25:00" + }, + "endDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"17:35:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":40, + "duration":10, + "id":"40", + "speakers":[], + "primaryauthors":[], + "title":"Closing session", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":38, + "description":"", + "track":null, + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/38\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"13:20:00" + }, + "endDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"14:05:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":7, + "duration":45, + "id":"7", + "speakers":[], + "primaryauthors":[ + { + "person_id":12, + "affiliation":"Red Hat", + "_type":"ContributionParticipation", + "last_name":"Tissoires", + "db_id":24, + "emailHash":"35df74adaa763510f6b148af0cb6a4e6", + "_fossil":"contributionParticipationMetadata", + "fullName":"Tissoires, Benjamin", + "first_name":"Benjamin", + "id":"24" + } + ], + "title":"Status of freedesktop.org gitlab\/cloud hosting", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":14, + "description":"Last year, it was fires everywhere. This year? well, it was also the same, sort of.\r\n\r\nIn this talk, we will see what steps we took to reduce further more our bill for our gitlab hosting. We will also tell some jokes like \"oh, BTW, we almost lost all of our storage\", or something like \"oops, I killed the entire cluster\". Oh the fun we had.\r\n\r\nSo yes, this is basically the continuation of the talk I gave last year to present the new infrastructure and the roadmap we have for gitlab.freedesktop.org.", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/14\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"11:15:00" + }, + "endDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"12:00:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":4, + "duration":45, + "id":"4", + "speakers":[], + "primaryauthors":[ + { + "person_id":8, + "affiliation":"Igalia, S.L.", + "_type":"ContributionParticipation", + "last_name":"Toral", + "db_id":26, + "emailHash":"1c60825f3994b52c86d6c0307194f532", + "_fossil":"contributionParticipationMetadata", + "fullName":"Toral, Iago", + "first_name":"Iago", + "id":"26" + } + ], + "title":"Raspberry Pi Vulkan driver update", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":16, + "description":"Last year we presented our on-going work to bring Vulkan support to the\r\nRaspberry Pi 4 platform. This talk is intended to provide a progress update\r\nafter a year of additional development, discussing main priorities and\r\nachievements during this period as well as future development plans.", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/16\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"13:45:00" + }, + "endDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"14:30:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":1, + "duration":45, + "id":"1", + "speakers":[], + "primaryauthors":[ + { + "person_id":5, + "affiliation":"Google", + "_type":"ContributionParticipation", + "last_name":"Clark", + "db_id":25, + "emailHash":"7e10e70c29be7a086a9e8ce9d51702b5", + "_fossil":"contributionParticipationMetadata", + "fullName":"Clark, Rob", + "first_name":"Rob", + "id":"25" + } + ], + "title":"ChromeOS + freedreno update", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":15, + "description":"Now that we are shipping arm chromebooks with upstream mesa graphics drivers, we would like to give a status update, covering the work to get to this point, and what lies ahead.", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/15\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"15:50:00" + }, + "endDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"16:35:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":5, + "duration":45, + "id":"5", + "speakers":[], + "primaryauthors":[ + { + "person_id":10, + "affiliation":"AMD", + "_type":"ContributionParticipation", + "last_name":"Rajneesh Bhardwaj", + "db_id":28, + "emailHash":"c268892ccf0e17ae512da74adffb6388", + "_fossil":"contributionParticipationMetadata", + "fullName":"Rajneesh Bhardwaj, Rajneesh", + "first_name":"Rajneesh", + "id":"28" + }, + { + "person_id":9, + "affiliation":"AMD", + "_type":"ContributionParticipation", + "last_name":"Kuehling", + "db_id":29, + "emailHash":"e149d67d5f856816f2ae630e9dfa740c", + "_fossil":"contributionParticipationMetadata", + "fullName":"Kuehling, Felix", + "first_name":"Felix", + "id":"29" + } + ], + "title":"Fast Checkpoint Restore for AMD GPUs with CRIU", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":18, + "description":"CRIU a.k.a Checkpoint Restore in Userspace is the de-facto choice for Checkpoint and Restore but one of its major limitations is to Checkpoint and Restore tasks that have a device state associated with them and need the driver to manage their state which CRIU cannot control but provides a flexible plugin mechanism to achieve this. So far there is no serious real device plugin (at least in public domain) that deals with a complex device such as a GPU. We would like to discuss our work to support CRIU with AMD ROCm which is AMD's fully open source solution to Machine Learning and HPC compute space. This will potentially be extended to support video decode \/ encode using render nodes.\r\n\r\nCRIU already has a plugin architecture to support processes using device files. Using this architecture we added a plugin for supporting CRIU with GPU compute applications running on the AMD ROCm software stack. This requires new ioctls in the KFD kernel mode driver to save and restore hardware and kernel mode driver state, such as memory mappings, VRAM contents, user mode queues, and signals. We also needed a few new plugin hooks in CRIU itself to support remapping of device files and mmap offsets within them, and finalizing GPU virtual memory mappings and resuming execution of the GPU after all VMAs have been restored by the PIE code.\r\n\r\nThe result is the first real-world plugin and the first example of GPU support in CRIU.\r\n\r\nWhile there were several new challenges that we faced to enable this work, we were finally able to support real tensorflow\/pytorch work loads across multi-gpu nodes using criu and were also able to migrate the containers running gpu bound worklaods.In this talk, we'd like to talk about our journey where we started with a small 64KB buffer object in GPU VRAM to Gigabytes of single VRAM buffer objects across GPUs. We started with \/PROC\/PID\/MEM interface initially and then switched to a faster direct approach that only worked with large PCIE BAR GPUs but that was still slow. For instance, to copy 16GB of VRAM, it used to take ~15 mins with the direct approach on large bars and more than 45 mins with small bars. We then switched to using system DMA engines built into most AMD GPus and this resulted in very significant improvements. We can checkpoint the same amount of data within 5 seconds now. For this we initially modified libdrm but the maintainers didn't agree to change an private API to expose GEM handles to the userspace so we finally ended up make a kernel change and exporting the buffer objects in VRAM as DMABUF objects and then import in our plugin using libdrm.\r\n\r\nWe are going to present the architecture of our plugin, how it interacts with CRIU and our GPU driver during the checkpoint and restore flow. We can also talk about some security considerations and initial test results and performance stats.\r\n \r\n\r\nFurther reading: https:\/\/github.com\/RadeonOpenCompute\/criu\/tree\/criu-dev\/plugins\/amdgpu#readme \r\nOur work-in-progress code: https:\/\/github.com\/RadeonOpenCompute\/criu\/tree\/amd-criu-dev-staging", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[ + { + "person_id":42, + "affiliation":"AMD", + "_type":"ContributionParticipation", + "last_name":"Yat Sin", + "db_id":43, + "emailHash":"b833e0fc01c782f80fdb0ddf13986d96", + "_fossil":"contributionParticipationMetadata", + "fullName":"Yat Sin, David", + "first_name":"David", + "id":"43" + } + ], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/18\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"11:15:00" + }, + "endDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"12:00:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":18, + "duration":45, + "id":"18", + "speakers":[], + "primaryauthors":[ + { + "person_id":22, + "affiliation":"KDE", + "_type":"ContributionParticipation", + "last_name":"Edmundson", + "db_id":31, + "emailHash":"3629f877fbdb3ea4f9cd187ae2d78c35", + "_fossil":"contributionParticipationMetadata", + "fullName":"Edmundson, David", + "first_name":"David", + "id":"31" + } + ], + "title":"Addressing wayland robustness", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":20, + "description":"One of the biggest user-facing issues facing wayland adoption is robustness. A crash in the compositor can take down the entire session and lead to data loss.\r\n\r\nWith wayland being a constantly changing landscape and with more workload being put on the compositor process this doesn't seem to be going away.\r\n\r\nThis talk showcases work across multiple libraries and toolkits to tackle this at the root with a method of \"compositor handoffs\" allowing clients to safely securely and seamlessly reconnect to a relaunched wayland compositor. This not only tackles the issue of robustness but also opens up a whole avenue of new opportunities that were previously impossible; such as freezing and resuming applications.\r\n\r\nWe talk through the POC implementations made across multiple toolkits, and what changes are needed throughout wayland and mesa to support this.", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/20\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"13:45:00" + }, + "endDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"14:30:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":11, + "duration":45, + "id":"11", + "speakers":[], + "primaryauthors":[ + { + "person_id":16, + "affiliation":"Intel", + "_type":"ContributionParticipation", + "last_name":"Ekstrand", + "db_id":27, + "emailHash":"c6988b7ea6112e3e892765a0d4287e0c", + "_fossil":"contributionParticipationMetadata", + "fullName":"Ekstrand, Jason", + "first_name":"Jason", + "id":"27" + } + ], + "title":"Ray-tracing in Vulkan pt. 2: Implementation", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":17, + "description":"At last year's XDC, Jason gave an overview of the VK_KHR_ray_tracing extensions and how they can be used to implement a ray-tracing render from a client POV. In this talk, Jason will discuss the implementation of those extensions in Intel's Linux Vulkan driver. We'll cover over-all architecture as well as detailed topics such as bindless thread dispatch on Intel HW, Shader call\/return lowering, and BVH building with OpenCL kernels. Watching last year's talk as preparation is highly recommended.", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/17\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"15:25:00" + }, + "endDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"15:45:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":22, + "duration":20, + "id":"22", + "speakers":[], + "primaryauthors":[ + { + "person_id":38, + "affiliation":"Red Hat", + "_type":"ContributionParticipation", + "last_name":"Paul", + "db_id":35, + "emailHash":"a3dd95193c8ad194339faacb4e66653e", + "_fossil":"contributionParticipationMetadata", + "fullName":"Paul, Lyude", + "first_name":"Lyude", + "id":"35" + } + ], + "title":"State of the X.Org", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":24, + "description":"Your secretary's yearly report on the state of the X.org Foundation. Expect updates on the freedeskoptop.org, internship and student programs, XDC, and more!", + "track":"Talk (half slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/24\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"12:05:00" + }, + "endDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"12:50:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":8, + "duration":45, + "id":"8", + "speakers":[], + "primaryauthors":[ + { + "person_id":13, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Nunes", + "db_id":32, + "emailHash":"290684099881d9fb25cd2ed8a6ee47ad", + "_fossil":"contributionParticipationMetadata", + "fullName":"Nunes, Erico", + "first_name":"Erico", + "id":"32" + } + ], + "title":"Lima driver status update 2021", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":21, + "description":"Lima is an open source graphics driver which supports Mali Utgard (Mali-4xx) embedded GPUs from ARM.\r\nIt\u2019s a reverse-engineered, community-developed driver.\r\n\r\nAt XDC 2019 there was a presentation about Lima, which happened not long after its initial inclusion in upstream.\r\nAt that time, it was still missing some important features to be a complete driver.\r\nMost of those have been addressed since then and the situation now is notably more stable.\r\n\r\nThis talk aims to provide a status update on Lima, a review of the more relevant recent work on it, and some possible paths going forward.", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/21\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"15:25:00" + }, + "endDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"15:45:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":3, + "duration":20, + "id":"3", + "speakers":[], + "primaryauthors":[ + { + "person_id":7, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Gmeiner", + "db_id":34, + "emailHash":"565e12efc377ee6df26d7fc1f5e8db9c", + "_fossil":"contributionParticipationMetadata", + "fullName":"Gmeiner, Christian", + "first_name":"Christian", + "id":"34" + } + ], + "title":"etnaviv: status update", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":23, + "description":"Just a yearly status update about etnaviv (NIR, CI, ..).", + "track":"Talk (half slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/23\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"12:05:00" + }, + "endDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"12:50:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":21, + "duration":45, + "id":"21", + "speakers":[], + "primaryauthors":[ + { + "person_id":25, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Wasserka", + "db_id":33, + "emailHash":"6e093c3d47734aa1deb67c7819d44659", + "_fossil":"contributionParticipationMetadata", + "fullName":"Wasserka, Tony", + "first_name":"Tony", + "id":"33" + } + ], + "title":"Compiling Vulkan shaders in the browser: A tale of control flow graphs and WebAssembly", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":22, + "description":"Ever wondered what happens when you mix Emscripten, Graphviz, and a Vulkan driver? I couldn\u2019t help myself and tried: What started as a simple visualizer for shader control flow has since grown into a port of Mesa\u2019s shader compiler ACO running in the browser, capable of compiling thousands of shaders on-the-fly. Don\u2019t believe it? Demo included!\r\n\r\nPutting this experiment into wider context reveals a landscape of powerful debugging tools rarely utilized in low-level programming: With robust and efficient code left at the core, external web-based tools benefit from quicker iteration cycles and easier UI prototyping.\r\n\r\nThis talk doesn\u2019t present ground-breaking ideas: At worst, you\u2019ll see a cool tool made with love. At best, you\u2019ll walk away with new ideas for creating debuggable systems.", + "track":"Talk (full slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/22\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"12:05:00" + }, + "endDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"12:25:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":24, + "duration":20, + "id":"24", + "speakers":[], + "primaryauthors":[ + { + "person_id":26, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Gilg", + "db_id":36, + "emailHash":"080fb86ca4747bf6f0643fea9abee748", + "_fossil":"contributionParticipationMetadata", + "fullName":"Gilg, Roman", + "first_name":"Roman", + "id":"36" + } + ], + "title":"KWinFT's wlroots backend", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":25, + "description":"The [big change][1] in KWinFT this year is the replacement of all its own hardware backend plugins for its Wayland session with a single backend talking to wlroots.\r\n\r\nThis talk goes into detail on:\r\n\r\n - reasons for this strategic move,\r\n - technical realization,\r\n - outcome with advantages and disadvantages,\r\n - long-term impact on the ecosystem.\r\n\r\n\r\n [1]: https:\/\/gitlab.com\/kwinft\/kwinft\/-\/merge_requests\/108\/", + "track":"Talk (half slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/25\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"15:00:00" + }, + "endDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"15:20:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":28, + "duration":20, + "id":"28", + "speakers":[], + "primaryauthors":[ + { + "person_id":36, + "affiliation":"Igalia", + "_type":"ContributionParticipation", + "last_name":"J\u00e1quez Leal", + "db_id":40, + "emailHash":"0b3b03c77a936004ce892e0263d4aa1b", + "_fossil":"contributionParticipationMetadata", + "fullName":"J\u00e1quez Leal, Victor Manuel", + "first_name":"Victor Manuel", + "id":"40" + } + ], + "title":"Video decoding in Vulkan: A brief overview of the provisional VK_KHR_video_queue & VK_KHR_video_decode APIs", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":29, + "description":"In April of this year, Khronos released a provisional set of extensions: [VK_KHR_video_queue, VK_KHR_video_decoder_queue and VK_KHR_video_encoder_queue](https:\/\/www.khronos.org\/blog\/an-introduction-to-vulkan-video). They all aim for hardware accelerated video decoding and encoder with the Vulkan API. In this talk, we will introduce the basics of video decoding and give an overview of the concepts used to decode video via the new Vulkan extension, using as example the usage of the API in a GStreamer element. The talk will be educational and focus on helping others in the X\/Mesa community to understand the new API concepts.", + "track":"Talk (half slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/29\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"11:00:00" + }, + "endDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"11:10:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":33, + "duration":10, + "id":"33", + "speakers":[], + "primaryauthors":[], + "title":"Opening Session", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":30, + "description":"", + "track":null, + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/30\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"16:40:00" + }, + "endDate":{ + "date":"2021-09-15", + "tz":"UTC", + "time":"17:00:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":9, + "duration":20, + "id":"9", + "speakers":[], + "primaryauthors":[ + { + "person_id":14, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Priyadarsini", + "db_id":38, + "emailHash":"85de5c877b358d1f8e345963eb23d690", + "_fossil":"contributionParticipationMetadata", + "fullName":"Priyadarsini, Sumera", + "first_name":"Sumera", + "id":"38" + } + ], + "title":"Emulating Virtual Hardware in VKMS", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":27, + "description":"The Virtual Kernel Mode-setting(VKMS) driver aims to help with testing and development of graphics drivers without having to use actual graphics hardware. My work during Outreachy comprised adding support for emulation of virtual hardware in VKMS. This involved writing\/refactoring code in IGT GPU tests as well. I want to talk about my journey as a newcomer in exploring DRM and IGT GPU tools, debugging mysterious errors, and working with the community to develop a solution.", + "track":"Talk (half slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/27\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"11:00:00" + }, + "endDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"11:10:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":34, + "duration":10, + "id":"34", + "speakers":[], + "primaryauthors":[], + "title":"Opening Session", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":31, + "description":"", + "track":null, + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/31\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"17:05:00" + }, + "endDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"17:25:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":30, + "duration":20, + "id":"30", + "speakers":[], + "primaryauthors":[ + { + "person_id":20, + "affiliation":"", + "_type":"ContributionParticipation", + "last_name":"Herrb", + "db_id":39, + "emailHash":"b6b3aeddb4d88ed40b1f4fe6aea0c8c7", + "_fossil":"contributionParticipationMetadata", + "fullName":"Herrb, Matthieu", + "first_name":"Matthieu", + "id":"39" + } + ], + "title":"X.Org security", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":28, + "description":"I'm going to present a summary of the last 10 years or so of participating to the moderation and animation of the xorg-security@ mailing lists.\r\nThis is an opportunity for people interested in taking over this responsibility to have an insight of the kind of issues that are submitted and how we've been dealing with them.", + "track":"Talk (half slot) (CLOSED)", + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/28\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"17:30:00" + }, + "endDate":{ + "date":"2021-09-16", + "tz":"UTC", + "time":"18:30:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":35, + "duration":60, + "id":"35", + "speakers":[], + "primaryauthors":[], + "title":"X.Org Foundation Board of Directors Meeting", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":32, + "description":"", + "track":null, + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/32\/", + "session":"Main Track", + "references":[] + }, + { + "startDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"11:00:00" + }, + "endDate":{ + "date":"2021-09-17", + "tz":"UTC", + "time":"11:10:00" + }, + "keywords":[], + "roomFullname":"", + "friendly_id":36, + "duration":10, + "id":"36", + "speakers":[], + "primaryauthors":[], + "title":"Opening Session", + "note":{}, + "location":"", + "_fossil":"contributionMetadata", + "type":null, + "folders":[], + "_type":"Contribution", + "db_id":33, + "description":"", + "track":null, + "material":[], + "coauthors":[], + "board_number":"", + "room":"", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/contributions\/33\/", + "session":"Main Track", + "references":[] + } + ], + "id":"1", + "category":"Home", + "room":"", + "title":"X.Org Developer Conference 2021", + "url":"https:\/\/indico.freedesktop.org\/event\/1\/", + "note":{}, + "chairs":[ + { + "person_id":1, + "affiliation":"Intel", + "_type":"ConferenceChair", + "last_name":"Szwichtenberg", + "db_id":1, + "emailHash":"9dd3949e4e23b5be6fa8a759470505b4", + "_fossil":"conferenceChairMetadata", + "fullName":"Szwichtenberg, Radek", + "first_name":"Radek", + "id":"1" + }, + { + "person_id":2, + "affiliation":"Intel", + "_type":"ConferenceChair", + "last_name":"Vetter", + "db_id":2, + "emailHash":"7770a15dee3fab288538fceb4257cc5e", + "_fossil":"conferenceChairMetadata", + "fullName":"Vetter, Daniel", + "first_name":"Daniel", + "id":"2" + }, + { + "person_id":3, + "affiliation":"Igalia", + "_type":"ConferenceChair", + "last_name":"Iglesias Gons\u00e1lvez", + "db_id":3, + "emailHash":"09d2c25f0b3474e29cf92506ad0b3580", + "_fossil":"conferenceChairMetadata", + "fullName":"Iglesias Gons\u00e1lvez, Samuel", + "first_name":"Samuel", + "id":"3" + }, + { + "person_id":4, + "affiliation":"", + "_type":"ConferenceChair", + "last_name":"Filion", + "db_id":5, + "emailHash":"644eaf497500019260168b156657fd16", + "_fossil":"conferenceChairMetadata", + "fullName":"Filion, Mark", + "first_name":"Mark", + "id":"5" + } + ], + "location":"", + "_fossil":"conferenceMetadataWithContribs", + "type":"conference", + "categoryId":0 + } + ], + "ts":1631459746 +} \ No newline at end of file diff --git a/fahrplan/datetime.py b/fahrplan/datetime.py index d1647cf..e84abba 100644 --- a/fahrplan/datetime.py +++ b/fahrplan/datetime.py @@ -5,33 +5,19 @@ TIME_FORMAT = "%H:%M" -def format_datetime(datetime: dt.datetime): +def format_datetime(datetime: dt.datetime) -> str: return datetime.isoformat() -def parse_datetime(date_string: str): +def parse_datetime(date_string: str) -> dt.datetime: return dt.datetime.fromisoformat(date_string) -def format_time(time: dt.time): - return time.strftime(TIME_FORMAT) - - -def parse_time(time_string: str): - try: - hours, _, minutes = time_string.partition(":") - hours = int(hours, 10) - minutes = int(minutes, 10) - return dt.time(hours, minutes) - except ValueError: - raise FahrplanError(f"{time_string} is not in required format %H:%M") - - -def format_date(date: dt.date): +def format_date(date: dt.date) -> str: return str(date) -def parse_date(date_string: str): +def parse_date(date_string: str) -> dt.date: try: items = [int(i, 10) for i in date_string.split("-")] return dt.date(*items) @@ -40,16 +26,30 @@ def parse_date(date_string: str): raise FahrplanError(f"{date_string} is not in required format %Y-%m-%d") -def format_duration(duration: dt.timedelta): +def _parse_time_items(time_string: str) -> list[int]: + try: + if '.' in time_string: # ...just drop miliseconds. + time_string = time_string[:time_string.index('.')] + + return [int(i, 10) for i in time_string.split(":")] + except ValueError: + raise FahrplanError(f"{time_string} is not in required format %H:%M[:%S]") + + +def format_time(time: dt.time) -> str: + return time.strftime(TIME_FORMAT) + + +def parse_time(time_string: str) -> dt.time: + return dt.time(*_parse_time_items(time_string)) + + +def format_duration(duration: dt.timedelta) -> str: # just cut away the seconds part return str(duration)[:-3] -def parse_duration(duration_string: str): - try: - hours, _, minutes = duration_string.partition(":") - hours = int(hours, 10) - minutes = int(minutes, 10) - return dt.timedelta(hours=hours, minutes=minutes) - except ValueError: - raise FahrplanError(f"{duration_string} is not in required format %H:%M") +def parse_duration(duration_string: str) -> dt.timedelta: + items = _parse_time_items(duration_string) + seconds = items[2] if len(items) >= 3 else 0 + return dt.timedelta(hours=items[0], minutes=items[1], seconds=seconds) diff --git a/handlers/directory.py b/handlers/directory.py index 1d2c854..214e07d 100644 --- a/handlers/directory.py +++ b/handlers/directory.py @@ -1,7 +1,7 @@ from typing import Type from .base import ImportHandler, ExportHandler -from .import_handlers import FakeImportHandler, CSVImportHandler, JSONImportHandler, ProyektorImportHandler +from .import_handlers import FakeImportHandler, CSVImportHandler, JSONImportHandler, ProyektorImportHandler, IndicoImportHandler from .export_handlers import BasicXMLExportHandler, ExtendedXMLExportHandler, FrabJsonExportHandler import_handlers = { @@ -9,6 +9,7 @@ "fake": FakeImportHandler, "json": JSONImportHandler, "proyektor": ProyektorImportHandler, + "indico": IndicoImportHandler, } export_handlers = { diff --git a/handlers/import_handlers/__init__.py b/handlers/import_handlers/__init__.py index 2b97231..ca21ca0 100644 --- a/handlers/import_handlers/__init__.py +++ b/handlers/import_handlers/__init__.py @@ -2,3 +2,4 @@ from .fake import FakeImportHandler from .json import JSONImportHandler from .proyektor import ProyektorImportHandler +from .indico import IndicoImportHandler diff --git a/handlers/import_handlers/indico.py b/handlers/import_handlers/indico.py new file mode 100644 index 0000000..bb994e7 --- /dev/null +++ b/handlers/import_handlers/indico.py @@ -0,0 +1,109 @@ +import json +import logging +import datetime as dt + +from pytz import timezone + +from ..base import ImportHandler +from fahrplan.datetime import parse_date, parse_time, parse_duration +from fahrplan.exception import FahrplanError +from fahrplan.model.conference import Conference +from fahrplan.model.event import Event +from fahrplan.model.schedule import Schedule +from fahrplan.slug import StandardSlugGenerator +from hacks import noexcept + + +log = logging.getLogger(__name__) + + +class IndicoImportHandler(ImportHandler): + """Imports data from Indico JSON exports. + + See https://docs.getindico.io/en/latest/http-api/ for more info. + """ + + @noexcept(log) + def run(self) -> Schedule: + if 'path' not in self.config: + raise Error('Path to exported Indico JSON must be provided in the config file.') + + with open(self.config['path']) as f: + indico_json = json.load(f)['results'][0] + + conference = Conference( + title=self.global_config.get('conference', 'title'), + acronym=self.global_config.get('conference', 'acronym'), + day_count=int(self.global_config.get('conference', 'day_count')), + start=parse_date(self.global_config.get('conference', 'start')), + end=parse_date(self.global_config.get('conference', 'end')), + time_slot_duration=parse_duration(self.global_config.get('conference', 'time_slot_duration')) + ) + + schedule = Schedule(conference=conference) + language = self.global_config.get('conference', 'language') + license = self.global_config.get('conference', 'license') + fallback_speakers = { + 0: self.global_config.get('conference', 'fallback_speaker') + } + + slugifier = StandardSlugGenerator(conference) + + for co in indico_json['contributions']: + start_dt = self.parse_indico_date(co['startDate']) + room = co['roomFullname'] or co['room'] or co['location'] or "Unknown" + day = (start_dt.date() - conference.start).days + 1 + + event = Event( + uid=co['friendly_id'], + date=start_dt, + start=start_dt.time(), + duration=dt.timedelta(minutes=co['duration']), + title=co['title'].strip(), + language=language, + slug=slugifier, + persons=self.collect_speakers( + fallback_speakers, # In case there's nobody defined here... + + # Coauthors are generally not speakers. Event metadata is often + # broken and has primary authors only, no speakers, so combine + # these and force uniqueness: + *co['speakers'], + *co['primaryauthors'], + ), + + description=co['description'].strip(), + links={"Indico Contribution Page": co['url']}, + recording_license=license, + + # Indico has this swapped around: + track=co['session'] or "", + event_type=co['track'] or "", + ) + + schedule.add_room(room) + schedule.add_event(day, room, event) + + return schedule + + @staticmethod + def parse_indico_date(indico_date: dict) -> dt.datetime: + try: + date = parse_date(indico_date['date']) + time = parse_time(indico_date['time']) + tz = timezone(indico_date['tz']) + return dt.datetime.combine(date, time, tzinfo=tz) + except ValueError: + raise FahrplanError(f"{indico_date} is not a valid Indico date") + + @staticmethod + def collect_speakers(fallback_speakers, *speakers) -> list[str]: + # We can't just list(set([f"..." for s in speakers])) because + # the native Python set is unordered and we need that. + parsed = {} + + for s in speakers: + if s['person_id'] not in parsed: + parsed[s['person_id']] = f"{s['first_name'].strip()} {s['last_name'].strip()}" + + return parsed if len(parsed) > 0 else fallback_speakers diff --git a/requirements.txt b/requirements.txt index d6e6e18..99a3f62 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ -translitcodec \ No newline at end of file +pytz +translitcodec From 7420eedd82369044416dc28443a0d3adad1450ef Mon Sep 17 00:00:00 2001 From: Ryszard Knop Date: Sun, 12 Sep 2021 20:33:29 +0200 Subject: [PATCH 2/3] Calculate the fallback speaker ID for invalid events For Indico contributions where no people are set as speakers/organizers, we need to set a fallback group (something like "Event Organizers"). The ID must be a positive int > 0, so let's figure out the highest available ID and make the fallback ID that max + 1. --- handlers/import_handlers/indico.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/handlers/import_handlers/indico.py b/handlers/import_handlers/indico.py index bb994e7..f2135c9 100644 --- a/handlers/import_handlers/indico.py +++ b/handlers/import_handlers/indico.py @@ -43,12 +43,20 @@ def run(self) -> Schedule: schedule = Schedule(conference=conference) language = self.global_config.get('conference', 'language') license = self.global_config.get('conference', 'license') - fallback_speakers = { - 0: self.global_config.get('conference', 'fallback_speaker') - } slugifier = StandardSlugGenerator(conference) + speaker_ids = set() + for co in indico_json['contributions']: + people = co['speakers'] + co['primaryauthors'] + co['coauthors'] + for person in people: + speaker_ids.add(person['person_id']) + + fallback_speaker_id = max(speaker_ids) + 1 + fallback_speakers = { + fallback_speaker_id: self.global_config.get('conference', 'fallback_speaker') + } + for co in indico_json['contributions']: start_dt = self.parse_indico_date(co['startDate']) room = co['roomFullname'] or co['room'] or co['location'] or "Unknown" From ad354c358e4e50d676c595137e7ffb1ac03f4664 Mon Sep 17 00:00:00 2001 From: Ryszard Knop Date: Sun, 12 Sep 2021 21:30:34 +0200 Subject: [PATCH 3/3] Add configurable track to room name mapping --- demo/indico.ini | 6 ++++++ handlers/import_handlers/indico.py | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/demo/indico.ini b/demo/indico.ini index f844ca5..3ce29af 100644 --- a/demo/indico.ini +++ b/demo/indico.ini @@ -18,6 +18,12 @@ license = CC-BY 4.0 language = en fallback_speaker = XDC 2021 Organizers +[track2room] +Main Track = Conference +Demos / Lightning talks I = Conference +Demos / Lightning talks II = Conference +Workshop = Workshops + [import] active = indico diff --git a/handlers/import_handlers/indico.py b/handlers/import_handlers/indico.py index f2135c9..bbc6bcd 100644 --- a/handlers/import_handlers/indico.py +++ b/handlers/import_handlers/indico.py @@ -59,9 +59,13 @@ def run(self) -> Schedule: for co in indico_json['contributions']: start_dt = self.parse_indico_date(co['startDate']) - room = co['roomFullname'] or co['room'] or co['location'] or "Unknown" day = (start_dt.date() - conference.start).days + 1 + # For talks with no proper room attached, try to get a valid + # name from the config [track2room], session -> room name. + room = co['roomFullname'] or co['room'] or co['location'] or \ + self.global_config.get('track2room', co['session'].strip(), fallback="Unknown") + event = Event( uid=co['friendly_id'], date=start_dt,