palma-ice / yelmo

Yelmo ice-sheet model code base
GNU General Public License v3.0
14 stars 3 forks source link

Devcontainer #2

Closed tgoelles closed 3 years ago

tgoelles commented 4 years ago

Hi,

I made a devcontainer for yelmo. A devcontainer is a docker container which is used by VS Code. This makes it very easy to get started with Yelmo, as everything is installed in the container (fortran, LIS, NetCDF, python, Fortran linters, debugger, code completion for fortran and more).

Why docker?

Why VS code?

But you can of course also use the Dockerfile alone, with your favourite editor.

I also added a section in the readme on how to get started.

BTW: It also uses python black, as a formater for the python files. This makes it easier to see relevant changes and not just formatting issues.

The config.py change was only make yelmo_benchmarks to make benchmarks and the rest was formatting done by black.

This does not change anything on already existing installations, they simply ignore the .devcontainer.

There is now a new docker_gfortran config file. I could also move this one to .dev_container but keept it there for consistency.

For more info see: https://code.visualstudio.com/docs/remote/containers

cheers, Thomas

alex-robinson commented 3 years ago

Hi Thomas,

Thanks for the efforts! This is an interesting development to include in Yelmo. I agree it could make it easier for people to get started with Yelmo.

Best regards, Alex