Commit 30185f2d authored by Jamy Mahabier's avatar Jamy Mahabier Committed by Justin van der Krieken

Improve readme

parent 2b9b7c23
......@@ -5,9 +5,9 @@ Zesje is an online grading system for written exams.
## Development
### Setting up a development environment
Make sure you have `yarn` (installable via your local package manager), and Python 3.6 installed.
Make sure you have Yarn and Python 3.6 installed.
Install the necessary `yarn` dependencies:
Install the necessary Yarn dependencies:
yarn install
......@@ -15,31 +15,56 @@ We will keep the Python dependencies in a virtual environment:
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
Native dependencies:
pip install -r requirements.txt -r requirements-dev.txt
Mac OS X:
Also install the required native dependencies:
brew install libdmtx
| OS | Command |
|---------------|------------------------------|
| macOS | `brew install libdmtx` |
| Debian/Ubuntu | `sudo apt install libdmtx0a` |
| Arch | `pacman -S libdmtx` |
| Fedora | `dnf install libdmtx` |
| openSUSE | `zypper install libdmtx0` |
| Windows | *not necessary* |
Linux:
### Running a development server
Run
yarn dev
to start the development server, which you can access on http://127.0.0.1:8881.
It will automatically reload whenever you change any source files in `client/`
or `zesje/`.
### Running the tests
You can run the tests by running `yarn test`.
### Code style
#### Python
Adhere to PEP8, but use a column width of 120 characters (instead of 79).
sudo apt install libdmtx0a
If you followed the instructions above, the linter `flake8` is installed in your virtual environment. If you use Visual Studio Code, install the [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) extension and add the following lines to your workspace settings:
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": ["--config=.flake8"],
"[python]": {
"editor.rulers": [120]
}
If you use Atom, install the [linter-flake8](https://atom.io/packages/linter-flake8) plugin and add the following lines to your config:
".source.python":
"editor":
"preferredLineLength": 120
### Adding dependencies
#### Server-side
If you start using a new Python library, be sure to add it to `requirements.txt`
If you start using a new Python library, be sure to add it to `requirements.txt`.
#### Client side
Yarn keeps track of all the client-side dependancies in `config.json` when you install new packages with `yarn add ...`
### Running a development server
run
`yarn dev`
to start the development server, which you can access on http://127.0.0.1:8881.
It will automatically reload whenever you change any source files in `client/`
or `zesje/`.
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