Skip to content

Clean up get_context_data for views that plot a skill wheel#662

Merged
AdrianDAlessandro merged 2 commits intomainfrom
plot-views
Mar 31, 2026
Merged

Clean up get_context_data for views that plot a skill wheel#662
AdrianDAlessandro merged 2 commits intomainfrom
plot-views

Conversation

@AdrianDAlessandro
Copy link
Copy Markdown
Collaborator

Description

Just a couple of code tidy-ups from while I was looking into #661

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))

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 30, 2026

Codecov Report

❌ Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
main/views/page_views.py 95.45% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@Sahil590 Sahil590 left a comment

Choose a reason for hiding this comment

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

LGTM had a comment below not to sure about. Overall there are no breaking changes so can approve.

Comment thread main/views/page_views.py
Comment on lines +50 to +52
context["sample_data"] = _extract_and_combine_roles(
["main/static/assets/sample_data/sample_profile_1.json"]
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wouldn't this need to be a JSON string?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No, it doesn't seem to work when it's a JSON string. I think the Django templating stuff need them to be python objects to deserialise properly.

@AdrianDAlessandro AdrianDAlessandro merged commit cf40f23 into main Mar 31, 2026
5 checks passed
@AdrianDAlessandro AdrianDAlessandro deleted the plot-views branch March 31, 2026 10:28
@github-project-automation github-project-automation Bot moved this from 📋 Backlog to ✅ Done in Web App Development Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants