Open Red was created as a platform to collect data from low-cost gamma measurement devices under a citizen science project.
Make sure you have Python 3.8+ installed on your system.
On Debian/Ubuntu, install the required packages:
sudo apt update && sudo apt install -y python3 python3-venv python3-pip
On MacOS (using Homebrew):
brew install python
On Windows, download and install the latest Python 3 version from the official website:
🔗 Python Downloads
Download the OpenRed project from GitHub:
git clone https://github.com/Ibercivis/OpenRed.git
cd OpenRed
Create and activate a virtual environment using venv
:
python3 -m venv venv
source venv/bin/activate # On macOS/Linux
venv\Scripts\activate # On Windows (PowerShell)
sudo apt update && sudo apt install -y python3 python3-venv python3-pip build-essential python3-dev libpq-dev
Once the virtual environment is active, install the required dependencies:
pip install --upgrade pip
pip install -r requirements.txt
Create a .env
file inside the OpenRed directory:
touch .env
Edit the .env
file and add the following:
DEBUG=True
SECRET_KEY=your_secret_key
DATABASE_URL=sqlite:///db.sqlite3
ALLOWED_HOSTS=*
Run the migrations and create an admin user:
python manage.py migrate
python manage.py createsuperuser
Run the development server:
python manage.py runserver
Now you can access the platform at:
📌 http://127.0.0.1:8000/
To ensure everything is set up correctly, you can run the tests:
python manage.py test
- Modify the code and contribute to OpenRed! 🚀
- If you need to deactivate the virtual environment, use:
deactivate
- If you need to restart the database, use:
python manage.py flush
This setup uses SQLite as the default database, making development simpler. Let me know if you need any modifications! 😊
python ./manage.py add_measures Zaragoza
(to add test measures near Zaragoza)