opensafely / research-template

The template for new research projects that use the OpenSAFELY framework.
MIT License
16 stars 13 forks source link

Add initial .gitpod.yml and tasks.yml #35

Closed bloodearnest closed 3 years ago

bloodearnest commented 3 years ago

This adds initial workspace config for a default opensafely project.

When ever anything is pushed to master, gitpod should run the init steps and cache the resulting docker image as a prebuild. Any subsequent launches of gitpod for this repo will use the prebuild workspace.

All the prebuild currently does is install opensafely cli tool, and pull down the docker images that are used in this project, and enable some default extensions.

Additionally, whenever a workspace is re-opened, it automatically updates the opensafely cli tool.

In addition, we add a custom vscode build task, which runs the project. This can be accessed via the Terminal->Tasks menu and also by the default build command, Ctrl-Shift-B.

gitpod-io[bot] commented 3 years ago

StevenMaude commented 3 years ago

@bloodearnest asked me to have another look over this following the addition and it still looks fine.

It reminded me that I was thinking about one setting: is auto save enabled by default good or bad? I think Gitpod are overriding the Visual Studio Code default of off here:

By default, VS Code requires an explicit action to save your changes to disk https://code.visualstudio.com/docs/editor/codebasics

No strong opinion here. Is it helpful — we don't need to tell people to save their work; they can just stage changes — or is it unexpected/surprising/confusing if they move to an editor where this doesn't happen (particularly if that is Visual Studio Code)?

It might suffice to document that auto save is enabled by default, so no saving is required.