Clone the Repository: To get the source code for the preference judgment system, you need to clone the repository from GitHub. Open a terminal and run the following command:
>>> git clone https://github.com/judgo-system/judgo.git
In the project directory, the `judgo.env` file is where you can change various parameters to configure the preference judgment software system to meet your specific needs. Some of the common parameters you can modify in this file include:
- ENGINE: The database engine to use. This should be set to django.db.backends.postgresql to use PostgreSQL as the database.
NAME: The name of the database.- USER: The username to use when connecting to the database.
- PASSWORD: The password to use when connecting to the database.
- HOST: The hostname or IP address of the database server.
- PORT: The port number to use when connecting to the database.
- SECRET_KEY: A secret key used to secure the Django application. This should be set to a long, random string.
- DEBUG: A flag that indicates whether the Django application should run in debug mode. This should be set to True for development and testing, and False for production.
- DJANGO_SUPERUSER_PASSWORD: The password for the Django superuser.
- DJANGO_SUPERUSER_EMAIL: The email address for the Django superuser.
- DJANGO_SUPERUSER_USERNAME: The username for the Django superuser.
- IS_JUDGMENT_TEST_EXIST: A flag indicating whether a judgment test should be performed.
- JUDGMENT_TEST_THRESHOULD: The threshold for the judgment test start from the begining of judgment setion.
- TOP_DOC_THRESHOULD: The threshold for the top documents that should be retreived.
- PREF_ALGORITHM: The preference judgment algorithm version to use there are two versions "v.1" and "v.2".
Build the Docker Image: To build the Docker image for the preference judgment system, run the following command in the project directory:
>> docker-compose up --build
Before setting up the software, the user must create a PostgreSQL database and enter the relevant information in the configuration file. This information includes the database name, user, password, host, and port. Proper configuration of the database is necessary for the software to function correctly and ensure the storage and retrieval of data is secure.
Create and activate a new virtual environment: Run the following command in the project directory you can also use `conda`:
virtualenv myenv && source myenv/bin/activate
Install Packages: Install the required packages from the requirements/local.txt file using pip.
pip install -r requirements/local.txt
Setup Django and Postgres: In the project directory, make the `setup_judgo.sh` file executable and run the file using the following commands:
chmod +x setup_judgo.sh
./setup_judgo.sh
Note that the `setup_judgo.sh` script performs all the necessary actions to set up and run the preference judgment software system for the first time. This may include installing dependencies, setting up the database, ingest sample data to the database, creating a Django superuser, and starting the Django development server. The exact actions performed by the script will depend on the specific implementation of the preference judgment system. If you have done this step previously and you just need to run the system you can use the `run_judgo.sh` script which will start the preference judgment system using the previous configuration and settings, without having to perform any setup or configuration steps again.
Following previous steps, the JUDGO system should now be running and accessible from a web browser at http://localhost:8000