mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
Merge branch 'contribution-instructions' into 'master'
Update contributing and readme to xapian dependency See merge request ae/Sith!183
This commit is contained in:
commit
a96aeba1fa
@ -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:
|
||||
|
32
README.md
32
README.md
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user