Commit 824060bc authored by Sli's avatar Sli

Update contributing and readme to xapian dependency

parent aba42074
Pipeline #1628 passed with stage
in 10 minutes and 37 seconds
...@@ -18,24 +18,26 @@ Ensuite, tu fais : ...@@ -18,24 +18,26 @@ Ensuite, tu fais :
Avec cette commande, tu clones le sith AE dans le dossier courant. Avec cette commande, tu clones le sith AE dans le dossier courant.
```bash ```bash
cd Sith cd Sith
virtualenv --clear --python=python3 env_sith virtualenv --system-site-packages --python=python3 env_sith
source env_sith/bin/activate source env_sith/bin/activate
pip install -r requirements.txt 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é. Maintenant, faut passer le sith en mode debug dans le fichier de settings personnalisé.
```bash ```bash
echo "DEBUG=True" > sith/settings_custom.py echo "DEBUG=True" > sith/settings_custom.py
echo 'EXTERNAL_RES = "False"' >> sith/settings_custom.py echo 'EXTERNAL_RES = "False"' >> sith/settings_custom.py
echo 'SITH_URL = "localhost:8000"' >> 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 Enfin, il s'agit de créer la base de donnée de test lors de la première utilisation
```bash ```bash
./manage.py setup ./manage.py setup
``` ```
Et pour lancer le sith, tu fais `python3 manage.py runserver` 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 ...@@ -50,7 +52,7 @@ Pour uniformiser le formattage du code nous utilisons [Black](https://github.com
Installation de black: Installation de black:
```bash ```bash
pip install black pip install black
``` ```
## Sous VsCode: ## Sous VsCode:
......
...@@ -9,12 +9,14 @@ ...@@ -9,12 +9,14 @@
To start working on the project, just run the following commands: To start working on the project, just run the following commands:
git clone https://ae-dev.utbm.fr/ae/Sith.git ```bash
cd Sith git clone https://ae-dev.utbm.fr/ae/Sith.git
virtualenv --clear --python=python3 env cd Sith
source env/bin/activate virtualenv --system-site-packages --python=python3 env
pip install -r requirements.txt source env/bin/activate
./manage.py setup pip install -r requirements.txt
./manage.py setup
```
To start the simple development server, just run `python3 manage.py runserver` To start the simple development server, just run `python3 manage.py runserver`
...@@ -36,17 +38,25 @@ already. ...@@ -36,17 +38,25 @@ already.
You can check all of them with: 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 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) 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: ### 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 : 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 collectstatic # To collect statics
./manage.py compilestatic # To compile scss in those 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. ...@@ -75,9 +85,9 @@ appropriate group fields, or the right method to check user permissions.
#### Counting the number of line of code #### Counting the number of line of code
``` ```bash
# apt install cloc sudo apt install cloc
$ cloc --exclude-dir=doc,env . cloc --exclude-dir=doc,env .
``` ```
#### Updating doc/SYNTAX.md #### Updating doc/SYNTAX.md
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment