Skip to content

Commit b801110

Browse files
deploy: 30e91fe
1 parent 1bfc562 commit b801110

52 files changed

Lines changed: 26667 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

preview/pr-37/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Ajith Suresh
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

preview/pr-37/README.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# 🚀 MPC Deadlines Hub
2+
3+
Welcome to the **MPC Deadlines Hub**, your one-stop destination for keeping track of the latest deadlines for top Multi-Party Computation (MPC) conferences, journals, and workshops! 📅✨
4+
5+
## 🤔 What is MPC?
6+
7+
Secure Multi-party Computation (MPC) allows a set of mutually distrusting parties to perform a joint computation over their private inputs while preserving the privacy of their individual inputs. Curious to learn more? Check out this **[MPC overview](https://eprint.iacr.org/2020/300)**! 🔍🔐
8+
9+
## 🚀 Adding/updating a conference
10+
11+
Want to contribute? Awesome! Here’s how:
12+
13+
* Read the data format description below. **Note that the timezone format sign is inverted** (e.g., UTC+7 is written as `Etc/GMT-7`). It's [not a bug][0]. Yeah, we know—it’s weird. If you have a better JavaScript timezone library in mind, hit us up! 😅
14+
* Update `_data/conferences.yml`. You can do this directly on GitHub or locally after forking the repo.
15+
* Send a pull request. 🎉
16+
17+
💡 **Too lazy to create a pull request?** No worries! Drop a message on our **[Telegram Group](https://t.me/+sm414tMmhGhhNTA0)** 📢, and we’ll update the entries for you! 😎🚀
18+
19+
### ✅ Is my entry in scope?
20+
21+
This page is meant to host academic conferences, journals, workshops, and related event deadlines.
22+
23+
Ask yourself these questions before adding an entry:
24+
25+
- 📝 Is there a "Call For Papers"? A submission link? Formatting guidelines (page limits, style guides, etc.)?
26+
- 🔐 Does it mention 'secure multi-party computation', 'MPC', or 'privacy-preserving computing' in its topics?
27+
- 🧐 Is there a peer-review process? Are there named general/program chairs or a program committee?
28+
29+
If you answered **YES** to all of the above, congratulations! Your conference/workshop is a great fit! 🎯
30+
31+
### 🏆 Conference entry record
32+
33+
Example record:
34+
35+
```
36+
- name: ACM CCS
37+
description: ACM Conference on Computer and Communications Security
38+
year: 2025
39+
link: https://www.sigsac.org/ccs/CCS2025/
40+
abdeadline: Jan 02, Apr 07
41+
deadline:
42+
- "2025-01-09 23:59"
43+
- "2025-04-14 23:59"
44+
rebut: March 06-19, June 09-22
45+
date: October 13-17
46+
place: Taipei, Taiwan
47+
comment: 2 deadlines. Notifications - March 27, June 30.
48+
tags: [PRACT, APPLIED, CNF, COREAS]
49+
```
50+
51+
📌 **Notes:**
52+
53+
- For an event with a **single deadline**, make sure to put the deadline in square brackets, like this:
54+
```
55+
deadline: ["2025-04-01 23:59"]
56+
```
57+
- Not all fields are mandatory! Just add the relevant ones. 😊
58+
59+
- The events are listed in alphabetical order grouped by the categories. Please make sure to have consistency while updating the entries.
60+
61+
62+
### 🔍 Field descriptions
63+
64+
| Field name | Description |
65+
|--------------|-------------------------------------------------------------|
66+
| `name`* | Short conference name (no year) |
67+
| `description` | Long name or a brief description |
68+
| `year`* | Year the conference is happening |
69+
| `link`* | URL to the conference homepage |
70+
| `abdeadline` | Registration and/or abstract deadline. |
71+
| `deadline`* | Submission deadline(s) |
72+
| `rebut` | Rebuttal window |
73+
| `timezone` | Timezone in [tz][1] format (Default: UTC-12, [AoE][2]) |
74+
| `date` | When the conference is happening |
75+
| `place` | Conference location |
76+
| `tags` | One or more tags as detailed below. |
77+
78+
📌 **Please try to maintain consistency in the order of the fields when updating an entry.**
79+
80+
#### 📌 Special Case of Workshops
81+
82+
Workshops can be a bit special! Here’s what to keep in mind when adding them:
83+
84+
- If the workshop is **affiliated with a conference**, make sure to add the `conference` tag, specifying the name of the main conference. For example:
85+
```
86+
conference: CCS.
87+
```
88+
This helps keep things clear and organized! 🔍
89+
90+
91+
### 🏷️ Tags - Shortlisting Made Easy! 🚀
92+
93+
We use three sets of tags that act as filters to help you quickly find relevant entries.
94+
95+
- **First filter**: Research Domain (e.g., THEORY, PRACT, APPLIED, etc.)
96+
- **Second filter**: Publication Type (e.g., CNF, JRN, WK, PS, etc.)
97+
- **Third filter**: [CORE](https://portal.core.edu.au/conf-ranks/) Ranking (e.g., COREAS, COREA, COREB, etc.)
98+
99+
For the full list of tags, check out [`/_data/filters.yml`](https://github.com/mpc-deadlines/mpc-deadlines.github.io/blob/main/_data/filters.yml). 🏷️
100+
101+
#### 🔥 Special Case: `EXP` Tag
102+
103+
For an event that has been **announced** but the Call for Papers is **not yet available**, you can still add an entry! Just make sure to:
104+
- Include the `EXP` tag.
105+
- Fill in details based on the **previous year’s** event.
106+
- This will internally set some of the fields to default placeholder values (e.g., `comment: "CFP yet to be announced"`).
107+
108+
#### 🔥 Special Case: `EXPCFP` Tag
109+
110+
Sometimes, an event is already **confirmed** and has public details like **dates, location, and venue**, but the **CFP hasn't been published yet**. In this case, use the `EXPCFP` tag.
111+
112+
- This is a more specific version of the `EXP` tag.
113+
- Use `EXPCFP` when the event is definitely happening, but the CFP is **not yet available**.
114+
- As with `EXP`, base your entry on the most recent available details.
115+
116+
This helps signal to others that the event is expected, even though submission details are still pending. 🔍
117+
118+
🔥 **Let's make MPC deadlines easy to track—together!** 🚀
119+
120+
121+
## 🙏 Acknowledgements
122+
123+
Thanks to the amazing **[sec-deadlines](https://sec-deadlines.github.io)** page, which inspired the initial version of this hub. 🙌

preview/pr-37/bot/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM python:3.11-slim
2+
3+
WORKDIR /app
4+
5+
COPY requirements.txt .
6+
RUN pip install --no-cache-dir -r requirements.txt
7+
8+
COPY . .
9+
10+
CMD ["python", "bot.py"]

preview/pr-37/bot/README.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# MPC Deadlines Telegram Bot
2+
3+
Watches the [@mpc_deadlines](https://t.me/mpc_deadlines) channel. When anyone posts a conference URL it automatically:
4+
5+
1. Scrapes the page
6+
2. Looks up any prior-year entry in `conferences.yml` (to inherit stable tags)
7+
3. Asks Groq (Llama 3.3 70B) to extract structured data and assign tags
8+
4. Scope-checks the event (CFP + MPC topics + peer review)
9+
5. Inserts or upgrades the entry (EXP → EXPCFP → FULL) in alphabetical order
10+
6. Opens a GitHub PR for human review
11+
7. Replies in the channel with the PR link
12+
13+
---
14+
15+
## Setup
16+
17+
### 1. Create the Telegram bot
18+
19+
1. Message [@BotFather](https://t.me/BotFather)`/newbot`
20+
2. Copy the token into `.env` as `TELEGRAM_BOT_TOKEN`
21+
3. Add the bot to the channel as an **admin** with "Post Messages" permission
22+
23+
Get the channel's numeric ID by forwarding any channel message to [@userinfobot](https://t.me/userinfobot), then add it to `ALLOWED_CHATS`.
24+
25+
### 2. Get a Groq API key
26+
27+
1. Sign up free at [console.groq.com](https://console.groq.com)
28+
2. Go to **API Keys****Create API Key**
29+
3. Copy the key into `.env` as `GROQ_API_KEY`
30+
31+
No credit card required — Groq has a free tier.
32+
33+
### 3. Create a GitHub fine-grained PAT
34+
35+
Go to **GitHub → Settings → Developer settings → Fine-grained tokens**.
36+
Grant on `mpc-deadlines/mpc-deadlines.github.io`:
37+
- **Contents**: Read & Write
38+
- **Pull requests**: Read & Write
39+
40+
### 3. Configure environment
41+
42+
```bash
43+
cp .env.example .env
44+
# Fill in all four secrets
45+
```
46+
47+
### 4. Run
48+
49+
**Docker (recommended):**
50+
```bash
51+
docker compose up -d
52+
```
53+
54+
**Local:**
55+
```bash
56+
pip install -r requirements.txt
57+
python bot.py
58+
```
59+
60+
---
61+
62+
## How tags are assigned
63+
64+
| Tag set | Source |
65+
|---|---|
66+
| Domain (THEORY / PRACT / APPLIED / …) | Copied from prior-year entry; otherwise inferred from CFP topics |
67+
| Type (CNF / JRN / WK / …) | Copied from prior-year entry; otherwise inferred from event format |
68+
| CORE rank (COREAS / COREA / …) | **Always copied from prior-year entry** — CORE rankings don't change. If no prior entry, Claude infers from its training knowledge |
69+
| Status (EXP / EXPCFP) | Determined from what the page contains: full CFP → no tag; dates/venue but no deadline → EXPCFP; announcement only → EXP |
70+
71+
## EXP / EXPCFP logic
72+
73+
```
74+
Page has submission deadline? ──Yes──▶ FULL (no status tag)
75+
76+
No
77+
78+
Page has confirmed dates/venue? ──Yes──▶ EXPCFP
79+
80+
No
81+
82+
83+
EXP
84+
```
85+
86+
For EXP and EXPCFP entries the bot fills in as much as possible from the page (or prior year), sets `deadline: [TBD]`, and adds an appropriate `comment`.
87+
88+
---
89+
90+
## File structure
91+
92+
```
93+
bot/
94+
├── bot.py # Telegram bot entry point
95+
├── pipeline.py # Orchestration (scrape → extract → PR)
96+
├── scraper.py # Web page fetcher / cleaner
97+
├── extractor.py # Claude-powered structured extraction
98+
├── yaml_handler.py # conferences.yml read / insert / update
99+
├── github_pr.py # GitHub branch + commit + PR creation
100+
├── config.py # Environment variable loading
101+
├── requirements.txt
102+
├── Dockerfile
103+
├── docker-compose.yml
104+
└── .env.example
105+
```

preview/pr-37/bot/bot.py

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
"""
2+
Telegram bot entry point.
3+
4+
The bot listens for messages in any configured chat (channel, group, or DM).
5+
When a message contains a URL it kicks off the full pipeline and replies
6+
with a PR link or an error explanation.
7+
"""
8+
from __future__ import annotations
9+
10+
import asyncio
11+
import logging
12+
import re
13+
14+
from telegram import Update
15+
from telegram.error import Conflict
16+
from telegram.ext import (
17+
Application,
18+
MessageHandler,
19+
filters,
20+
ContextTypes,
21+
)
22+
23+
from config import TELEGRAM_BOT_TOKEN, ALLOWED_CHATS
24+
from pipeline import process_url
25+
26+
logging.basicConfig(
27+
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
28+
level=logging.INFO,
29+
)
30+
logger = logging.getLogger(__name__)
31+
32+
_URL_RE = re.compile(r"https?://[^\s<>\"']+")
33+
34+
35+
def _is_allowed(update: Update) -> bool:
36+
"""Return True if this chat is in the allowed list (or no list is configured)."""
37+
if not ALLOWED_CHATS:
38+
return True
39+
chat = update.effective_chat
40+
if chat is None:
41+
return False
42+
allowed_by_id = str(chat.id) in ALLOWED_CHATS
43+
allowed_by_username = bool(chat.username) and f"@{chat.username}" in ALLOWED_CHATS
44+
return allowed_by_id or allowed_by_username
45+
46+
47+
async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
48+
message = update.channel_post or update.message
49+
if not message:
50+
return
51+
if not _is_allowed(update):
52+
return
53+
54+
text = message.text or message.caption or ""
55+
urls = _URL_RE.findall(text)
56+
if not urls:
57+
return
58+
59+
# Process first URL in the message; strip trailing punctuation
60+
url = urls[0].rstrip(".,)")
61+
logger.info("Processing URL: %s", url)
62+
63+
# Build a link back to the Telegram message for the PR body
64+
chat = update.effective_chat
65+
msg_link = ""
66+
if chat and chat.username:
67+
msg_link = f"https://t.me/{chat.username}/{message.message_id}"
68+
69+
reply = await process_url(url, msg_link)
70+
71+
await message.reply_text(
72+
reply,
73+
parse_mode="HTML",
74+
disable_web_page_preview=True,
75+
)
76+
77+
78+
async def handle_error(update: object, context: ContextTypes.DEFAULT_TYPE) -> None:
79+
"""
80+
Global error handler.
81+
- Conflict (409): Railway started the new container before the old one stopped.
82+
Wait 15 s for the old instance to exit, then polling resumes automatically.
83+
- Everything else: log it.
84+
"""
85+
if isinstance(context.error, Conflict):
86+
logger.warning(
87+
"409 Conflict — previous instance still shutting down. "
88+
"Waiting 15 s before resuming polling…"
89+
)
90+
await asyncio.sleep(15)
91+
return
92+
93+
logger.error("Unhandled error: %s", context.error, exc_info=context.error)
94+
95+
96+
def main() -> None:
97+
app = Application.builder().token(TELEGRAM_BOT_TOKEN).build()
98+
99+
app.add_handler(
100+
MessageHandler(
101+
(
102+
filters.ChatType.CHANNEL
103+
| filters.ChatType.GROUPS
104+
| filters.ChatType.PRIVATE
105+
)
106+
& (filters.TEXT | filters.CAPTION),
107+
handle_message,
108+
)
109+
)
110+
app.add_error_handler(handle_error)
111+
112+
logger.info("MPC Deadlines bot started. Polling for updates...")
113+
app.run_polling(allowed_updates=["channel_post", "message"])
114+
115+
116+
if __name__ == "__main__":
117+
main()

0 commit comments

Comments
 (0)