Skip to content

Commit

Permalink
Merge branch 'main' into privacy-policy-bigpicture
Browse files Browse the repository at this point in the history
  • Loading branch information
willgearty authored Dec 11, 2024
2 parents 9a8cee6 + 117be38 commit 91e58f5
Show file tree
Hide file tree
Showing 635 changed files with 12,703 additions and 2,986 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build:
name: ${{ matrix.travis_job }}
name: ${{ matrix.travis_job }} (Python ${{ matrix.python-version }})
runs-on: ubuntu-20.04
services:
postgres:
Expand All @@ -23,8 +23,9 @@ jobs:
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
fail-fast: false
matrix:
python-version: ['pypy2.7']
python-version: [3.7]
travis_job: ["lint", "test"]
env:
DJANGO_SETTINGS_MODULE: esp.settings
Expand All @@ -38,17 +39,22 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Prepare for Installing Dependencies
run: deploy/travis/before_install
env:
PYTHON_VERSION: ${{ matrix.python-version }}
- name: Install Dependencies for ${{ matrix.travis_job }}
env:
TRAVIS_JOB: ${{ matrix.travis_job }}
PYTHON_VERSION: ${{ matrix.python-version }}
run: deploy/travis/install
- name: Prepare for ${{ matrix.travis_job }}
env:
TRAVIS_JOB: ${{ matrix.travis_job }}
PYTHON_VERSION: ${{ matrix.python-version }}
run: deploy/travis/before_script
- name: Run ${{ matrix.travis_job }}
env:
TRAVIS_JOB: ${{ matrix.travis_job }}
PYTHON_VERSION: ${{ matrix.python-version }}
run: deploy/travis/script
- name: Upload Coverage to Codecov
if: ${{ matrix.travis_job == 'test' }}
Expand Down
38 changes: 0 additions & 38 deletions Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.com/learning-unlimited/ESP-Website.svg?branch=main)](https://travis-ci.com/learning-unlimited/ESP-Website)
[![Lint and Unit Tests](https://github.com/learning-unlimited/ESP-Website/actions/workflows/tests.yml/badge.svg)](https://github.com/learning-unlimited/ESP-Website/actions/workflows/tests.yml)
[![codecov](https://codecov.io/gh/learning-unlimited/ESP-Website/branch/main/graph/badge.svg?token=eY0C5a1Lju)](https://codecov.io/gh/learning-unlimited/ESP-Website)
# ESP Website
This repository contains a website to help manage the logistics of preparing for and running large, short-term educational programs. It is written and maintained by members and alums of the interscholastic Splash community and [Learning Unlimited](https://learningu.org). Documentation for [program administrators](/docs/admin) and [developers](/docs/dev) is in the [`docs`](/docs) directory, including [dev setup documentation](/docs/dev/vagrant.rst) and [instructions for contributors](/docs/dev/contributing.rst). Additional documentation for chapters of Learning Unlimited is on the [LU Wiki](https://wiki.learningu.org).
8 changes: 5 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ VAGRANTFILE_API_VERSION = '2'

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

# Build off the basic Ubuntu 20.04 64-bit VM.
config.vm.box = 'ubuntu-20.04'
config.vm.box_url = 'https://s3.amazonaws.com/learningu-static/ubuntu-20.04.box'
# Build off the basic Ubuntu 64-bit VM.
config.vm.box = 'ubuntu-24.04'
config.vm.box_url = 'https://learningu-static.s3.amazonaws.com/ubuntu-24.04.box'
config.vm.hostname = 'ludev'
config.ssh.forward_agent = true
config.ssh.forward_x11 = true
config.ssh.insert_key = false

# Forward port for Django dev server
config.vm.network :forwarded_port, guest: 8000, host: 8000
Expand All @@ -28,6 +29,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider :virtualbox do |vb|
# vb.gui = true
vb.customize ['modifyvm', :id, '--memory', '2048']
vb.customize ["modifyvm", :id, "--cpus", "2"]
end

end
1 change: 1 addition & 0 deletions deploy/config_templates/local_settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
""" Local system-specific settings. """

from __future__ import absolute_import
import os

SITE_INFO = (1, 'devsite.learningu.org', 'LU Dev Site')
Expand Down
18 changes: 4 additions & 14 deletions deploy/travis/before_install
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
#!/bin/bash
set -euf -o pipefail

if [ $(echo "$(lsb_release -rs) > 20" | bc) -eq 1 ]; then
sudo apt update
else
sudo apt-get update
fi
sudo add-apt-repository ppa:deadsnakes/ppa

sudo apt update

# install pip
sudo add-apt-repository universe
if [ $(echo "$(lsb_release -rs) > 20" | bc) -eq 1 ]; then
sudo apt install -y curl
else
sudo apt-get install -y curl
fi
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2 get-pip.py
sudo python2 -m pip install --upgrade pip==20.1
sudo apt -y install python3-pip
7 changes: 5 additions & 2 deletions deploy/travis/before_script
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ set -euf -o pipefail

if [ "$TRAVIS_JOB" = "test" ]; then
cp esp/esp/local_settings.py.travis esp/esp/local_settings.py
ln -s `pwd`/esp/public/media/default_images esp/public/media/images
ln -s `pwd`/esp/public/media/default_styles esp/public/media/styles
ln -f -s `pwd`/esp/public/media/default_images esp/public/media/images
ln -f -s `pwd`/esp/public/media/default_styles esp/public/media/styles
# the postgres service in Github Actions sets up the database for us
if [ "$GITHUB_ACTIONS" != true ]; then
psql -c "DROP DATABASE IF EXISTS test_test_django;" -U postgres
psql -c "DROP DATABASE IF EXISTS test_django;" -U postgres
psql -c "DROP ROLE IF EXISTS testuser;" -U postgres
psql -c "CREATE ROLE testuser PASSWORD 'testpassword' LOGIN CREATEDB;" -U postgres
psql -c "CREATE DATABASE test_django OWNER testuser;" -U postgres
fi
Expand Down
6 changes: 3 additions & 3 deletions deploy/travis/install
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ if [ "$TRAVIS_JOB" = "test" ]; then
sudo apt-get remove -y libhashkit2
sudo apt-get install -y $(cat esp/packages_base.txt | grep -v ^memcached | grep -v ^postgres | grep -v ^libpq-dev | grep -v ^.*pip)
esp/packages_base_manual_install.sh
pip2 install -r esp/requirements.txt -q --log pip.log || (tail pip.log && exit 1)
pip2 install coverage
pip3 install -r esp/requirements.txt -q --log pip.log || (tail pip.log && exit 1)
pip3 install coverage
elif [ "$TRAVIS_JOB" = "lint" ]; then
pip2 install flake8
pip3 install flake8
else
echo "Unknown TRAVIS_JOB: $TRAVIS_JOB"
exit 1
Expand Down
21 changes: 21 additions & 0 deletions docs/admin/releases/15/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,24 @@ Minor bug fixes
- Fixed the categories and flags links on the program settings page
- Fixed an oversight where some student modules did not check the grade level of a student
- Fixed the rapid checkin page

March 2024 Patch
================
Due to changes in how Gmail and other email clients are now handling certain kinds of emails, we have made the following changes:

- Emails from the Comm Panel can now only be sent from email addresses ending in @learningu.org or @subdomain.learningu.org (e.g., @yale.learningu.org)

- If you have a custom domain that should work too (e.g., stanfordesp.org)
- Each site now has a "info@yoursitehere" redirect that should redirect to your chapter's email address (e.g., [email protected] now redirects to [email protected]) and will be used by default in the Comm Panel
- As always, you can put whatever you want in the "Reply-to" field
- All Comm Panel emails will now be sent with a customized one-click unsubscribe link that email clients can now show to the recipients

- Clicking on this link will instantly deactivate their account (effectively unsubscribing them from emails)
- If you would like to include a similar unsubscribe link in the text of your emails, you can use the `{{ }}` dropdown menu

- This unsubscribe link will take recipients to a page where they will need to confirm that they would like to deactivate their account and unsubscribe from emails

Minor bug fixes
~~~~~~~~~~~~~~~
- Program links now work after changing a program's name
- The "Signup" button text color is fixed on the fruitsalad theme
116 changes: 116 additions & 0 deletions docs/admin/releases/16/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
============================================
ESP Website Stable Release 16 release notes
============================================

.. contents:: :local:

Changelog
=========

Themes
~~~~~~
- Removed some unused variables
- Renamed some variables for clarity
- Made button types have consistently editable colors across themes
- Made the theme editor more theme-specific by removing irrelevant variables and adding some help text
- Fixed the "Reset Color" buttons on the theme customization page for optional variables and non-theme-specific variables
- Fixed the theme customization page so that only optional variables have a "Remove Variable" button
- Fixed the alignment and sizing of the logo in the fruitsalad theme
- Added the ability to reorder nav structure and contact links

- This section of the theme setup page also now has a less cluttered and more user friendly interface

Scheduler
~~~~~~~~~
- Fixed the highlighting of the moderator directory cell
- Moderators are now highlighted when they are selected via the info panel for a section
- The scheduler now waits until all changelog items are applied before allowing the user to interact with it
- Classes that are cancelled and unscheduled outside of the scheduler are now immediately removed from the scheduler

Student registration
~~~~~~~~~~~~~~~~~~~~
- Removed duplicate and unneeded summary lines in the extracosts form for certain setups
- Fixed saving preferences in the two-phase class lottery

Program settings
~~~~~~~~~~~~~~~~
- Added help text to the color_code class registration module info field

- The widget for this field is now a color picker with regex validation to ensure values are hex color codes
- Any old values for this field have been updated to this new format
- Made the registration receipt prettier and more informative

- This receipt is shown to students after clicking the "confirm registration" button
- The receipt page is now themed (used to be just a white page) and now has a button to print the receipt and a button to return to the main registration page
- The receipt now includes program information (date range and registration close date), payment information (including amount owed and optional purchases), and a pretty class schedule
- The "pretext" can be edited by changing the confirm receipt on the settings page
- The entire receipt can be overriden by a single template override or by program-specific template overrides (like before)
- Made the registration confirmation email prettier and more informative (same changes as the registration receipt described above)

- Because this receipt now includes a schedule, clicking the confirmation button always sends a new copy of the confirmation email
- Now prevent programs with duplicates names and or URLs
- When a program name is changed, the account name for that program is similarly changed
- Errors in the new program and program settings forms are now shown as form errors instead of as a Whoops page
- Fixed widths of the URL and email redirect tables

Onsite
~~~~~~
- Made the rapid check-in messages more obvious
- Fixed attendance barcode scanning
- Fixed the timeslot dropdown menu in the admin attendance module

Communications panel
~~~~~~~~~~~~~~~~~~~~
- Named "mailboxes" are now allowed in the comm panel (e.g., "Will's Server <[email protected]>")
- The default grade limits are now only enforced in the communications panel and not in other user search controller modules (e.g., user list generator)
- Fixed dynamic behavior of the user type field and filters

- When changing the user type, all filters are now cleared

Minor new features
~~~~~~~~~~~~~~~~~~
- Added a button to scroll to the top of the catalog
- Programs for which users have registered but have not occurred are now included in the the post-profile list of programs
- Cleaned up the UI for checking for duplicate emails during account creation

- Emails are now only considered duplicates if users want to make accounts of the same type
- For privacy reasons, first and last names are no longer shown
- **Checking for duplicate emails is now the default behavior** (this can be disabled using the "ask_about_duplicate_accounts" global management tag)
- The financial aid approval module now includes financial grant information for approved requests
- Financial aid requests are now less cramped in the financial aid approval module, with the extra financial information now hidden by default
- Made the usersearch warning/messages prettier
- Linked model fields can no longer be added to existing custom forms

Minor bug fixes
~~~~~~~~~~~~~~~
- Removed the mailing labels module
- Fixed the profile form when numbers are used for school names
- Existing accounting transfers are now updated when the program admission cost is changed
- Removed links to nonexistent DVI and PS catalogs on the printables page
- Removed outdated "Guide for happy printables" from the printables page
- Unmorph button now properly hides after unmorphing
- Fixed the status field in the class management form
- Fixed the regex restriction for the director email field
- Fixed the date format in the volunteer request form help text
- The "Open" deadlines button now properly opens deadlines that are currently set to open in the future
- Now display a 404 page when user attempts to download a file that doesn't exist
- Fixed the volunteer form for very small user ID numbers

Development changes
===================

Dependency changes
~~~~~~~~~~~~~~~~~~
- Upgraded Python (2.7 -> 3.7)
- Upgraded flake8 (2.5.0 -> 3.9.2)
- Upgraded ipython (3.2.1 -> 7.34.0)
- Upgraded pillow (6.2.2 -> 8.3.2)
- Upgraded pydns (2.3.6 -> 3.2.1)
- Upgraded Pygments (2.0.2 -> 2.10.0)
- Upgraded stripe (1.19.1 -> 2.60.0)
- Upgraded twilio (3.6.5 -> 6.63.2)
- Upgraded xlwt (1.0.0 -> 1.3.0)
- Removed django-selenium
- Added dill
- Added setuptools
- Added wheel
3 changes: 3 additions & 0 deletions docs/admin/releases/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ live sites. There is then a period of manual testing and bugfixing on the live
sites before the code is declared stable. At this point, the code on the live
sites is frozen until the next release.

`SR16 - January 2025 <16/>`_
----------------------------

`SR15 - June 2023 <15/>`_
----------------------------

Expand Down
5 changes: 2 additions & 3 deletions docs/dev/deploying.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ To deploy a new site, first make sure you know:
#. the group's name (e.g. "MIT ESP" or "Yale Splash")
#. the chapter's preferred `theme <../admin/available_themes.rst>`_

Then ssh to ``diogenes``, grab the latest version of
``deploy/server_setup/new_site.sh``, ``cd`` to ``/lu/sites``, and
Then ssh to the production server, ``cd`` to ``/lu/sites``, and
run ``sudo new_site.sh --all``. If the directory already exists for the
chapter, you may wish to delete it to get a clean start. (You may instead
clone the repository yourself, ``cd`` into it, and run the script from there.)
Expand Down Expand Up @@ -42,7 +41,7 @@ Deactivating a site
To deactivate a site, simply remove or comment out its lines in
``/etc/apache2/sites-available/esp_sites.conf``, ``/etc/crontab``, and
``/etc/exim4/update-exim4.conf.conf``, and move its site directory to
``/lu/sites/inactive``.
``/lu/sites/archive``.

TODO(benkraft): write a quick script for this.

Expand Down
2 changes: 1 addition & 1 deletion docs/dev/email.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ESP Email Setup
===============

This document describes how email, both incoming and outgoing, makes its way where it's going on the ESP website. The code will serve as a more specific reference for the details, but this is an overview of the high-level setup. Note: this document describes the setup on diogenes; the parts of the setup outside the ESP-Website codebase may vary slightly on sites hosted elsewhere (i.e. esp.mit.edu).
This document describes how email, both incoming and outgoing, makes its way where it's going on the ESP website. The code will serve as a more specific reference for the details, but this is an overview of the high-level setup. Note: this document describes the setup on the LU production server; the parts of the setup outside the ESP-Website codebase may vary slightly on sites hosted elsewhere (in particular, esp.mit.edu).

.. contents:: :local:

Expand Down
Loading

0 comments on commit 91e58f5

Please sign in to comment.