Skip to content

Update events page#696

Open
davehorsfall wants to merge 2 commits into
mainfrom
feat/events-update
Open

Update events page#696
davehorsfall wants to merge 2 commits into
mainfrom
feat/events-update

Conversation

@davehorsfall
Copy link
Copy Markdown
Collaborator

@davehorsfall davehorsfall commented Apr 17, 2026

Description

This PR updates the existing events page, populating each event with more details.

image

Fixes # (issue)

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature (non-breaking change which adds functionality)
  • Optimization (non-breaking, back-end change that speeds up the code)
  • Technical work (non-breaking, change which is work as part of a new feature)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Key checklist

  • All tests pass (eg. python -m pytest)
  • The documentation builds and looks OK (eg. mkdocs serve)
  • Pre-commit hooks run successfully (eg. pre-commit run --all-files)

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added or an issue has been opened to tackle that in the future. (Indicate issue here: # (issue))

Copilot AI review requested due to automatic review settings April 17, 2026 14:46
@davehorsfall davehorsfall changed the title Feat/events update Update events page Apr 17, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Events feature to support richer event metadata (location + external links) sourced from an expanded CSV schema, and adjusts navigation links accordingly.

Changes:

  • Extend data/events.csv schema and update EventsPageView to include location/event/blog fields and optional images.
  • Update the Events page template to render the new fields and handle missing images.
  • Tweak navigation/footer links and add a new event image asset.

Reviewed changes

Copilot reviewed 5 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
main/views/page_views.py Reads new CSV columns into the Events context and sorts events by start date.
main/templates/main/pages/events.html Renders new event fields (location/event/blog) and adds a “no image” placeholder.
data/events.csv Replaces the old CSV layout with a new header + enriched event records.
main/templates/main/snippets/navbar.html Updates the Framework dropdown label for the roles page.
main/templates/main/snippets/footer.html Adds a Framework “Overview” link in the footer.
main/static/assets/img/events/DisCouRSE -team-culture.jpg Adds a new event image asset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread data/events.csv
RSECon25,2025-09-09,2025-09-11,"Oculus, University of Warwick",Workshop for user experience testing the web app visualisations and profiles,https://rsecon25.society-rse.org/,,"Dave Horsfall, Adrian D’Alessandro, Aman Goel, Aleksandra Nenadic, Phil Reed, Emma Hogan, Muhammad Salihu, Gabriel Hanganu",
"Satellite Training Community Day, RSECon25",2025-09-12,2025-09-12,"Oculus, University of Warwick",Workshop for capturing and mapping training and learning opportunities,https://rsecon25.society-rse.org/training-community-day/,,"Dave Horsfall, Toby Hodges, Weronika Filinger, Phil Reed, Samantha Ahern, Jonathan Cooper, Aman Goel",
Careers and Skills for Data-driven Research (CaSDaR) Hybrid Event Launch,2025-09-18,2025-09-18,"Library of Birmingham, England",Lightning talk at the launch of Careers and Skills for Data-driven Research (CaSDaR),https://www.eventbrite.com/e/careers-and-skills-for-data-driven-research-casdar-hybrid-event-launch-tickets-1496323607189,https://www.software.ac.uk/blog/casdar-professionalisation-data-stewardship-roles-uk,Phil Reed,assets/img/events/CaSDaR-launch.png
DisCouRSE Focus Group: Team Culture and Leadership in dRTP contexts,2026-01-19,2026-01-19,King's College London,,https://discourse-network.github.io/events/202601-focus-group-culture/,,Dave Horsfall,assets/img/events/DisCouRSE -team-culture.jpg
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image filename contains a space (DisCouRSE -team-culture.jpg), which is inconsistent with the other event image filenames in main/static/assets/img/events and can lead to awkward/invalid URLs in static() output. Consider renaming the file to a URL-safe name (e.g., use hyphens/underscores only) and update this CSV path accordingly.

Suggested change
DisCouRSE Focus Group: Team Culture and Leadership in dRTP contexts,2026-01-19,2026-01-19,King's College London,,https://discourse-network.github.io/events/202601-focus-group-culture/,,Dave Horsfall,assets/img/events/DisCouRSE -team-culture.jpg
DisCouRSE Focus Group: Team Culture and Leadership in dRTP contexts,2026-01-19,2026-01-19,King's College London,,https://discourse-network.github.io/events/202601-focus-group-culture/,,Dave Horsfall,assets/img/events/DisCouRSE-team-culture.jpg

Copilot uses AI. Check for mistakes.
</li>
<li>
<a class="dropdown-item" href="{% url 'roles' %}">Roles and job profiles</a>
<a class="dropdown-item" href="{% url 'roles' %}">Roles & career pathways</a>
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The navbar label change to “Roles & career pathways” will break the existing navbar test assertion that looks for the “Roles and job profiles” link text (see tests/main/test_main_views.py:84-86). Either update the test expectation (and any other references) or keep the previous label to avoid CI failures.

Suggested change
<a class="dropdown-item" href="{% url 'roles' %}">Roles & career pathways</a>
<a class="dropdown-item" href="{% url 'roles' %}">Roles and job profiles</a>

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to change this title to "career pathways", but there has been an effort to remove & from things in the framework for accessibility reasons. So this should be an "and"

Suggested change
<a class="dropdown-item" href="{% url 'roles' %}">Roles & career pathways</a>
<a class="dropdown-item" href="{% url 'roles' %}">Roles and career pathways</a>

(also, like copilot suggests, the test should be updated accordingly).

Comment on lines +50 to +60
<a href="{{ event.blog }}" target="_blank">{{ event.title }}</a>
{% else %}
{{ event.title }}
{% endif %}
</h4>
<p class="mb-2">{{ event.description }}</p>
<p class="text-muted mb-1 small">
<strong>Date:</strong> {{ event.start_date }}
{% if event.end_date and event.end_date != event.start_date %}– {{ event.end_date }}{% endif %}
{% if event.location %}| {{ event.location }}{% endif %}
{% if event.event_link %}| <a href="{{ event.event_link }}" target="_blank">Event</a>{% endif %}
{% if event.blog %}| <a href="{{ event.blog }}" target="_blank">Blog</a>{% endif %}
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Links opened with target="_blank" should include rel="noopener noreferrer" to prevent tabnabbing. This project already follows that pattern elsewhere (e.g., main/templates/main/pages/skill.html). Add the rel attribute to the event title link and the “Event”/“Blog” links here.

Copilot uses AI. Check for mistakes.
</h4>
<p class="mb-2">{{ event.description }}</p>
<p class="text-muted mb-1 small">
<strong>Date:</strong> {{ event.start_date }}
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template no longer displays an end date for multi-day events, even though the view still provides end_date and the CSV includes multi-day ranges (e.g., 2023-09-05 to 2023-09-08). Consider restoring the previous conditional end-date display so date ranges remain accurate.

Suggested change
<strong>Date:</strong> {{ event.start_date }}
<strong>Date:</strong> {{ event.start_date }}
{% if event.end_date %}
{% if event.end_date != event.start_date %}- {{ event.end_date }}{% endif %}
{% endif %}

Copilot uses AI. Check for mistakes.
Comment thread main/views/page_views.py
Comment on lines +128 to 144
image_path = row.get("Image")
events.append(
{
"title": row.get("Title", ""),
"start_date": row.get("Start Date", ""),
"end_date": row.get("End Date", ""),
"location": row.get("Location", ""),
"event_link": row.get("Event Link", ""),
"blog": row.get("Blog", ""),
"description": row.get("Description", ""),
"contributors": row.get("Contributors", ""),
"image": static(
row.get("Image", "assets/img/blog/single/image.jpg")
),
"image": static(image_path) if image_path else None,
}
)

events.sort(key=lambda e: e["start_date"], reverse=True)
events.sort(key=lambda e: cast(str, e["start_date"]), reverse=True)

Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cast(str, e["start_date"]) only affects typing; it won’t prevent runtime failures if a row ever produces a non-string (e.g., None from csv.DictReader). It’d be safer to normalize CSV values to str when building each event dict (e.g., use row.get(...) or "" for start/end dates) so the sort key is guaranteed to be a string and the cast can be removed.

Copilot uses AI. Check for mistakes.
Comment thread main/views/page_views.py
Comment on lines 118 to 146
@@ -125,20 +125,22 @@ def get_context_data(self, **kwargs: Mapping[str, Any]) -> dict[str, Any]:
with open(csv_path, newline="", encoding="utf-8") as csvfile:
reader = csv.DictReader(csvfile)
for row in reader:
image_path = row.get("Image")
events.append(
{
"title": row.get("Title", ""),
"start_date": row.get("Start Date", ""),
"end_date": row.get("End Date", ""),
"location": row.get("Location", ""),
"event_link": row.get("Event Link", ""),
"blog": row.get("Blog", ""),
"description": row.get("Description", ""),
"contributors": row.get("Contributors", ""),
"image": static(
row.get("Image", "assets/img/blog/single/image.jpg")
),
"image": static(image_path) if image_path else None,
}
)

events.sort(key=lambda e: e["start_date"], reverse=True)
events.sort(key=lambda e: cast(str, e["start_date"]), reverse=True)

context["events"] = events
return context
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current EventsPageView tests only assert that an events list exists, but they don’t validate the new fields (location, event_link, blog) or the missing-image behavior introduced here. Adding assertions for at least one row (including that empty image values don’t crash rendering) would help prevent regressions when the CSV schema evolves again.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

@anenadic anenadic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good to me, would nice to add slides we used at events and maybe other docs but this can also be added progressively.

Copy link
Copy Markdown
Collaborator

@AdrianDAlessandro AdrianDAlessandro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this is good. I still think that longer term this should be moved to the database, or pulled from a separate location, like how the governance and licensing pages have been done.

Again, some changes required to make tests pass, and some good suggestions from copilot to address

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best to remove the space from this filename

Comment thread data/events.csv
UK-Ireland Digital Humanities Association Event 2025,2025-06-17,2025-06-18,University of Glasgow,"Workshop for capturing a digital humanities voice in the framework, part of SSI Fellowship for Phil Reed",https://digitalhumanities-uk-ie.org/2025-annual-event/,https://www.software.ac.uk/blog/giving-digital-humanities-voice-skills-and-competencies-digital-research-professionals-dha,"Phil Reed, Dave Horsfall, Aleksandra Nenadic, Lucia Michielin, Anna-Maria Sichani",
"N8 CIR RSE Annual Meeting, July 2025",2025-07-10,2025-07-10,"The Bar Convent, York",Lightning talk,https://n8cir.org.uk/training-and-events/event-resources/rse-am-2025/,,Aman Goel,
SSI internal ideas meeting,2025-09-02,2025-09-02,Online,Presentation + activity to explore the framework,,,Aleksandra Nenadic,
RSECon25,2025-09-09,2025-09-11,"Oculus, University of Warwick",Workshop for user experience testing the web app visualisations and profiles,https://rsecon25.society-rse.org/,,"Dave Horsfall, Adrian D’Alessandro, Aman Goel, Aleksandra Nenadic, Phil Reed, Emma Hogan, Muhammad Salihu, Gabriel Hanganu",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not have a photo from RSECon25?

Comment on lines +40 to +43
<div class="bg-dark rounded-2 d-flex justify-content-center align-items-center"
style="width: 150px;
height: 100px">
<span class="text-muted text-light small">No image</span>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we defer to the image used before for these missing images? assets/img/blog/single/image.jpg

Comment on lines +49 to +53
{% if event.blog %}
<a href="{{ event.blog }}" target="_blank">{{ event.title }}</a>
{% else %}
{{ event.title }}
{% endif %}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a link to the blog on the title when there is already a blog link included below?

{% if event.end_date and event.end_date != event.start_date %}– {{ event.end_date }}{% endif %}
{% if event.location %}| {{ event.location }}{% endif %}
{% if event.event_link %}| <a href="{{ event.event_link }}" target="_blank">Event</a>{% endif %}
{% if event.blog %}| <a href="{{ event.blog }}" target="_blank">Blog</a>{% endif %}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with copilot's suggestion here.

Suggested change
{% if event.blog %}| <a href="{{ event.blog }}" target="_blank">Blog</a>{% endif %}
{% if event.event_link %}| <a href="{{ event.event_link }}" target="_blank rel="noopener noreferrer"">Event</a>{% endif %}
{% if event.blog %}| <a href="{{ event.blog }}" target="_blank rel="noopener noreferrer"">Blog</a>{% endif %}

</li>
<li>
<a class="dropdown-item" href="{% url 'roles' %}">Roles and job profiles</a>
<a class="dropdown-item" href="{% url 'roles' %}">Roles & career pathways</a>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to change this title to "career pathways", but there has been an effort to remove & from things in the framework for accessibility reasons. So this should be an "and"

Suggested change
<a class="dropdown-item" href="{% url 'roles' %}">Roles & career pathways</a>
<a class="dropdown-item" href="{% url 'roles' %}">Roles and career pathways</a>

(also, like copilot suggests, the test should be updated accordingly).

Comment thread main/views/page_views.py
Comment on lines +139 to +143
"image": static(image_path) if image_path else None,
}
)

events.sort(key=lambda e: e["start_date"], reverse=True)
events.sort(key=lambda e: cast(str, e["start_date"]), reverse=True)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a cleaner way to fix the mypy error is, instead of casting it as a str, just ensure the types in the dictionary are consistent. This works for me:

Suggested change
"image": static(image_path) if image_path else None,
}
)
events.sort(key=lambda e: e["start_date"], reverse=True)
events.sort(key=lambda e: cast(str, e["start_date"]), reverse=True)
"image": static(image_path) if image_path else "",
}
)
events.sort(key=lambda e: e["start_date"], reverse=True)

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Base automatically changed from feat/governance to main April 24, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants