Skip to content

Commit b009646

Browse files
committed
update README with new doc
1 parent fd71c89 commit b009646

File tree

2 files changed

+15
-76
lines changed

2 files changed

+15
-76
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ See [dev/CONTRIBUTE.md](dev/CONTRIBUTE.md)
3838

3939
## Installing in production
4040

41-
See [dev/INSTALL.md](dev/INSTALL.md)
41+
See https://pytition.readthedocs.io/en/latest/installation.html#manual-installation-recommended-for-production
4242

4343
## Included dependencies
4444

dev/CONTRIBUTE.md

Lines changed: 14 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,29 @@
33
## Translations
44

55
You can help with translations.
6+
The best way to do so is via our weblate hosted by Framasoft: https://weblate.framasoft.org/projects/pytition/pytitions/
67
Contact me by opening an issue or by sending a private e-mail if you want to contribute by translating the project
7-
in a language you know. I can explain how to do it.
8+
in a language you know and have any issue with weblate (for instance your language is not available). I can help.
89

910
## Open a Pull Request
1011

1112
Please don't hesitate to open a Pull Request if you have a fix for one of the [issues](https://github.com/pytition/pytition/issues).
13+
1214
## Report bugs or give new enhancements/feature ideas
15+
1316
Don't hesitate to open new [issues](https://github.com/pytition/pytition/issues) with your reports or remarks.
1417

1518
## Install a development environment
1619

17-
### With a script
20+
### Manual install (recommended for production)
21+
22+
See https://pytition.readthedocs.io/en/latest/installation.html#manual-installation-recommended-for-production
23+
24+
### With docker-compose
25+
26+
See https://pytition.readthedocs.io/en/latest/installation.html#installation-via-docker-recommended-for-development
27+
28+
### With a script (not recommended)
1829

1930
You can use [this script](https://github.com/pytition/Pytition/blob/master/dev/dev_setup.sh) to setup a development environment.
2031
If you trust it, run, in the directory where you want to clone the project:
@@ -26,81 +37,9 @@ curl -sSL "https://raw.githubusercontent.com/pytition/Pytition/master/dev/dev_se
2637
This script is only proven to work on a fresh Ubuntu 18.04 install.
2738
You can use VirtualBox, Docker, qemu or whatever virtualisation/containerization technology you prefer.
2839

29-
### Manual
30-
31-
If you don't trust the above script, and don't want to use Docker, you can install Pytition manually.
32-
We will use MariaDB as a backend. If you prefer PostgreSQL or SQlite, try with the automatic script or with Docker.
3340

34-
First, you'll need to clone the repository:
35-
```bash
36-
git clone [email protected]:pytition/Pytition.git
37-
# or, if you prefer HTTPS
38-
git clone https://github.com/pytition/Pytition.git
39-
```
40-
Then you will need native dependencies:
41-
```bash
42-
# On Debian and derivatives
43-
sudo apt update
44-
sudo apt install git virtualenv libmariadbclient-dev python3-dev build-essential mariadb-server
45-
# If you use Yum/DNF
46-
sudo yum install MariaDB-server galera-4 MariaDB-client MariaDB-shared MariaDB-backup MariaDB-common git python3 python3-virtualenv make gcc
47-
# On Arch
48-
sudo pacman -S mariadb mariadb-libs python make gcc
49-
```
50-
Move in the freshly cloned directory with `cd Pytition`, and create a VirtualEnv.
51-
It will isolate your Python setup for Pytition from the rest of your system, avoiding packages conflicts for other projects.
52-
```
53-
virtualenv -p python3 venv
54-
# You can enter in the virtualenv with:
55-
source venv/bin/activate
56-
```
57-
You will need to run this last command every time you start working on Pytition.
58-
You can now install Python packages:
59-
```
60-
pip3 install -r requirements_dev.txt
61-
```
62-
Init the database with:
63-
```bash
64-
password="ENTER_A_SECURE_PASSWORD_YOU_WILL_REMEMBER_HERE"
65-
sudo mysql -h localhost -u root -Bse "CREATE USER pytition@localhost IDENTIFIED BY '${password}'; CREATE DATABASE pytition; GRANT USAGE ON *.* TO 'pytition'@localhost IDENTIFIED BY '${password}'; GRANT ALL privileges ON pytition.* TO pytition@localhost; FLUSH PRIVILEGES;"
66-
```
67-
Then write the following in a new file called `my.cnf`:
68-
```
69-
[client]
70-
database = pytition
71-
user = pytition
72-
password = YOUR_PASSWORD_HERE
73-
default-character-set = utf8
74-
```
75-
Tell Pytition where to find this file with:
76-
```bash
77-
sed -i -e "s@/home/petition/www/@$PWD/@" pytition/pytition/settings/base.py
78-
```
79-
Then run migrations (scripts to initialize the database):
80-
```bash
81-
cd pytition && python3 ./manage.py migrate && cd -
82-
```
83-
You can create an administrator account, and populate the database with fake data:
84-
```bash
85-
cd pytition && python3 ./manage.py createsuperuser && cd -
86-
./dev/prepropulate.sh
87-
```
88-
And… you are done! You can start the server with:
89-
```bash
90-
python3 ./pytition/manage.py runserver
91-
```
92-
You can access it at [http://localhost:8080](http://localhost:8080)!
93-
### With docker-compose
94-
This creates two containers, one for the database using postgresql, another for the django project.
95-
```
96-
docker-compose up --build
97-
docker-compose exec web ./dev/initialize.sh
98-
```
99-
This script will
100-
* Run database migration
101-
* Create superuser account
102-
* Insert data into the development database
10341
## Run tests
42+
10443
It uses coverage to evaluate tests coverage.
10544
```
10645
coverage run pytition/manage.py test petition

0 commit comments

Comments
 (0)