Skip to content

How to update GR.rb

kojix2 edited this page Feb 19, 2023 · 8 revisions

The following workflow is written so that you can maintain GR.rb even if you are sleepy.

  1. New version of sciapp/gr is released.

  2. Update packages (optional)

    1. Homebrew: Send pull request to homebrew-core to update libgr package (optional).
    2. Windows: Update the MINGW package.
  3. Update lib/ffi.rb in GR, GR3, GRM.

  4. Update gr.rb and gr3.rb. (gr/plot)

  5. Add some tests if possible.

  6. Leave it for a few days to check if sciapp team does not release a minor update.

  7. Release a new version of the gem.

Fiddle's implicit type conversion

  • Ruby's Integer and Float are automatically converted to C types: int, float, and double.
  • You do not need to convert the String.
  • Be careful if you want to pass an array or a pointer as an argument.

GR.rb's implicit type conversion

  • Arrays are converted to the default type.
  • If the argument type is not the default type, you must convert it manually.
  • You can use GRCommonUtils methods such as int, float, double, and uint for this purpose.

GR.rb DSL

  • inquiry methods are provided for passing a pointer as an argument.
  • If you need a "pointer of pointer", you have to handle it yourself.

CI

  • The CI of Github Actions takes about 20 minutes.
  • If you put [skip ci] in the commit message, you can skip ci.