-
Notifications
You must be signed in to change notification settings - Fork 10
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
Changes from 13 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
8e64320
Add files to distribute from pypi
jburel 9939812
Small adjustment
jburel 7f1da73
Check installation
jburel 2083215
Ignore build output folders
jburel 2612d4e
turn flake8 check on
jburel c1a5366
Review set up to run tests
jburel 80606b7
Remove invertAxis
jburel 9338db3
Comment method not implemented in 5.4
jburel 99867b3
Comment out code not yet available in 5.4
jburel 45d9151
Remove usage of parameter not yet implemented
jburel 3e3a6cd
Ignore few more files
jburel edd2f8e
Review python path
jburel 205fb60
Add support for various omero-version
jburel 83346ff
Minor edit
jburel cd3da9c
Install dependencies to avoid error message
jburel 4a4683f
Add bump-version facility
joshmoore 1e9ed70
Convert to using test-omero
joshmoore c9afa4f
Rework travis build to use test-omero
joshmoore cb9f6c5
Fix flake8
joshmoore 887c171
Update name of test-omero
joshmoore File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
build | ||
dist | ||
omero-cli-render-* | ||
*.egg* | ||
.cache | ||
*.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
language: python | ||
|
||
virtualenv: | ||
system_site_packages: true | ||
|
||
# This (sudo: false) is needed to "run on container-based infrastructure" on | ||
# which cache: is available | ||
# http://docs.travis-ci.com/user/workers/container-based-infrastructure/ | ||
sudo: required | ||
|
||
addons: | ||
postgresql: "9.6" | ||
|
||
env: | ||
matrix: | ||
- OMERO_VERSION=5.4.0 | ||
|
||
before_install: | ||
- pip install restructuredtext_lint | ||
- pip install flake8 pycodestyle pep8-naming | ||
#- flake8 . | ||
- rst-lint README.rst | ||
- export PATH=/usr/bin/:$PATH | ||
- sudo apt-get install -y zeroc-ice35 | ||
- pip install --upgrade pip setuptools | ||
|
||
before_script: | ||
- psql -c "create user omero with password 'omero';" -U postgres | ||
- psql -c "create database omero with owner omero;" -U postgres | ||
#- psql -c "select 1;" -U omero -h localhost omero | ||
- mkdir $HOME/OMERO | ||
- echo "config set omero.data.dir $HOME/OMERO" > $HOME/config.omero | ||
- echo "config set omero.db.name omero" >> $HOME/config.omero | ||
# required so the server can start | ||
- echo "config set Ice.IPv6 0" >> $HOME/config.omero | ||
|
||
script: | ||
# The installation is run in the virtual env | ||
# Required to explicitly activate it | ||
- source $HOME/virtualenv/python2.7_with_system_site_packages/bin/activate | ||
- OMERO_VERSION=$OMERO_VERSION ./travis-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
0.1 (October 2017) | ||
------------------ | ||
|
||
- Initial release |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
include *.txt | ||
include *.rst | ||
prune dist | ||
prune build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.. image:: https://travis-ci.org/ome/omero-cli-render.svg?branch=master | ||
:target: https://travis-ci.org/ome/omero-cli-render | ||
|
||
.. image:: https://badge.fury.io/py/omero-cli-render.svg | ||
:target: https://badge.fury.io/py/omero-cli-render | ||
|
||
omero-cli-render | ||
=================== | ||
|
||
Plugin for use in the OMERO CLI. | ||
|
||
Requirements | ||
============ | ||
|
||
* OMERO 5.4.0 or newer | ||
* Python 2.6+ | ||
|
||
|
||
Installing from PyPI | ||
==================== | ||
|
||
This section assumes that an OMERO.py is already installed. | ||
|
||
Install the command-line tool using `pip <https://pip.pypa.io/en/stable/>`_: | ||
|
||
:: | ||
|
||
$ pip install -U omero-cli-render | ||
|
||
License | ||
------- | ||
|
||
This project, similar to many Open Microscopy Environment (OME) projects, is | ||
licensed under the terms of the GNU General Public License (GPL) v2 or later. | ||
|
||
Copyright | ||
--------- | ||
|
||
2017, The Open Microscopy Environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[metadata] | ||
description-file = README.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (c) 2017 University of Dundee. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
# | ||
import os | ||
import sys | ||
|
||
from setuptools import setup | ||
from setuptools.command.test import test as test_command | ||
|
||
|
||
class PyTest(test_command): | ||
user_options = [ | ||
('test-path=', 't', "base dir for test collection"), | ||
('test-ice-config=', 'i', | ||
"use specified 'ice config' file instead of default"), | ||
('test-pythonpath=', 'p', "prepend 'pythonpath' to PYTHONPATH"), | ||
('test-marker=', 'm', "only run tests including 'marker'"), | ||
('test-no-capture', 's', "don't suppress test output"), | ||
('test-failfast', 'x', "Exit on first error"), | ||
('test-verbose', 'v', "more verbose output"), | ||
('test-quiet', 'q', "less verbose output"), | ||
('junitxml=', None, "create junit-xml style report file at 'path'"), | ||
('pdb', None, "fallback to pdb on error"), | ||
] | ||
|
||
def initialize_options(self): | ||
test_command.initialize_options(self) | ||
self.test_pythonpath = None | ||
self.test_string = None | ||
self.test_marker = None | ||
self.test_path = 'test' | ||
self.test_failfast = False | ||
self.test_quiet = False | ||
self.test_verbose = False | ||
self.test_no_capture = False | ||
self.junitxml = None | ||
self.pdb = False | ||
self.test_ice_config = None | ||
|
||
def finalize_options(self): | ||
test_command.finalize_options(self) | ||
self.test_args = [self.test_path] | ||
if self.test_string is not None: | ||
self.test_args.extend(['-k', self.test_string]) | ||
if self.test_marker is not None: | ||
self.test_args.extend(['-m', self.test_marker]) | ||
if self.test_failfast: | ||
self.test_args.extend(['-x']) | ||
if self.test_verbose: | ||
self.test_args.extend(['-v']) | ||
if self.test_quiet: | ||
self.test_args.extend(['-q']) | ||
if self.junitxml is not None: | ||
self.test_args.extend(['--junitxml', self.junitxml]) | ||
if self.pdb: | ||
self.test_args.extend(['--pdb']) | ||
self.test_suite = True | ||
if 'ICE_CONFIG' not in os.environ: | ||
os.environ['ICE_CONFIG'] = self.test_ice_config | ||
|
||
def run_tests(self): | ||
if self.test_pythonpath is not None: | ||
sys.path.insert(0, self.test_pythonpath) | ||
# import here, cause outside the eggs aren't loaded | ||
import pytest | ||
errno = pytest.main(self.test_args) | ||
sys.exit(errno) | ||
|
||
|
||
def read(fname): | ||
""" | ||
Utility function to read the README file. | ||
:rtype : String | ||
""" | ||
return open(os.path.join(os.path.dirname(__file__), fname)).read() | ||
|
||
|
||
version = '0.1.0' | ||
url = "https://github.com/ome/omero-cli-render/" | ||
|
||
setup( | ||
version=version, | ||
packages=['omero.plugins'], | ||
package_dir={"": "src"}, | ||
name='omero-cli-render', | ||
description="Plugin for use in the OMERO CLI.", | ||
long_description=read('README.rst'), | ||
classifiers=[ | ||
'Development Status :: 5 - Production/Stable', | ||
'Environment :: Plugins', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: End Users/Desktop', | ||
'License :: OSI Approved :: GNU General Public License v2 ' | ||
'or later (GPLv2+)', | ||
'Natural Language :: English', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python :: 2', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
], # Get strings from | ||
# http://pypi.python.org/pypi?%3Aaction=list_classifiers | ||
author='The Open Microscopy Team', | ||
author_email='ome-devel@lists.openmicroscopy.org.uk', | ||
license='GPL-2.0+', | ||
url='%s' % url, | ||
zip_safe=False, | ||
download_url='%s/v%s.tar.gz' % (url, version), | ||
keywords=['OMERO.CLI', 'plugin'], | ||
cmdclass={'test': PyTest}, | ||
tests_require=['pytest', 'restview', 'mox'], | ||
) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See ome/openmicroscopy#5585
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see https://trello.com/c/65fh1AUq/48-remove-pytest-command