diff --git a/linux_install.md b/linux_install.md index e816eb9..2c737bb 100644 --- a/linux_install.md +++ b/linux_install.md @@ -4,14 +4,15 @@ ### Dependency list -* Python >3.5 -* PostgreSQL >9.5 -* pip3 -* virtualenv -* npm +* Python >3.5 +* PostgreSQL >9.5 +* pip3 +* virtualenv +* npm Install with apt: -``` + +```bash sudo apt install python3 sudo apt install python3-pip sudo apt install postgresql @@ -24,15 +25,16 @@ More info about PostgreSQL at: These packages might be needed on certain platforms: -* python3-dev -* libffi-dev -* python3-cffi -* libssl-dev +* python3-dev +* libffi-dev +* python3-cffi +* libssl-dev ## Create a virtual environment for python Create a virtualenv in the parent directory. -``` + +```bash virtualenv -p python3 ../virtualenv.sikweb ``` @@ -40,7 +42,7 @@ virtualenv -p python3 ../virtualenv.sikweb Assuming we are at the root of this repository and virtualenv is one level above. -``` +```bash . ../virtualenv.sikweb/bin/activate ``` @@ -48,27 +50,26 @@ Assuming we are at the root of this repository and virtualenv is one level above Run the install wizard with -``` +```bash bash setup.sh ``` and follow the instructions. -## Done! +## Done ## In case of error on macOS Mojave 10.14 If you get an error saying -``` +```bash The headers or library files could not be found for zlib, a required dependency when compiling Pillow from source. ``` run -``` +```bash xcode-select --install sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / ``` - diff --git a/readme.md b/readme.md index 2b6703d..5756c8c 100644 --- a/readme.md +++ b/readme.md @@ -71,7 +71,7 @@ Run the project in production with gunicorn. Refer to [this page](https://www.di Install production dependencies. -``` +```bash pip install -r requirements.production.txt ``` @@ -82,7 +82,8 @@ Do not use `rebase` when pulling or merging changes. Rebasing transforms the com When you start working on a feature, create a feature branch for your changes. These feature branches should be prefixed with `feature`. Example of creating a feature branch: -``` + +```bash git checkout -b feature-error-page ``` @@ -96,13 +97,13 @@ Merge requests to `master` should be reviewed by multiple developers. Only a mod Lint python files using `pycodestyle` with -``` +```bash pycodestyle --config=setup.cfg --count . ``` Lint javascript and markdown using `eslint` and `remark` with -``` +```bash npm test ``` @@ -112,7 +113,7 @@ Use an editor with linting capabilities to write pretty code that passes linting Run unit tests with -``` +```bash python manage.py test -v 2 ``` diff --git a/windows_install.md b/windows_install.md index 3c39452..5b60860 100644 --- a/windows_install.md +++ b/windows_install.md @@ -12,13 +12,13 @@ Make sure to add the python binary directory to PATH. For instructions how to do Run the following command to install `virtualenv`. -``` +```cmd python -m pip install virtualenv ``` Setup a virtual python environment. -``` +```cmd python -m virtualenv ../virtualenv.sikweb ``` @@ -26,13 +26,13 @@ python -m virtualenv ../virtualenv.sikweb Activate `virtualenv` (note that this has to be active at all times). -``` +```cmd source ../virtualenv.sikweb/Scripts/activate ``` Run the following command to install python packages. -``` +```cmd pip install -r requirements.txt ``` @@ -40,7 +40,7 @@ pip install -r requirements.txt Run -``` +```cmd python manage.py migrate ``` @@ -52,4 +52,4 @@ Follow the instructions on [the npm website](https://www.npmjs.com/package/npm). By default Django uses SQLite, which doesn't need any configuration. If you need PostgreSQL instead, refer to [their website](https://www.postgresql.org/download/windows/). -## Done! +## Done