dlr-gtlab / python-module

GTlab Module for embadding Python into GTlab
0 stars 0 forks source link

Resolve "It should be possible to access the input and output arguments of any Python task or calculator from the Python script" #535

Closed rainman110 closed 2 months ago

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Nov 15, 2023, 18:42

Closes #249

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Nov 16, 2023, 08:45

added 1 commit

Compare with previous version

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Nov 16, 2023, 08:51

added 1 commit

Compare with previous version

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Nov 16, 2023, 09:08

added 2 commits

Compare with previous version

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Nov 16, 2023, 09:19

added 1 commit

Compare with previous version

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Nov 16, 2023, 09:27

added 1 commit

Compare with previous version

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Nov 16, 2023, 10:10

added 1 commit

Compare with previous version

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Nov 16, 2023, 10:20

added 9 commits

Compare with previous version

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Nov 16, 2023, 10:33

added 1 commit

Compare with previous version

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Nov 16, 2023, 10:34

marked this merge request as ready

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Dec 8, 2023, 08:34

@rainman110 @jensschmeink Could you please review these changes?

rainman110 commented 2 months ago

In GitLab by @rainman110 on Dec 8, 2023, 16:24

Commented on src/module/utilities/gtpy_decorator.cpp line 517

Are you sure, that calc cannot be nullptr? What if the argument is a python "None"?

rainman110 commented 2 months ago

In GitLab by @rainman110 on Dec 8, 2023, 16:25

Commented on src/module/utilities/gtpy_decorator.cpp line 521

More a question to understand the system: Are these exception handled somewhere?

rainman110 commented 2 months ago

In GitLab by @rainman110 on Dec 8, 2023, 16:27

Commented on src/module/utilities/gtpy_decorator.h line 244

Why not const?

rainman110 commented 2 months ago

In GitLab by @rainman110 on Dec 8, 2023, 16:29

Commented on src/module/utilities/gtpy_convert.h line 25

Please add documentation, in particular, that the container is converted into a python dictionary.

rainman110 commented 2 months ago

In GitLab by @rainman110 on Dec 8, 2023, 16:29

Commented on src/module/utilities/gtpy_decorator.h line 302

why not const?

rainman110 commented 2 months ago

In GitLab by @rainman110 on Dec 8, 2023, 16:29

Commented on src/module/utilities/gtpy_decorator.h line 277

Why not const?

rainman110 commented 2 months ago

In GitLab by @rainman110 on Dec 8, 2023, 16:29

Commented on src/module/utilities/gtpy_decorator.h line 219

Why not const?

rainman110 commented 2 months ago

In GitLab by @rainman110 on Dec 8, 2023, 16:29

Looks good in general. I made some comments, please have a look.

In general, It would be good, if you could at least provide some examples, which i can use to test the functionality.

Even better would be proper tests of course, by I acknowledge, that we don't have a testing system in place.

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Dec 19, 2023, 16:29

Commented on src/module/utilities/gtpy_decorator.cpp line 517

The first argument in the decorator methods behaves similarly to the self argument in Python. If you have a GtpyScriptCalculator object in Python, you can call inputArgs() as a member method. inputArgs() does not expect any arguments in Python. It is therefore not possible to pass None as an argument. The decorator methods are currently not called directly within the Python Module. However, if the method is called directly in C++ code a nullptr could be passed. Therefore a nullptr check could be useful at this point.

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Dec 19, 2023, 16:37

Commented on src/module/utilities/gtpy_decorator.h line 244

changed this line in version 9 of the diff

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Dec 19, 2023, 16:37

Commented on src/module/utilities/gtpy_decorator.h line 302

changed this line in version 9 of the diff

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Dec 19, 2023, 16:37

Commented on src/module/utilities/gtpy_decorator.h line 277

changed this line in version 9 of the diff

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Dec 19, 2023, 16:37

Commented on src/module/utilities/gtpy_decorator.h line 219

changed this line in version 9 of the diff

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Dec 19, 2023, 16:37

added 1 commit

Compare with previous version

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Dec 20, 2023, 09:18

Commented on src/module/utilities/gtpy_decorator.cpp line 521

Yes, PythonQt handles these exceptions.

rainman110 commented 2 months ago

In GitLab by @marvinoe21 on Dec 20, 2023, 09:33

added 1 commit

Compare with previous version