audit: Open Source Readiness — fix credentials, generalize config, full checklist - #11
Closed
SpiderQubit with Copilot wants to merge 2 commits into
Closed
audit: Open Source Readiness — fix credentials, generalize config, full checklist#11SpiderQubit with Copilot wants to merge 2 commits into
SpiderQubit with Copilot wants to merge 2 commits into
Conversation
…ss checklist Agent-Logs-Url: https://github.com/it-amanuens/rodatraden/sessions/2e8fc556-e14e-49bf-b3fa-161d46d0a43d Co-authored-by: SpiderQubit <25958778+SpiderQubit@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
SpiderQubit
April 28, 2026 20:53
View session
Already updated in master
Owner
|
I am not sure if this deleted docker compose files is the correct way to go. |
it-amanuens
reviewed
Apr 30, 2026
SpiderQubit
pushed a commit
that referenced
this pull request
Apr 30, 2026
…ult email (suggestions from #11) Co-authored-by: Copilot <copilot@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR prepares the repository to be made public. It fixes the most critical issues immediately and documents everything else in a new
OPEN_SOURCE_CHECKLIST.mdthat can serve as a working issue tracker.Changes in this PR
🔐 Credentials & secrets fixed
tf/settings-template.pylucash@fastmail.com→admin@example.comdocker-compose-template.yml<CHANGE_ME_…>docker-compose-template.ymlit@tekniskfysik.se→your-email@example.comdocker-compose-template.ymlrt.tekniskfysik.se→your.domain.example.comdocker-compose-template.yml/root/rodatraden/…) → relative paths (.)📝 Documentation cleaned up
DOCKER_README.md— added a prominent note that the file describes a specific internal deployment; paths and service names must be adaptedREADME.md— removed duplicate#### Windowsheadingtf/settings-template.py— removed pinned Django 2.2.1 version from module docstring✅ New:
OPEN_SOURCE_CHECKLIST.mdA comprehensive list of everything else to address before going public. See the file for full detail; summary below.
Remaining issues (tracked in
OPEN_SOURCE_CHECKLIST.md)🔐 Security
Font Awesome kit ID exposed in
base.html:This kit ID is tied to a specific Font Awesome account. Anyone forking the project uses your quota. Consider self-hosting Font Awesome or documenting that each deployer must create their own kit.
🏷️ TF-specific naming
tf/directory name: The entire Django project configuration lives in a folder calledtf(Teknisk Fysik). This name leaks through intosettings.py,wsgi.py,manage.py, theDockerfile, and deployment docs. Renaming it (e.g. toconfig/) is a clean but mechanical refactor:Hardcoded programme description on the homepage (
index.html, line 19):And in
profile_list.html(line 24):These could be moved to a
SITE_PROGRAMME_NAME/SITE_DESCRIPTIONsetting so any university can deploy without editing templates.Hardcoded UMU video link (
block_detail.html, line 90):This is a dead (or soon-to-be-dead) internal UMU link. Make it configurable or remove it.
Exammodel docstring (models.py, line 753):Should be generic, e.g.
"""Degree/exam definitions.""".🛠️ Setup from scratch
Migrations not committed (
.gitignoreexcludesrodatraden/migrations/0*_*.py):A fresh
git clonehas no migration files, so the correct setup sequence is:This is already mentioned in the README but could easily be missed. Consider committing the initial migrations (standard Django practice for apps distributed as a project).
No initial data fixture — and hard-coded
default=1on FK fields:After a fresh migrate, the database is empty. Trying to create a course immediately will crash with an
IntegrityErrorbecauseDepartment.id=1andLevel.id=1don't exist yet. The README already lists what needs to be created manually in the admin panel (Institutioner, Nivåer, Tidsperioder, …), but a seed fixture would make the experience far smoother:requirements.txtis unpinned:Unpinned deps can break silently when a new major version is released. A
requirements-lock.txt(frompip freeze) should be used for production installs.🐛 Code quality / TODO annotations
urls.py, line 135 — "can't be arsed":The informal tone is fine internally but not suitable for a public repo. Either fix the URL pattern or replace the comment with a proper explanation.
views.py, line 1726 —enable=0treated as truthy:Suggested fix:
views.py, line 1379 — typoprinvate_courses_json:profile_detail.html— hardcoded course list marked "first draft":{# Hardcoded for now, without links. This is a first draft. #} <li>Forsknings- och utvecklingsprojekt inom teknisk fysik (Lp1,2,3,4, Sommar)</li>This section is TF-specific and was never completed. Remove or make it database-driven.
🚀 Nice-to-have
CONTRIBUTING.mdwith a single-page "getting started" guideLICENSEfile (none present).env.examplelisting all environment variablespython manage.py check --deployand fix any warningsExisting open PRs
There are currently several open PRs targeting
master:AcademicYearmodel (significant schema change)Most of the issues above exist in the current
masterbranch. Once those PRs are merged, the same issues may need to be rechecked (especially the new template content introduced in #7).