Replace ruby with python

Merged
#468 · Created  · Last updated

Merged pull request

Merged in feature/replace_ruby_with_python (pull request #468)

5e17f60·Author: ·Closed by: ·2021-07-20

Description

Aims to replace ruby as a code generator with python for two main reasons:

  1. Python knowledge is more widespread amongst typical gyrokinetics developers

  2. Python is more likely to be available by default on the machines we’re using.

 

The python written at the moment is just intended to be functional rather than efficient. Code generation is probably best implemented using jinja in python but we don’t use this currently to avoid any dependencies outside of python. We may also want to move these generators out of the build process and instead keep them as helper scripts that developers can use to avoid having to manually write boilerplate (similar to the config generation tools).

 

The ruby files to replace are below, with a indicating they’ve been replaced in this PR

  • ./src/gs2_init.rb

  • ./src/geo/generate_read_chease.rb

  • ./src/overrides.rb

  • ./src/diagnostics/simpledataio/src/generate_simpledataio_read.rb

  • ./src/diagnostics/simpledataio/src/generate_simpledataio_write.rb

  • ./src/diagnostics/generate_diagnostics_ascii.rb

  • ./src/diagnostics/generate_diagnostics_create_and_write.rb

Also includes a bit of makefile tidying enabled by some of the changes in the generated code.

0 attachments

0 comments

Loading commits...