Create devcontainer.json setup for vscode
Description
Add json file for doing development inside a development container based on ELLAs Dockerfile.
You need to have VSCode with the extension ms-vscode-remote.remote-containers
. Then, you should execute > Remote-Containers: Rebuild and Reopen in Container
, and you should be set up with VSCode connected to VSCode server running inside the ELLA container, with the ELLA running on `http://localhost:5000.
When using this, you can be sure to use the correct linting and formatting tools (on correct versions), and you get autocompletion for entire ELLA codebase.
Settings are added, and overrides current workspace settings to set up linting, formatting, and some extensions:
-
esbenp.prettier-vscode
(prettier for formatting JSON, javascript, HTML++) -
dbaeumer.vscode-eslint
(eslint for javascript linting) -
ms-python.python
(standard Python extensions, for using e.g.black
,mypy
, andflake8
) -
mtxr.sqltools
(extension to inspect ELLA database, default settings included) -
mtxr.sqltools-driver-pg
(postgres driver formtxr.sqltools
) -
yzhang.markdown-all-in-one
(tools for writing and previewing markdown)
From the dev container you have the following tasks available:
reset db
Supervisor: web restart
Setup test environment
Note: eslint
was not working properly, as we used the wrong parser. Replaced this with babel-eslint
, which accepts e.g. javascript decorators.
Related issues
Notes to review (code/docs/QA)
This is most certainly not written in stone. Other settings, extensions, tasks etc could be useful, but I think this is a good start.
Tests
General
-
Tests have been added that prove my fix is effective or that my feature works -
Related tests have been modified/removed
Hypothesis testing:
-
Soak testing has been done -
Distribution between positive / negative cases has been checked
Database
-
Includes changes to database schema -
Includes necessary database migrations
Configuration
-
Includes changes to configuration -
Includes configuration migration instructions in documentation
Merge checklist
-
Self-review of code has been performed. -
Feature review and validation against specification has been performed (if applicable). Apply label: QAdone -
Need for documentation has been evaluated and, if necessary, updated. Apply label: docsdone -
Code and implementation has been reviewed by other core developer (including any changes based on initial review). Apply label: code reviewdone