GRruby

23 views
Skip to first unread message

Pranav Garg

unread,
Jun 11, 2018, 7:40:56 AM6/11/18
to Prasun Anand, Sameer Deshmukh, SciRuby Mailing List
Hi Guys,
I will be updating the progress for the Ruby Wrapper for GR here.
Recently I have corrected the indentation and integrated autotest with RSpec in the commit here.

This week I will be working to create extensions to structures, extend certain functions as well as creating examples for reference after which I will focus on porting GR3 and error handling.

For the naming of the functions, I have kept the API similar to the one in Python and Julia so that users can look into examples in other languages. I think that we should follow the naming conventions set by the GR Core developers.

I will be posting a blog post soon explaining the installation process and the use of the API.

Regards
Pranav Garg

John Woods

unread,
Jun 11, 2018, 10:22:26 AM6/11/18
to sciru...@googlegroups.com, Prasun Anand, Sameer Deshmukh
Where are the unit tests?

--
You received this message because you are subscribed to the Google Groups "SciRuby Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sciruby-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pranav Garg

unread,
Jun 11, 2018, 10:34:01 AM6/11/18
to SciRuby Mailing List, Prasun Anand, Sameer Deshmukh
Since the majority of the functions return void and draw the output on gks or an image, I am not sure how they can be tested.Any suggestions for the same?

 What I thought could be done is to make functions return true if the inputs were in correct format(like a homogenous list), else return false.This is something which I would deal during error handling.
Please let me know your thoughts for the same.

Regards
PG

Maurice Diamantini

unread,
Jun 11, 2018, 1:25:06 PM6/11/18
to sciru...@googlegroups.com, Maurice Diamantini, Prasun Anand, Sameer Deshmukh
Bonjour Pranav,

To test the generation of images, you can examine a little more than the file extension, for example its size or other statistics on pixel values.

Regards,
-- Maurice

John Woods

unread,
Jun 11, 2018, 6:25:52 PM6/11/18
to sciru...@googlegroups.com, Prasun Anand, Sameer Deshmukh
I think we talked a few months back on the Google Group about how matplotlib solves this problem.


Take a look at that package.

Sameer Deshmukh

unread,
Jun 14, 2018, 9:38:44 AM6/14/18
to Maurice Diamantini, sciru...@googlegroups.com, Prasun Anand
Pranav:

Whats the update on the structures?

The week is almost over and I can't see any new updates on your repo
about structures or any examples using the same. Remember that as per
your timeline you had to begin working on the Artist interface over the
next 1-2 weeks.

Pranav Garg

unread,
Jun 14, 2018, 10:03:56 AM6/14/18
to SciRuby Mailing List, Maurice Diamantini, Prasun Anand
Hey Sameer,
I have been working on creating examples and making the GR Framework more compatible with Ruby following the examples of Python, I will update that on the Repo by tomorrow evening IST.
I have written a blog post about the installation of the extensions and will release it after I test it on a VM. (I am downloading the Image as I write this).

After further investigating into the structure which is a simple structure that just contains two double variables (https://gr-framework.org/c-gr.html#_CPPv28vertex_t) and is just used in a single function(https://gr-framework.org/c-gr.html#_CPPv211gr_drawpathiP8vertex_tPhi). I think it would be better to not wrap the structure and rather include two lists and wrap their components intrinsically. Note that this function is not available in python API.
 
Since the project statement has shifted from Creating a plotting library to porting one. I will be spending the next two weeks error handling followed by creating API like histogram, scatterplot etc that are provided in Julia port of GR but not the Python port.

Let me know your thought for the same
Regards
PG

To unsubscribe from this group and stop receiving emails from it, send an email to sciruby-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "SciRuby Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sciruby-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "SciRuby Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sciruby-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "SciRuby Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sciruby-dev+unsubscribe@googlegroups.com.

Pranav Garg

unread,
Jun 14, 2018, 4:54:22 PM6/14/18
to SciRuby Mailing List, Prasun Anand, Sameer Deshmukh, John Woods, Pjotr Prins, Arafat Khan
Hey Guys,
Eid Mubarak to everyone of you !
I hope you all are doing well.

Here is a blog post about the installation of GR Framework API for Ruby. Over the weekend I will try to write 2 more posts. One about My GSoC experience and another as a continuation to my C extensions post. I am trying to translate the python examples into Ruby,Anmd learning quite a lot about Ruby from the same. There are certain changes that I am making to the Ruby API based on Python GR API.

One of the thoughts that crossed my mind as a design decision to make GR Compatible with Nmatrix. Currently, it takes a Ruby list as input for a coordinate. For example, if I want to plot the coordinates (2,4) and (7,5) I have to do :

GR.polymarker([2,7],[4,5])

that is give a list of X co-ordinates and a list of corresponding Y co-ordinates. During error handling I will work to resolve cases where in lets say someone gave a heterogeneous list [2,"Tardis"].I was wondering that instead of that,perhaps I can directly use Nmatrix arrays as they are homogeneous and a plotting Library would be better suited to work with a linear algebra Library.

Again I am not sure about how to do the same and parse an Nmatrix array into a C Array., I would like to know your thoughts about the same and would be glad if anyone can help me out with it.

Regards
Pranav Garg
Reply all
Reply to author
Forward
0 new messages