Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

omero.scripts: prepare scripts for use of CLI #186

Merged
merged 1 commit into from Apr 20, 2020

Conversation

joshmoore
Copy link
Member

User-scripts should be able to simply create an
omero.cli.CLI instance and perform operations w/o
needing to re-login. For import, this requires
passing the omero.host property setting.

see: https://lists.openmicroscopy.org.uk/pipermail/ome-users/2014-September/004783.html

User-scripts should be able to simply create an
omero.cli.CLI instance and perform operations w/o
needing to re-login. For import, this requires
passing the `omero.host` property setting.

see: https://lists.openmicroscopy.org.uk/pipermail/ome-users/2014-September/004783.html
@joshmoore
Copy link
Member Author

cc: @sukunis

I'll open a PR next about ome/openmicroscopy with an integration test.

joshmoore added a commit to joshmoore/openmicroscopy that referenced this pull request Mar 5, 2020
@jburel
Copy link
Member

jburel commented Mar 17, 2020

wrote a little python script to import a file

import omero.scripts
import omero.cli
cli = omero.cli.CLI()
cli.loadplugins()
c = omero.scripts.client("example.py")
cli._client = c.createClient(secure = True)
cli.invoke(["import", "/Users/jmarie/Desktop/s.png"])
  • OMERODIR needed to be set in the terminal
  • Run ICE_CONFIG=ice.config python example.py
    (doc from omero.scripts.client the returned client is created via the empty constructor to omero.client using only --Ice.Config or ICE_CONFIG)
    The file imported correctly

@joshmoore
Copy link
Member Author

joshmoore commented Apr 3, 2020

With ome/openmicroscopy#6222 merged, shall we get this in?

Edit: actually, why is that passing in https://latest-ci.openmicroscopy.org/jenkins/job/OMERO-test-integration/286/ without this merged in?

@joshmoore
Copy link
Member Author

https://latest-ci.openmicroscopy.org/jenkins/job/OMERO-test-integration/286/testReport/OmeroPy.test.integration.scriptstest.test_cli/TestCLI/testCLI/ failed to fail:

STDOUT:
I am the script named 4c9a9167-77a8-4bf6-bcff-c1f63ac653d7
Session session-2db587a0-e1e0-4037-91a8-f17d3a86b6d0/22af84a3-e236-4bc4-a890-21fb3246647b -t -e 1.1 @ BlitzAdapters
Previously logged in to localhost:14064 as root

STDERR:
Active client found
stdin is not a terminal: cannot request server
!! 04/03/20 03:44:59.689 error: communicator not destroyed during global destruction.

joshmoore added a commit to joshmoore/openmicroscopy that referenced this pull request Apr 8, 2020
After the tests were merged but *before* the implementation was
merged, the lastest-ci run of the tests still passed. With this
change merged, latest-ci should go red (though perhaps that isn't
necessary.

see: ome/omero-py#186 (comment)
@joshmoore
Copy link
Member Author

see ome/openmicroscopy#6232

@joshmoore
Copy link
Member Author

Stricter tests now passing.

@joshmoore joshmoore merged commit a8904e3 into ome:master Apr 20, 2020
@joshmoore joshmoore deleted the script-cli branch April 20, 2020 15:07
@sbesson sbesson added this to the 5.6.3 milestone Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants