hatnote / montage

📷 Photo evaluation tool for and by Wiki Loves competitions
https://commons.wikimedia.org/wiki/Commons:Montage
BSD 3-Clause "New" or "Revised" License
36 stars 11 forks source link
photo-evaluation voting wiki-loves-competitions wikipedia

Logo

Montage

Photo evaluation tool for and by Wiki Loves competitions

Round-based photo evaluation is a crucial step in the "Wiki Loves" series of photography competitions. Montage provides a configurable workflow that adapts to the conventions of all groups.

Testing

pip install tox into your virtualenv, then tox.

Deployment

Ensure you have the necessary libraries by running pip install -r requirements-dev.txt in a virtualenv of your choosing.

  1. Ensure all changes are committed
  2. Run the tests (tox)
  3. Deploy to the dev instance with fab deploy. Ensure the script runs successfully.
    1. Check that the the dev site came back up fine.
    2. Log in and test things out.
    3. Check the montage-dev sentry (devlabs)
  4. Use the audit log to check that the production instance isn't in active use.
  5. Deploy to the production instance with fab deploy:tool=montage
    1. Check that the the production site came back up fine.
    2. Log in and test things out.
    3. Check the montage sentry (prod)

Some tips (at the time of writing):

Installing on toolforge from scratch

2024-04-23

  1. Create new $HOME/www/python
  2. Symlink src to repo clone
  3. Use webservice to create new venv
    • See notes below
  4. Create / copy over prod config
  5. Create / copy over uwsgi.ini
  6. Upload / copy over static
    • cp -r ~/(ORIG_LOCATION)/static/ ~/www/python/src/montage/static/

venv notes

This mostly works: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web/Python#Creating_a_virtual_environment

But before that you should install mysqlclient explicitly:

export MYSQLCLIENT_CFLAGS="-I/usr/include/mariadb/"
export MYSQLCLIENT_LDFLAGS="-L/usr/lib/x86_64-linux-gnu/ -lmariadb"
pip install mysqlclient

From https://wikitech.wikimedia.org/wiki/Help:Toolforge/Database#Python:_Django

Database administration notes

With the move to mariadb, the easiest way to access Montage's own data (not the replicas) is:

# on toolforge, become montage
$ sql tools
> use s53490__montage;s