Skip to content

Improve email support and skosmos behaviour#292

Merged
FelixFrizzy merged 7 commits intomainfrom
development
Nov 11, 2025
Merged

Improve email support and skosmos behaviour#292
FelixFrizzy merged 7 commits intomainfrom
development

Conversation

@FelixFrizzy
Copy link
Collaborator

@FelixFrizzy FelixFrizzy commented Nov 11, 2025

  • emailserver is not obligatory anymore
  • skosmos will show the top terms for all created or imported vocabularies

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Email verification during signup now only sends when email is properly configured, preventing errors on systems without email setup.
  • Improvements

    • Enhanced URL link handling across authentication and team management pages for improved reliability.
  • Documentation

    • Updated mail server configuration instructions.

@coderabbitai
Copy link

coderabbitai bot commented Nov 11, 2025

Walkthrough

This pull request introduces email configuration gating, standardizes URL reversals in templates using Django template tags, updates a vocabulary configuration property, and refines documentation wording. The changes primarily affect configuration, conditional email sending, and template URL handling.

Changes

Cohort / File(s) Summary
Documentation & Instruction Update
README.md
Changed step 2 instruction wording from "Fill out" to "Add" in the Configure Mail Server section.
Email Configuration Logic
evoks/evoks/settings.py, evoks/evoks/views.py
Added EMAIL_CONFIGURED boolean flag in settings that derives from both EMAIL_HOST_USER and EMAIL_HOST_PASSWORD. Modified signup_view to gate verification email sending on this flag; mail is now sent only when EMAIL_CONFIGURED is truthy.
URL Template Tag Standardization
evoks/theme/templates/login.html, evoks/theme/templates/reset_password_complete.html, evoks/theme/templates/teams.html
Replaced hardcoded URL paths with Django URL template tag reversals: /signup{% url 'signup' %}, /login{% url 'login' %}, and /teams/{{team.name}}{% url 'teams' team.name %}.
Vocabulary Configuration
evoks/Skosmos/skosmos.py
Added showTopConcepts = True triple for the vocabulary URI in the add_vocabulary function.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Verify that EMAIL_CONFIGURED correctly requires both EMAIL_HOST_USER and EMAIL_HOST_PASSWORD to be non-empty
  • Confirm email sending behavior in signup_view functions correctly when EMAIL_CONFIGURED is True and gracefully handles False
  • Validate that all Django URL template tag reversals reference correct, defined URL names (signup, login, teams)
  • Ensure the showTopConcepts RDF triple addition to skosmos.py aligns with expected vocabulary metadata structure

Possibly related PRs

  • Hierarchy #288: Directly related modification to evoks/Skosmos/skosmos.py that adds the same showTopConcepts = True triple for vocabulary URIs.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Improve email support and skosmos behaviour' accurately reflects the main changes: making the email server optional and enabling top concepts display in Skosmos.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch development

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
evoks/evoks/views.py (1)

106-116: Conditional success message is an optional but worthwhile improvement.

The review comment is accurate. The Profile model includes a verified field (default False), and new accounts require admin verification via the verify() method. When EMAIL_CONFIGURED is False, admins receive no notification of pending sign-ups, creating an operational blind spot where unverified accounts sit indefinitely and users receive a misleading message.

The suggested conditional message appropriately addresses this UX gap. Developers may also consider implementing a fallback admin notification mechanism or a periodic admin digest for unverified users when email is disabled.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d6234be and 707671b.

📒 Files selected for processing (7)
  • README.md (1 hunks)
  • evoks/Skosmos/skosmos.py (1 hunks)
  • evoks/evoks/settings.py (1 hunks)
  • evoks/evoks/views.py (2 hunks)
  • evoks/theme/templates/login.html (1 hunks)
  • evoks/theme/templates/reset_password_complete.html (1 hunks)
  • evoks/theme/templates/teams.html (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test-all
🔇 Additional comments (7)
evoks/Skosmos/skosmos.py (1)

64-65: LGTM! Skosmos top concepts configuration added correctly.

The new RDF triple correctly enables the display of top concepts for vocabularies, aligning with the PR objective. The implementation follows the established pattern used for other vocabulary properties.

evoks/theme/templates/teams.html (1)

70-70: LGTM! URL reversing improves maintainability.

Using Django's {% url %} template tag instead of hardcoded paths is a best practice that makes URL configuration more maintainable.

evoks/theme/templates/login.html (1)

28-28: LGTM! Consistent URL reversing applied.

The signup link now uses Django's URL reversing, consistent with the other template updates in this PR.

evoks/theme/templates/reset_password_complete.html (1)

25-25: LGTM! URL reversing applied consistently.

The login link follows the same URL reversing pattern as the other template updates.

README.md (1)

93-93: LGTM! Documentation wording improved.

Changing "Fill out" to "Add" provides clearer instruction for adding environment variables, especially now that email configuration is optional.

evoks/evoks/views.py (1)

15-15: LGTM! Import added for email configuration check.

The EMAIL_CONFIGURED flag is correctly imported to gate email functionality.

evoks/evoks/settings.py (1)

97-97: LGTM! Email configuration flag correctly implemented.

The EMAIL_CONFIGURED flag properly evaluates to True only when both email credentials are provided, correctly implementing the optional email server feature from the PR objectives.

@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.31%. Comparing base (44654ae) to head (707671b).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
evoks/evoks/views.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #292   +/-   ##
=======================================
  Coverage   92.31%   92.31%           
=======================================
  Files          50       50           
  Lines        1847     1848    +1     
=======================================
+ Hits         1705     1706    +1     
  Misses        142      142           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@FelixFrizzy FelixFrizzy merged commit 01b65df into main Nov 11, 2025
10 of 11 checks passed
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.

1 participant