Skip to content

Commit a22eb6b

Browse files
authored
Merge pull request #62 from Xpirix/improve_readme_and_dev_workflow
Improve readme and dev workflow
2 parents c384e75 + 126d0e1 commit a22eb6b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+301
-1591
lines changed

.travis.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
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+
![-----------------------------------------------------](./img/green-gradient.png)
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+
![Docker logo](https://www.docker.com/wp-content/uploads/2022/03/Moby-logo.png)
16+
17+
Verify your installation with:
18+
```bash
19+
docker --version
20+
docker-compose --version
21+
```
22+
23+
![-----------------------------------------------------](./img/green-gradient.png)
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+
![-----------------------------------------------------](./img/green-gradient.png)
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+
![-----------------------------------------------------](./img/green-gradient.png)
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+
![-----------------------------------------------------](./img/green-gradient.png)
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+
![-----------------------------------------------------](./img/green-gradient.png)
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+
![-----------------------------------------------------](./img/green-gradient.png)

0 commit comments

Comments
 (0)