diff options
| -rw-r--r-- | .coveragerc | 3 | ||||
| -rw-r--r-- | DEVELOPING.md | 6 | ||||
| -rw-r--r-- | docker-compose.yml | 4 | 
3 files changed, 6 insertions, 7 deletions
diff --git a/.coveragerc b/.coveragerc index cd0ab81..cc2a148 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,9 +1,10 @@  [run] -branch = True +branch = true  include = snekbox/*  omit =      snekbox/api/app.py      snekbox/config_pb2.py +relative_files = true  [report]  exclude_lines = diff --git a/DEVELOPING.md b/DEVELOPING.md index fdda51a..0dbf4cc 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -30,8 +30,6 @@ docker-compose up  The container has all development dependencies. The repository on the host is mounted within the container; changes made to local files will also affect the container. -Note that the compose file depends on the environment variable `PWD` being set to the current working directory. It needs it to create the aforementioned bind mount. Unix shells normally have this set already. If for some reason it is not set, it needs to be manually set. A convenient way to set it is to define it in a `.env` file which Docker Compose will automatically read. -  To build a normal container that can be used in production, run  ``` @@ -62,7 +60,9 @@ Alternatively, a report can be generated as HTML with  pipenv run coverage html  ``` -The HTML will output to `./htmlcov/` by default +The HTML will output to `./htmlcov/` by default. + +The report cannot be generated on Windows directly due to the difference in file separators in the paths. Instead, launch a shell in the container (see below) and use `coverage report` or `coverage html` (do not invoke through Pipenv).  ## Launching a Shell in the Container diff --git a/docker-compose.yml b/docker-compose.yml index f546024..3854825 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,10 +11,8 @@ services:      init: true      ipc: none      tty: true -    working_dir: $PWD      environment:        DEBUG: 1 -      PIPENV_PIPFILE: /snekbox/Pipfile        PYTHONDONTWRITEBYTECODE: 1      build:        context: . @@ -24,7 +22,7 @@ services:        cache_from:          - ghcr.io/python-discord/snekbox:latest      volumes: -      - $PWD:$PWD +      - .:/snekbox        - user-base:/snekbox/user_base  volumes:  |