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

pip installable #1

Merged
merged 20 commits into from
Dec 4, 2017
Merged

pip installable #1

merged 20 commits into from
Dec 4, 2017

Conversation

jburel
Copy link
Member

@jburel jburel commented Oct 12, 2017

In this PR:

  • Make the render plugin installable via pip
  • Add structure to run the integration tests in travis
  • flake8 is not unable yet (due to cli.py)
  • Make the plugin usable with 5.4.0

Few commits have not been ported to openmicroscopy/develop so some methods cannot be used yet.

It is not currently possible to run the CLI tests outside openmicroscopy(https://github.com/openmicroscopy/openmicroscopy) repo without copying cli.py to this repo.
When cli.py is available from testlib, the file should be removed from this repository and the test adjusted.

2 PRs will be opened against openmicroscopy/develop:

To Test:

manually

  • Install on an existing omero installation by running python setup.py sdist install
  • Check the commands of the plugin i.e. bin/omero render -h for the list of supported commands

Automatically

  • Check the output of the travis build. Check that the plugin is installed and the tests are green

Similar strategy could be used on other plugin repositories to run the integration tests when we have migrated cli.py

cc @joshmoore @manics

@jburel jburel closed this Oct 12, 2017
@jburel jburel reopened this Oct 12, 2017
@jburel jburel changed the title install via pip pip installable Oct 12, 2017
self._copy_single(gateway, src_img, target, skipthumbs)
# finally:
# if close:
# src_img._closeRE()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove commented-out lines and the "close" argument from def _copy()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The argument is not used but as soon as the method is available in omero cf ome/openmicroscopy#5545
it will.

It makes more sense to keep it even if it is not used for now

return d

def close(self):
self.image._closeRE()
print 'not yet implemented'
# self.image._closeRE()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be implemented?
e.g.

if self.image._re is not None:
    try:
        self.image._re.close()
    except:
         # log...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could to that in the meantime
until the method is available in the main line

@will-moore
Copy link
Member

Travis log looks good...

+pip install dist/omero-cli-render-0.1.0.tar.gz
Processing ./dist/omero-cli-render-0.1.0.tar.gz
Building wheels for collected packages: omero-cli-render
  Running setup.py bdist_wheel for omero-cli-render ... �[?25l-� �done
�[?25h  Stored in directory: /home/travis/.cache/pip/wheels/6b/2b/b4/7090fffa916bbb639a562692ca6cd6912824c3d0730709e072
Successfully built omero-cli-render
Installing collected packages: omero-cli-render
Successfully installed omero-cli-render-0.1.0

and

�[32m�[1m==================== 26 passed, 4 xfailed in 256.70 seconds ====================�[0m

Major changes:

 * All .travis.yml commands now live in test-omero
 * All actions take place in docker rather than locally
 * All classes live in omero_cli_render to prevent shadowing

The next step here will be to remove the copied cli.py module
in favor of pulling the clisplit image.
@joshmoore
Copy link
Member

Running build matches this commit: ome/omero-test-infra@76cdeb0

@joshmoore
Copy link
Member

🎉 Green with the re-usable infrastructure.

@jburel
Copy link
Member Author

jburel commented Nov 25, 2017

great

from setuptools.command.test import test as test_command


class PyTest(test_command):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look into migrating this to a library for re-use.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshmoore
Copy link
Member

Green again. The updated test-omero now flakes8 which turned red on a re-run. Next step will be to use a clisplit docker image and remove cli.py

@joshmoore
Copy link
Member

Delaying the removal of cli.py and other duplicated code until 5.4.2 due to the complexity. Merging and releasing to pypi.

@joshmoore joshmoore merged commit d374f54 into ome:master Dec 4, 2017
@joshmoore
Copy link
Member

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

4 participants