|
| 1 | +# ✨ Contributing to QGIS-Certficiation-Website |
| 2 | + |
| 3 | +Thank you for your interest in contributing to the QGIS Certficiation Website! We welcome all types of contributions, including bug reports, feature suggestions, code improvements, and documentation updates. Please review the guidelines below to help ensure a smooth and effective contribution process. |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +## 🧑💻 Development Setup |
| 8 | + |
| 9 | +To get started with development, you can run the application in debug mode using Docker Compose. Several helpful Docker Compose commands are already defined in the `deployment/Makefile`. |
| 10 | + |
| 11 | +## 🏃 Prerequisites |
| 12 | + |
| 13 | +This project requires [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/) for both development and production environments. Please make sure both are installed on your system before proceeding. |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +Verify your installation with: |
| 18 | +```bash |
| 19 | +docker --version |
| 20 | +docker-compose --version |
| 21 | +``` |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +## 🛒 Cloning the Repository |
| 26 | + |
| 27 | +- Clone the repository: |
| 28 | + ```sh |
| 29 | + git clone https://github.com/qgis/QGIS-Certficiation-Website.git |
| 30 | + ``` |
| 31 | +- Check your current directory: |
| 32 | + ```sh |
| 33 | + pwd |
| 34 | + ``` |
| 35 | +- The repository path should be `<your current directory>/QGIS-Certficiation-Website` |
| 36 | +- Navigate to the project directory: |
| 37 | + ```sh |
| 38 | + cd QGIS-Certficiation-Website/ |
| 39 | + ``` |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | +## Pre-commit Hooks |
| 44 | + |
| 45 | +This repository uses [pre-commit](https://pre-commit.com/) to automate code quality checks before each commit. To set it up: |
| 46 | + |
| 47 | +1. Install pre-commit (if not already installed): |
| 48 | + ```sh |
| 49 | + pip install pre-commit |
| 50 | + ``` |
| 51 | + |
| 52 | +2. Install the hooks defined in `.pre-commit-config.yaml`: |
| 53 | + ```sh |
| 54 | + pre-commit install |
| 55 | + ``` |
| 56 | + |
| 57 | +Now, the configured checks (such as linting and formatting) will run automatically when you commit changes. |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | +### ❄️ Nix |
| 62 | + |
| 63 | +If you use Nix or NixOS, you can set up the development environment with: |
| 64 | + |
| 65 | +```sh |
| 66 | +nix-shell |
| 67 | +./vscode.sh |
| 68 | +``` |
| 69 | +*Note: The Nix shell will soon install all dependencies automatically.* |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +### ⚡️ Quick Start |
| 74 | + |
| 75 | +- Generate your `.env` file from the example and update it with your email configuration: |
| 76 | + ```sh |
| 77 | + cd deployment |
| 78 | + cp .env.example .env |
| 79 | + nano .env # Edit as needed |
| 80 | + ``` |
| 81 | + |
| 82 | +- Build and start the application: |
| 83 | + ```sh |
| 84 | + make build |
| 85 | + make devweb |
| 86 | + ``` |
| 87 | + |
| 88 | +- Run migrations and load initial data: |
| 89 | + ```sh |
| 90 | + make shell c=devweb |
| 91 | + python manage.py migrate |
| 92 | + python manage.py loaddata certification/fixtures/initial_data.json |
| 93 | + # Exit the shell with Ctrl+D |
| 94 | + ``` |
| 95 | + |
| 96 | +- Start the development server: |
| 97 | + ```sh |
| 98 | + make devweb-runserver |
| 99 | + ``` |
| 100 | + |
| 101 | +Open your browser and visit [http://localhost:62202](http://localhost:62202). The default super admin credentials are `qgisadmin` / `qgisadmin`. |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | +### More Information |
| 106 | + |
| 107 | +For detailed instructions, please refer to the [README-dev](./README-dev.md) and [README-docker](./README-docker.md) files. These documents provide comprehensive information about both development and production environments, similar to the original [Projecta](https://github.com/kartoza/projecta.git) application. |
| 108 | + |
| 109 | + |
0 commit comments