Skip to content

Releases: ibois-epfl/script-sync

v1_2_20: patch list translation to trees

06 Nov 17:17
115d5bb
Compare
Choose a tag to compare

This patch release solves a problem with the list output in case of mixed level in nested lists in script-sync grasshopper component for CPython. Now the following lists are correctly output as trees.

list_A = [
    [
        [1, 2],  
        [3, 4]   
    ],
    [
        [5, 6],  
        [7, 8]   
    ]
]

list_B = [
    1, 2, 3, 4,  
    [
        [5, 6],  
        [7, 8]   
    ],
    9, 10, 11, 12  
]

list_C = [
    1, 2, 3, 4,  
    [5, 6],      
    [7, 8]       
]


list_D = [1, 2, 3, 4]

list_E = [
    1, 2, 3, 4,
    [
        [
            [5, 6],
            [7, 8]
        ],
    ],
    9, 10, 11, 12
]

list_F = [
    [
        [
            [5, 6],
            [7, 8]
        ],
    ]
]

image

v1_2_13: publishing pipeline fixes

23 Aug 12:22
f7f2404
Compare
Choose a tag to compare

This is a simple patch to fix the Release CI pipeline for script-sync. Now when released a new version:

  • manifest is updated automatically of one patch unit to avoid conflicts with existing packages on yak server
  • both vsix and yak are correctly published

v1_2_6: features + fixes

21 Aug 21:18
Compare
Choose a tag to compare

New features

  • now nested lists are automatically parsed into trees with corrected branches. Additionally if the user return a tree it will be detected and kept intact as a return value
    The following code will work both ways:
      # option 1
      py_nlist = [
          [[1, 2], [3, 4]],
          [[5, 6], [7, 8]]
      ]
      # options 2
      import ghpythonlib.treehelpers as th
      gh_tree = th.list_to_tree(py_nlist)
      
      o_as_nlist = py_nlist
      o_as_tree = gh_tree

listtreeauto

  • an automatic button has been added when component is added because life is already hard enough 🍯

autobutton

Fixes

  • #6
  • #20
  • The component is not throwing an error by default when the component is not dropped on the canvas. It is now raising an "info" Gh message by default inviting to choose a file.
  • file name reappear as message on the component if the .gh file is closed and re-opened
  • minor cleaning

v1_2_5: temproary fix for error messages

23 Jul 20:28
Compare
Choose a tag to compare

prints before the error messages are broken from the latest update of RHino. Reversing to not printing any message before the occurance of the error in the script. Trying to solvin' it in future release.. 🐛

v1_2_4: new tests for error logs

20 Jul 17:49
Compare
Choose a tag to compare

When a script presents an error now we print also the prints before the error line.

Since I would like to still raise a classical red exception on the grasshopper component, for now, the best it's maybe just be to add the previous prints before the error to the error tile description and reformat a bit better the error logs:

image

image

v1_2_3:temp fix for Rhino update breaks

20 Jul 16:50
Compare
Choose a tag to compare

The Rhino 8.9.24194.18121 version brakes various problems for script-sync.
This release introduce a fix for the

  • #18 : I allow to reload only one custom package and it works
  • #17 : this is only a temporary fix, the error will still be present in Rhino. Nothing cannot be done untill they solve the bug. The only thing we can do is chaging the package_2_reload to only item and not list so the error will not occur immediately. It's onlytemporary.

v1_2_0: compatibility for MacOS 🍎

31 May 14:10
07e0486
Compare
Choose a tag to compare

This release introduce support for MacOS for the script-sync grasshopper component!

v1_1_24: various patches for bugs 🐛

20 May 20:38
Compare
Choose a tag to compare

This Release introduces various fixes:

thread-safe: A new thread is added to the windows form to select the file. This should avoid the freezing of the canvas.

better-naming: the btn is now changed to a more understandable name select_file

now the error is catched and error is thrown by giving back a failure. So for now we cannot run two instances of script-sync rhino but at least this case is handled.

try
{
    TcpListener check = new TcpListener(IPAddress.Parse(Ip), Port);
    check.Start();
    check.Stop();
}
catch (Exception e)
{
    if (e.Message.Contains("Only one usage of each socket address"))
    {
        RhinoApp.WriteLine("Error: there are two instances of Rhino running script-sync, only one is allowed.");
    }
    else
    {
        RhinoApp.WriteLine("Error: " + e.Message);
    }
    return Rhino.Commands.Result.Failure;
}

now the error has a traceback that shows the line and module generating the error as well as all the traceback log, this is an example:

1. Error running script (PythonException): script-sync::Error in the code: invalid syntax (my_module.py, line 3)
Traceback (most recent call last):
  File "rhinocode:///grasshopper/1/e324c158-c009-4f19-b311-f20f3ae7d386/7243b0c7-8b8c-47fa-8009-1ad5b42499bc", line 383, in safe_exec
  File "rhinocode:///grasshopper/1/e324c158-c009-4f19-b311-f20f3ae7d386/7243b0c7-8b8c-47fa-8009-1ad5b42499bc", line 345, in reload_all_modules
  File "C:\Users\andre\.rhinocode\py39-rh8\lib\importlib\__init__.py", line 169, in reload
    _bootstrap._exec(spec, module)
  File "<frozen importlib._bootstrap>", line 613, in _exec
  File "<frozen importlib._bootstrap_external>", line 846, in exec_module
  File "<frozen importlib._bootstrap_external>", line 983, in get_code
  File "<frozen importlib._bootstrap_external>", line 913, in source_to_code
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "F:\script-sync\GH\PyGH\test\my_module.py", line 3
    print("script-sync::Hello from my_module.py")a
                                                 ^
SyntaxError: invalid syntax

Now the output parameters do not stick anymore between the recomputation of the component. This is done by emptying the locals dict in the exec() function.

The output nested lists now are automatically converted to GHTrees but only for 2 level of depth

v1_1_23: small patch for enabling automatic CI

05 May 17:01
Compare
Choose a tag to compare

This is an internal release, the code is unchanged but the CI repo are now fixed and the ghusers are included in the yak package.

v1_1_21: minor fix to support pyd

02 May 15:53
Compare
Choose a tag to compare

This is a small patch to support the reload of packages by skipping the .pyd since they cannot be reloaded (they need to be recompiled anyways).