Update contributing and readme to xapian dependency

This commit is contained in:
Antoine Bartuccio 2018-12-05 22:15:20 +01:00
parent aba4207423
commit 824060bc7a
Signed by: klmp200
GPG Key ID: E7245548C53F904B
2 changed files with 32 additions and 20 deletions

View File

@ -18,24 +18,26 @@ Ensuite, tu fais :
Avec cette commande, tu clones le sith AE dans le dossier courant.
```bash
cd Sith
virtualenv --clear --python=python3 env_sith
source env_sith/bin/activate
pip install -r requirements.txt
cd Sith
virtualenv --system-site-packages --python=python3 env_sith
source env_sith/bin/activate
pip install -r requirements.txt
```
Attention aux dépendances système, à voir dans le README.md
Maintenant, faut passer le sith en mode debug dans le fichier de settings personnalisé.
```bash
echo "DEBUG=True" > sith/settings_custom.py
echo 'EXTERNAL_RES = "False"' >> sith/settings_custom.py
echo 'SITH_URL = "localhost:8000"' >> sith/settings_custom.py
echo "DEBUG=True" > sith/settings_custom.py
echo 'EXTERNAL_RES = "False"' >> sith/settings_custom.py
echo 'SITH_URL = "localhost:8000"' >> sith/settings_custom.py
```
Enfin, il s'agit de créer la base de donnée de test lors de la première utilisation
```bash
./manage.py setup
./manage.py setup
```
Et pour lancer le sith, tu fais `python3 manage.py runserver`
@ -50,7 +52,7 @@ Pour uniformiser le formattage du code nous utilisons [Black](https://github.com
Installation de black:
```bash
pip install black
pip install black
```
## Sous VsCode:

View File

@ -9,12 +9,14 @@
To start working on the project, just run the following commands:
git clone https://ae-dev.utbm.fr/ae/Sith.git
cd Sith
virtualenv --clear --python=python3 env
source env/bin/activate
pip install -r requirements.txt
./manage.py setup
```bash
git clone https://ae-dev.utbm.fr/ae/Sith.git
cd Sith
virtualenv --system-site-packages --python=python3 env
source env/bin/activate
pip install -r requirements.txt
./manage.py setup
```
To start the simple development server, just run `python3 manage.py runserver`
@ -36,17 +38,25 @@ already.
You can check all of them with:
```
```bash
sudo apt install libmysqlclient-dev libssl-dev libjpeg-dev zlib1g-dev python3-dev libffi-dev python3-dev libgraphviz-dev pkg-config python3-xapian
```
On macos, you will need homebrew
```bash
brew install --build-from-source xapian --with-python
```
If it doesn't work it's because it need [this pull request](https://github.com/Homebrew/homebrew-core/pull/34835) to be validated.
The development is done with sqlite, but it is advised to set a more robust DBMS for production (Postgresql for example)
### Collecting statics for production:
We use scss in the project. In development environment (DEBUG=True), scss is compiled every time the file is needed. For production, it assumes you have already compiled every files and to do so, you need to use the following commands :
```
```bash
./manage.py collectstatic # To collect statics
./manage.py compilestatic # To compile scss in those statics
```
@ -75,9 +85,9 @@ appropriate group fields, or the right method to check user permissions.
#### Counting the number of line of code
```
# apt install cloc
$ cloc --exclude-dir=doc,env .
```bash
sudo apt install cloc
cloc --exclude-dir=doc,env .
```
#### Updating doc/SYNTAX.md