ome / omero-py

Python project containing Ice remoting code for OMERO
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
20 stars 33 forks source link

Deprecate duplicate plugin #249

Closed sbesson closed 4 years ago

sbesson commented 4 years ago

As work has restarted on the decoupled https://github.com/ome/omero-cli-duplicate/ plugin, this formally deprecates the legacy code in omero-py using the similar strategy as #124. The plugin can then safely be dropped in omero-py 6.

This PR should be tested in two environment

python3 -m venv venv
venv/bin/pip install git+git://github.com/snoopycrimecop/omero-py@merge_ci#egg=omero-py
venv/bin/omero duplicate -h # should fail
OMERO_DEV_PLUGINS=true venv/bin/omero duplicate -h # should display the help
OMERO_DEV_PLUGINS=true venv/bin/omero duplicate Dataset:50 # should display a deprecation warning
python3 -m venv venv
venv/bin/pip install git+git://github.com/snoopycrimecop/omero-py@merge_ci#egg=omero-py
venv/bin/pip install git+git://github.com/snoopycrimecop/omero-cli-duplicate@merge_ci#egg=omero-cli-duplicate
venv/bin/omero duplicate -h # should display the help message
venv/bin/omero duplicate Dataset:50 # should duplicate without warnings
sbesson commented 4 years ago

In addition to the manual testing above, I suspect this deprecation should allow https://merge-ci.openmicroscopy.org/jenkins/job/OMERO-test-integration/ to properly install and test the recent omero-cli-duplicate improvements

will-moore commented 4 years ago

Testing omero-py alone I don't see a deprecation warning with:

$ OMERO_DEV_PLUGINS=true venv/bin/omero duplicate Dataset:232
Using session for will@localhost:4064. Idle timeout: 10 min. Current group: Lab Data
omero.cmd.Duplicate Dataset:232 ok
sbesson commented 4 years ago

Ah. My changes might only apply in the case of a detailed report. Does $ OMERO_DEV_PLUGINS=true venv/bin/omero duplicate Dataset:232 --report display the warning?

will-moore commented 4 years ago

Yes:

$ OMERO_DEV_PLUGINS=true venv/bin/omero duplicate Dataset:232 --report
Using session for will@localhost:4064. Idle timeout: 10 min. Current group: Lab Data
omero.cmd.Duplicate Dataset:232 ok
Steps: 8
Elapsed time: 0.038 secs.
Flags: []
This plugin is deprecated as of OMERO 5.8.0. Use the plugin available from https://pypi.org/project/omero-cli-duplicate/ instead.
Duplicates
  Dataset:1155
will-moore commented 4 years ago

With the plugin installed, duplicate works without warning message. 👍

sbesson commented 4 years ago

Cheers. Let me push another commit so that the warning message is displays on every invocation of the command

will-moore commented 4 years ago

Works for me now, testing locally...

$ OMERO_DEV_PLUGINS=true venv/bin/omero duplicate Dataset:232
This plugin is deprecated as of OMERO.py 5.8.0. Use the plugin available from https://pypi.org/project/omero-cli-duplicate/ instead.
Previous session expired for will on localhost:4064
Server: [localhost:4064] 
Username: [will]
Password:
Created session for will@localhost:4064. Idle timeout: 10 min. Current group: Lab Data
omero.cmd.Duplicate Dataset:232 ok
mtbc commented 4 years ago

OMERO-test-integration is failing, maybe we need to decide about the pip install omero-cli-duplicate for devspaces.

sbesson commented 4 years ago

Probably largely depends on where we decide to run the integration test for the new omero-cli-duplicate functionalities:

mtbc commented 4 years ago

The for-the-meantime-at-least decision seemed to be to have them in ome/openmicroscopy.