Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ repos:
args: [--config, ./.codespellrc]

- repo: https://github.com/pycqa/isort
rev: 7.0.0
rev: 8.0.0
hooks:
- id: isort
args: [--profile, black]

- repo: https://github.com/psf/black-pre-commit-mirror
rev: "25.12.0"
rev: "26.1.0"
hooks:
- id: black

Expand Down
12 changes: 4 additions & 8 deletions scripts/create_projects_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,9 @@ def labels_to_rename():
"topic:PCA": ["PCA"],
}
for key in LABELS_TO_RENAME:
log.info(
f"""Renaming {LABELS_TO_RENAME[key]}
log.info(f"""Renaming {LABELS_TO_RENAME[key]}
to '{key}'
"""
)
""")
return LABELS_TO_RENAME


Expand Down Expand Up @@ -238,12 +236,10 @@ def get_project_site(this_hackathon, sites, labels):
site = find_site_in_labels(sites, labels)

if site is None:
log.warning(
f"""Could not find site for:
log.warning(f"""Could not find site for:
- name: {this_hackathon['name']}
- labels: {labels}
- details: {this_hackathon}"""
)
- details: {this_hackathon}""")
site = "n/a"

return site
Expand Down
8 changes: 3 additions & 5 deletions scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ def find_coordinates_event(event_city: str, brainhack_sites: pd.DataFrame) -> tu
if this_city.sum() == 0:
log.warning(f"Could not find {event_city} in brainhack-sites.csv")
if this_city.sum() > 1:
log.warning(
f"""Found several cities for {event_city} in brainhack-sites.csv:
Evidence: {brainhack_sites[this_city]}"""
)
log.warning(f"""Found several cities for {event_city} in brainhack-sites.csv:
Evidence: {brainhack_sites[this_city]}""")
else:
lat = brainhack_sites[this_city]["lat"].values
lon = brainhack_sites[this_city]["lon"].values
Expand All @@ -71,7 +69,7 @@ def get_timeline() -> pd.DataFrame:
# Find coordinates for each event and drop it if not found
coordinates = {"lat": [], "lon": []}
for row in timeline.itertuples():
(lat, lon) = find_coordinates_event(row.City, brainhack_sites)
lat, lon = find_coordinates_event(row.City, brainhack_sites)
if len(lat) > 0 and len(lon) > 0:
coordinates["lat"].append(lat[0])
coordinates["lon"].append(lon[0])
Expand Down
Loading