Skip to content

Commit 624d124

Browse files
authored
Merge pull request BlackPythonDevs#70 from oleksis/oleksis/issue53
Create GitHub Issue template to add a conference
2 parents 5c2d7db + 8434e25 commit 624d124

File tree

8 files changed

+239
-43
lines changed

8 files changed

+239
-43
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Add Conference
2+
description: Add Conference dates, location, speaking and other information that you would like shared
3+
title: "[CONFERENCE] <CONFERENCE NAME> YYYY"
4+
labels: ["conference"]
5+
body:
6+
- type: input
7+
id: conference_name
8+
attributes:
9+
label: Conference Name
10+
description: The name of the conference.
11+
placeholder: <CONFERENCE NAME>
12+
validations:
13+
required: true
14+
- type: input
15+
attributes:
16+
label: URL
17+
description: The URL of the conference.
18+
placeholder: https://example.com
19+
validations:
20+
required: true
21+
- type: input
22+
id: conference_dates
23+
attributes:
24+
label: Conference Dates
25+
description: The start and end date of the conference.
26+
placeholder: "DD (MMM) -DD MMM YYYY"
27+
- type: dropdown
28+
id: conference_type
29+
attributes:
30+
label: Conference Type
31+
description: Is the conference in-person online or both?
32+
options: ["both", "in-person", "online"]
33+
validations:
34+
required: true
35+
- type: input
36+
id: conference_location
37+
attributes:
38+
label: Conference Location
39+
description: The location of the conference. Leave blank if online only
40+
placeholder: "CITY, <REGION>, COUNTRY"
41+
validations:
42+
required: false
43+
- type: textarea
44+
id: conference_description
45+
attributes:
46+
label: Summary
47+
description: Summary of the news you're sharing about this conference.
48+
placeholder: |
49+
DjangoCon US has been announced alongside it's [website](url).
50+
The conference is 16-20 October, is a five-day international
51+
conference for the community by the community about the Django
52+
web framework, held each year in North America.
53+
validations:
54+
required: false
55+
- type: textarea
56+
id: conference_speaking
57+
attributes:
58+
label: Speaking
59+
description: Person - Talk or Role
60+
placeholder: |
61+
* Dawn Wages - Supercharge your Python and Django Development Environment with VS Code and Dev Containers
62+
* Kojo Idrissa - Orientation/Welcome & Lightning Talks Host
63+
* Jay Miller - Panel Discussion: Who put me in charge? Moving beyond day-to-day coding in Django
64+
validations:
65+
required: false
66+
- type: checkboxes
67+
id: terms
68+
attributes:
69+
label: Code of Conduct
70+
description: By submitting this form, you agree to follow our [Code of Conduct](https://github.com/BlackPythonDevs/.github/blob/main/CODE_OF_CONDUCT.md)
71+
options:
72+
- label: I agree to follow this project's Code of Conduct
73+
required: true

.github/workflows/conference.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Conference Workflow
2+
on:
3+
push:
4+
branches:
5+
- "**/issue**"
6+
issues:
7+
types: [opened, closed, edited, deleted]
8+
workflow_dispatch:
9+
10+
jobs:
11+
conference-job:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
- name: Setup Python environment
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.11"
21+
22+
- name: Install dependencies
23+
run: pip install PyGithub pre-commit
24+
25+
- name: Run script
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
run: |
29+
python _conferences
30+
pre-commit run --all-files --show-diff-on-failure
31+
32+
- name: Commit and push if it changed
33+
run: |
34+
git diff
35+
git config --global user.email "[email protected]"
36+
git config --global user.name "GitHub Action"
37+
git commit -am "Update conferences" || exit 0
38+
git push

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ repos:
2626
rev: v0.0.292
2727
hooks:
2828
- id: ruff
29-
args: [--fix, --exit-non-zero-on-fix]
29+
args: ["--ignore=E501", --fix, --exit-non-zero-on-fix]
3030
- repo: https://github.com/psf/black
3131
rev: 23.9.1
3232
hooks:

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ _includes/header.html
66
_includes/social.html
77
_includes/social-item.html
88
_includes/svg_symbol.html
9+
conferences.md

_conferences/__main__.py

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import os
2+
import re
3+
from datetime import datetime
4+
from pathlib import Path
5+
6+
from github import Auth, Github
7+
8+
TOKEN = os.getenv("GITHUB_TOKEN", "")
9+
ROOT = Path(__file__).parent.parent
10+
conferences_path = ROOT / "conferences.md"
11+
12+
auth = Auth.Token(TOKEN)
13+
g = Github(auth=auth)
14+
15+
repo = g.get_repo("oleksis/blackpythondevs.com")
16+
open_issues = repo.get_issues(state="open", labels=["conference"])
17+
18+
markdownContent = ""
19+
20+
for issue in open_issues:
21+
# print(issue.title)
22+
if "conference" in [label.name for label in issue.labels]:
23+
# print(repr(issue.body))
24+
# Extract fields from issue body
25+
name_match = re.search(
26+
r"Conference Name(?:\r\n|\n){2}(.*?)(?:\r\n|\n){2}", issue.body
27+
)
28+
url_match = re.search(r"URL(?:\r\n|\n){2}(.*?)(?:\r\n|\n){2}", issue.body)
29+
dates_match = re.search(
30+
r"Conference Dates(?:\r\n|\n){2}(.*?)(?:\r\n|\n){2}", issue.body
31+
)
32+
type_match = re.search(
33+
r"Conference Type(?:\r\n|\n){2}(.*?)(?:\r\n|\n){2}", issue.body
34+
)
35+
location_match = re.search(
36+
r"Conference Location(?:\r\n|\n){2}(.*?)(?:\r\n|\n){2}", issue.body
37+
)
38+
summary_match = re.search(
39+
r"Summary(?:\r\n|\n){2}(.*?)(?:\r\n|\n){2}",
40+
issue.body,
41+
re.DOTALL,
42+
)
43+
speaking_match = re.search(
44+
r"Speaking(?:\r\n|\n){2}(.*?)(?:\r\n|\n){2}### Code of Conduct(?:\r\n|\n){2}",
45+
issue.body,
46+
re.DOTALL,
47+
)
48+
49+
if dates_match:
50+
conferenceDates = dates_match.group(1)
51+
# Parse the end date of the conference
52+
endDateStr = conferenceDates.split("-")[1].strip()
53+
endDate = datetime.strptime(endDateStr, "%d %b %Y")
54+
# Check if the conference end date is greater than today
55+
if endDate > datetime.now():
56+
markdownContent += f"""
57+
## {name_match.group(1)} ({dates_match.group(1)}) - {location_match.group(1)}
58+
59+
{summary_match.group(1)}
60+
61+
### Speaking
62+
63+
{speaking_match.group(1)}
64+
"""
65+
66+
if markdownContent == "":
67+
markdownContent = "No conferences"
68+
69+
with conferences_path.open("r") as f:
70+
content = f.read()
71+
72+
newContent = re.sub(
73+
r"<!-- conferences starts -->.*<!-- conferences ends -->",
74+
f"<!-- conferences starts -->\n{markdownContent}\n<!-- conferences ends -->",
75+
content,
76+
flags=re.DOTALL,
77+
)
78+
79+
# Write the new content to the file
80+
with conferences_path.open("w") as f:
81+
f.write(newContent)

conferences.md

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -28,53 +28,55 @@ ONE SENTENCE DESCRIPTION OF THE CONFERENCE. Be sure to link to the conference it
2828

2929
Here are some highlighted upcoming conferences where you can find Black Python Developers involved on stage or behind the scenes
3030

31-
## DjangoCon US (16-20 October 2023) - Durham, NC, USA
31+
<!-- conferences starts -->
3232

33-
[DjangoCon US](https://2023.djangocon.us/) is a five-day international conference for the community by the community about the Django web framework, held each year in North America.
33+
## DjangoCon Africa ( 6 nov - 11 Nov 2023) - Zanzibar, Tanzania
3434

35-
### Speaking:
35+
DjangoCon Africa will include 3 days of single-track talks, 2 days of workshops and sprints, through a total of 27 speakers, and one day of touring for international visitors. [Link here](https://2023.djangocon.africa/news/announcing-djangocon-africa-2023/)
3636

37-
- Dawn Wages - Supercharge your Python and Django Development Environment with VS Code and Dev Containers
38-
- Kojo Idrissa - Orientation/Welcome & Lightning Talks Host
39-
- Abigail Mesrenyame Dogbe - Keynote: Finding Purpose in Open Source Through Community Building
40-
- Velda Kiara - Building Powerful APIs with Django, Django Rest Framework, and OpenAPI
41-
- Felipe de Morais - AfroPython: Using Django to change black people's life in Brazil
42-
- Abigail Afi Gbadago - Strategies for handling conflicts and rollbacks in Django database migrations
43-
- Victor Ogunjobi - Nothing for Us, Without Us; Breaking Unconscious Bias in Building Products
44-
- Jay Miller - Panel Discussion: Who put me in charge? Moving beyond day-to-day coding in Django
37+
### Speaking
4538

46-
## DjangoCon Africa (6th - 11th November 2023) - Zanzibar, Tanzania
39+
- Anna Makarudze - Empowering Minorities in Tech Communities and Promoting Inclusivity.
40+
- Atieno Ouma - Improving Django Queryset Optimization with DRY Principles.
41+
- Brayan Kai Mwanyumba - Fostering Inclusion in Open Source: Opportunities for Individuals with Disabilities.
42+
- Busola Marcus - Unleashing the Potential of Remote Work for African Tech Professionals.
43+
- Chris Achinga - Workshop: Building Authentication APIs with Django.
44+
- Daniele Procida - Exploring the Parallels Between Music, Software, and African Culture.
45+
- Dawn Wages - Enhancing Python/Django Development with Visual Studio Code's Dev Containers.
46+
- Eric Odhiambo - Optimizing Django Admin with Typesense for Large Datasets.
47+
- Eva Nanyonga - Mastering API Testing in Django.
48+
- Flavio Percoco - Bringing Your Software Ideas to Life.
49+
- Fuad Habib - Django: Empowering African Youth for Entrepreneurship and Job Creation.
50+
- Honza Kral - Transforming Software Ideas into Reality: A Django Core Contributor's Perspective.
51+
- Jon Atkinson - Rethinking Cloud as the Default: Exploring Simpler Deployment Options.
52+
- Joseph Adediji - Unleashing the Full Potential of Django's Management Commands for Creative Solutions.
53+
- Joseph Sowah - Workshop: Building, Deploying, and Automating Django Apps on Cloud Infrastructure.
54+
- Kojo Idrissa - Keynote: Global Patterns in Problem-Solving.
55+
- Lidya Tilahun - E-Farming: Advancing Rural Farmers' Interests through Digital Agriculture.
56+
- Mariam Muhammed - Enhancing Django's Performance with Caching Strategies.
57+
- Mariusz Felisiak - Exploring the Depths of Django ORM Lookups.
58+
- Omotola Omotayo - Navigating Career Paths in Open-Source Software: Insights from Outreachy Community Manager.
59+
- Robson Kanhalelo - Workshop: Building Real-Time Space Data Web Applications with Python and Django.
60+
- Ruth Ikegah - Open Source Career Opportunities: A Path to New Horizons.
61+
- Samweli Twesa Mwakisambwe - Harnessing Open-Source Python Tools for Geospatial Data Visualization and Analysis.
62+
- Sheena O'Connell - Adapting to COVID Disruptions with Django: Umuzi's Journey.
63+
- Tahaa Farooq - Building Security Tools with Django: Web Application for Security Scans.
64+
- Victor Jotham Ashioya - Workshop: Deploying Machine Learning Models with Django.
65+
- Vuyisile Ndlovu - Mastering Debugging: Systematic Approaches and Python Tools for Developers.
4766

48-
DjangoCon Africa will include 3 days of single-track talks, 2 days of workshops and sprints, through a total of 27 speakers, and one day of touring for international visitors. [Link here](https://2023.djangocon.africa/news/announcing-djangocon-africa-2023/)
67+
## DjangoCon US (16 Oct - 20 Oct 2023) - Durham, NC, USA
4968

50-
The event will also include a Django Girls workshop to be held the weekend before DjangoCon Africa. To make the conference as inclusive as possible, the event will offer financial aid to members of under-represented communities in software to ensure they can also attend.
69+
[DjangoCon US](https://2023.djangocon.us/) is a five-day international conference for the community by the community about the Django web framework, held each year in North America.
5170

5271
### Speaking
5372

54-
- Anna Makarudze - Empowering Minorities in Tech Communities and Promoting Inclusivity.
55-
- Atieno Ouma - Improving Django Queryset Optimization with DRY Principles.
56-
- Brayan Kai Mwanyumba - Fostering Inclusion in Open Source: Opportunities for Individuals with Disabilities.
57-
- Busola Marcus - Unleashing the Potential of Remote Work for African Tech Professionals.
58-
- Chris Achinga - Workshop: Building Authentication APIs with Django.
59-
- Daniele Procida - Exploring the Parallels Between Music, Software, and African Culture.
60-
- Dawn Wages - Enhancing Python/Django Development with Visual Studio Code's Dev Containers.
61-
- Eric Odhiambo - Optimizing Django Admin with Typesense for Large Datasets.
62-
- Eva Nanyonga - Mastering API Testing in Django.
63-
- Flavio Percoco - Bringing Your Software Ideas to Life.
64-
- Fuad Habib - Django: Empowering African Youth for Entrepreneurship and Job Creation.
65-
- Honza Kral - Transforming Software Ideas into Reality: A Django Core Contributor's Perspective.
66-
- Jon Atkinson - Rethinking Cloud as the Default: Exploring Simpler Deployment Options.
67-
- Joseph Adediji - Unleashing the Full Potential of Django's Management Commands for Creative Solutions.
68-
- Joseph Sowah - Workshop: Building, Deploying, and Automating Django Apps on Cloud Infrastructure.
69-
- Kojo Idrissa - Keynote: Global Patterns in Problem-Solving.
70-
- Lidya Tilahun - E-Farming: Advancing Rural Farmers' Interests through Digital Agriculture.
71-
- Mariam Muhammed - Enhancing Django's Performance with Caching Strategies.
72-
- Mariusz Felisiak - Exploring the Depths of Django ORM Lookups.
73-
- Omotola Omotayo - Navigating Career Paths in Open-Source Software: Insights from Outreachy Community Manager.
74-
- Robson Kanhalelo - Workshop: Building Real-Time Space Data Web Applications with Python and Django.
75-
- Ruth Ikegah - Open Source Career Opportunities: A Path to New Horizons.
76-
- Samweli Twesa Mwakisambwe - Harnessing Open-Source Python Tools for Geospatial Data Visualization and Analysis.
77-
- Sheena O'Connell - Adapting to COVID Disruptions with Django: Umuzi's Journey.
78-
- Tahaa Farooq - Building Security Tools with Django: Web Application for Security Scans.
79-
- Victor Jotham Ashioya - Workshop: Deploying Machine Learning Models with Django.
80-
- Vuyisile Ndlovu - Mastering Debugging: Systematic Approaches and Python Tools for Developers.
73+
- Dawn Wages - Supercharge your Python and Django Development Environment with VS Code and Dev Containers
74+
- Kojo Idrissa - Orientation/Welcome & Lightning Talks Host
75+
- Abigail Mesrenyame Dogbe - Keynote: Finding Purpose in Open Source Through Community Building
76+
- Velda Kiara - Building Powerful APIs with Django, Django Rest Framework, and OpenAPI
77+
- Felipe de Morais - AfroPython: Using Django to change black people's life in Brazil
78+
- Abigail Afi Gbadago - Strategies for handling conflicts and rollbacks in Django database migrations
79+
- Victor Ogunjobi - Nothing for Us, Without Us; Breaking Unconscious Bias in Building Products
80+
- Jay Miller - Panel Discussion: Who put me in charge? Moving beyond day-to-day coding in Django
81+
82+
<!-- conferences ends -->

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[pytest]
2-
python_files = *.py
2+
python_files = tests/*.py
33
addopts = -v

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
black
22
pre-commit
33
pytest-playwright
4+
PyGithub

0 commit comments

Comments
 (0)