Topics

Remove JythonSiglet and JythonAutomaton?

Randall Wood <rhwood@...>
 

The classes `jmri.jmrit.automat.JythonAutomaton` and `jmri.jmrit.automat.JythonSiglet` have been inaccessible in JMRI code since [March 6 2004](https://github.com/JMRI/JMRI/commit/92416888c9b43c5c9d24ad315b5e84f3fe985f00) since the *Action classes to allow those to be launched were removed from the JMRI UI. Is it okay to remove

- jmri.jmrit.automat.JythonAutomaton
- jmri.jmrit.automat.JythonAutomatonAction
- jmri.jmrit.automat.JythonSiglet
- jmri.jmrit.automat.JythonSigletAction

I cannot find (in either the old Yahoo or groups.io user groups) any confirmation that these classes had ever been used with a script.

Why remove them?
1. Not used anywhere, and not exposed in JMRI for 15 years
2. No examples of how to use available
3. The functionality these offer is directly handled by creating an AbstractAutomaton or AbstractSiglet entirely in Jython and launching that (and there are numerous tested examples of that)
4. No test cases exist for these classes other than verifying constructors do not error
5. Unused code is a long term maintenance concern

Are there reasons not to remove these by immediately deprecating them for eventual removal?

Also is any of the content of https://www.jmri.org/help/en/html/tools/scripting/Python.shtml something we want to support (using JMRI as a library in Jython)?

Randall

danielb987
 

For me that doesn't know anything about Python/Jython, that page is useful even if I'm only using Jython to write scripts used by JMRI.

Daniel

2019-09-21 14:15 skrev Randall Wood via Groups.Io:

Also is any of the content of
https://www.jmri.org/help/en/html/tools/scripting/Python.shtml
something we want to support (using JMRI as a library in Jython)?
Randall

Bob Jacobsen
 

15 years of deprecations is enough, I think.

Bob

On Sep 21, 2019, at 2:15 PM, Randall Wood via Groups.Io <rhwood=mac.com@groups.io> wrote:

The classes `jmri.jmrit.automat.JythonAutomaton` and `jmri.jmrit.automat.JythonSiglet` have been inaccessible in JMRI code since [March 6 2004](https://github.com/JMRI/JMRI/commit/92416888c9b43c5c9d24ad315b5e84f3fe985f00) since the *Action classes to allow those to be launched were removed from the JMRI UI. Is it okay to remove

- jmri.jmrit.automat.JythonAutomaton
- jmri.jmrit.automat.JythonAutomatonAction
- jmri.jmrit.automat.JythonSiglet
- jmri.jmrit.automat.JythonSigletAction

I cannot find (in either the old Yahoo or groups.io user groups) any confirmation that these classes had ever been used with a script.

Why remove them?
1. Not used anywhere, and not exposed in JMRI for 15 years
2. No examples of how to use available
3. The functionality these offer is directly handled by creating an AbstractAutomaton or AbstractSiglet entirely in Jython and launching that (and there are numerous tested examples of that)
4. No test cases exist for these classes other than verifying constructors do not error
5. Unused code is a long term maintenance concern

Are there reasons not to remove these by immediately deprecating them for eventual removal?

Also is any of the content of https://www.jmri.org/help/en/html/tools/scripting/Python.shtml something we want to support (using JMRI as a library in Jython)?

Randall
--
Bob Jacobsen
@BobJacobsen

Peter Ulvestad
 

Petr says he is using them

https://groups.io/g/jmriusers/message/164158
https://groups.io/g/jmriusers/message/164160

--
Peter Ulvestad

JMRI Users Group Moderator - http://www.jmri.org ( http://www.jmri.org )
Tam Valley Group Moderator - https://tamvalleydepot.com/ ( http://tamvalleydepot.com/ )
Sprog-DCC Group Moderator - http://www.sprog-dcc.co.uk/ ( http://www.sprog-dcc.co.uk/ )
Edmonton Model Railroad Association - http://www.emra.club/

Dave Sand
 

Peter,

In 164160 he corrected himself and says that he is using the parent classes, not the Jython… versions.

Dave Sand

On Sep 21, 2019, at 12:42 PM, Peter Ulvestad <ulvestad@...> wrote:

Petr says he is using them

https://groups.io/g/jmriusers/message/164158
https://groups.io/g/jmriusers/message/164160

--
Peter Ulvestad

JMRI Users Group Moderator - http://www.jmri.org ( http://www.jmri.org )
Tam Valley Group Moderator - https://tamvalleydepot.com/ ( http://tamvalleydepot.com/ )
Sprog-DCC Group Moderator - http://www.sprog-dcc.co.uk/ ( http://www.sprog-dcc.co.uk/ )
Edmonton Model Railroad Association - http://www.emra.club/


Randall Wood <rhwood@...>
 

Sorry. Wrong page. Is https://www.jmri.org/help/en/html/doc/Technical/Jython.shtml something we want to support (running JMRI apps within a Jython app)?


On Sep 21, 2019, at 13:12, danielb987 <db123@...> wrote:

For me that doesn't know anything about Python/Jython, that page is useful even if I'm only using Jython to write scripts used by JMRI.

Daniel

2019-09-21 14:15 skrev Randall Wood via Groups.Io:
Also is any of the content of
https://www.jmri.org/help/en/html/tools/scripting/Python.shtml
something we want to support (using JMRI as a library in Jython)?
Randall



Bob Jacobsen
 

There’s a bunch of content on that page that’s useful for our usual Jython-inside-JMRI form, which it would be good to keep.

The run-JMRI-insde-Jython form(i.e. running the ./jmrithon script) was requested ~2004 or so by one specific modeler who wanted to embed JMRI in some existing Python code. AFAIK, he never actually used it; it was always incredibly fragile. I’m pretty sure it doesn’t even work now. I’m good with removing that from the doc, and removing the script/jmrithon file at the same time. (I don’t see it in the build process, so I don’t think we’re currently distributing it)

Bob

On Sep 21, 2019, at 8:02 PM, Randall Wood via Groups.Io <rhwood=mac.com@groups.io> wrote:

Sorry. Wrong page. Is https://www.jmri.org/help/en/html/doc/Technical/Jython.shtml something we want to support (running JMRI apps within a Jython app)?


On Sep 21, 2019, at 13:12, danielb987 <db123@...> wrote:

For me that doesn't know anything about Python/Jython, that page is useful even if I'm only using Jython to write scripts used by JMRI.

Daniel

2019-09-21 14:15 skrev Randall Wood via Groups.Io:
Also is any of the content of
https://www.jmri.org/help/en/html/tools/scripting/Python.shtml
something we want to support (using JMRI as a library in Jython)?
Randall

--
Bob Jacobsen
@BobJacobsen