Skip to content

Ferramenta criada para validar edições e contabilizar a pontuação de participantes dos wikiconcursos na Wikipédia lusófona

License

Notifications You must be signed in to change notification settings

WikiMovimentoBrasil/wikiscore

Repository files navigation

Quality Gate Status Endpoint Badge

WikiScore

This is an tool used to manage contests created and managed by WikiMovimento Brasil. It allows evaluators to validate editions made to articles participating in said contests, and also adds up the points earned by participants. Different contest evaluators can have their own profile, and their own separate validation history of the contributions they have checked.

The system's informations comes from local databases, which contain the data on the articles editions. These databases are fed by cron jobs, which must be set up separetely.

Basic Django Application Setup

Prerequisites

  • Python 3.x
  • Django 4.x
  • pip (Python package installer)

Installation

  1. Clone the repository:
git clone https://github.com/WikiMovimentoBrasil/wikiscore.git
cd wikiscore
  1. Create and activate a virtual environment:
python3 -m venv env
source env/bin/activate
  1. Install the required packages:
pip install -r requirements.txt
  1. Apply the migrations:
python manage.py migrate

Creating a Superuser on Django Console

  1. Run the following command to create a superuser:
python manage.py createsuperuser
  1. Follow the prompts to enter the username, email, and password for the superuser. Make sure the username matches the username on Wikimedia, so you can log-in with OAuth.

Setting up OAuth for Logging In

  1. Register your application on the Wikimedia OAuth to obtain the consumer key and secret. Ensure that your request:

    • Uses OAuth version 1.0a
    • Sets "http://127.0.0.1:8000/" as the callback URL
    • Grants permission solely for user identity verification
  2. Create your .env file and add the following settings:

SOCIAL_AUTH_MEDIAWIKI_KEY = 'your_consumer_key'
SOCIAL_AUTH_MEDIAWIKI_SECRET = 'your_consumer_secret'
SECRET_KEY = 'your_Django_secret_key'

Creating a Group

  1. Start the development server:
python manage.py runserver
  1. Visit 127.0.0.1:8000 on your preferred browser and log in via OAuth using the superuser account.

  2. Visit 127.0.0.1:8000/admin/ and navigate to the "Groups" section.

  3. Create a new group (affiliate, usergroup, unnoficial group, etc) and add yourself to the group as a "Manager".

Setting up a Cronjob

  1. Open your crontab file:
crontab -e
  1. Add the following line to the crontab file to run the update command every 10 minutes:
*/10 * * * * /path/to/your/virtualenv/bin/python /path/to/your/project/manage.py update

Replace /path/to/your/virtualenv and /path/to/your/project with the appropriate paths for your environment.

Creating Contests

For detailed instructions on creating contests, please refer to the GitHub Wiki of this repository.

About

Ferramenta criada para validar edições e contabilizar a pontuação de participantes dos wikiconcursos na Wikipédia lusófona

Resources

License

Stars

Watchers

Forks