diff --git a/CHANGES.rst b/CHANGES.rst index 77395639..b0efb87c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,12 @@ CHANGES ======= +0.4.0 +----- + +* Rename imports to omero_metadata.{cli,populate} +* Handle change in table closing semantics + 0.3.1 ----- diff --git a/setup.py b/setup.py index 0ae1387b..5f52b478 100644 --- a/setup.py +++ b/setup.py @@ -91,12 +91,12 @@ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -version = '0.3.2.dev1' +version = '0.4.0' url = "https://github.com/ome/omero-metadata/" setup( version=version, - packages=['', 'omero.plugins'], + packages=['', 'omero_metadata', 'omero.plugins'], package_dir={"": "src"}, name='omero-metadata', description="Metadata plugin for use in the OMERO CLI.", diff --git a/src/omero/plugins/metadata.py b/src/omero/plugins/metadata.py index 09d29a7d..52c40b1d 100755 --- a/src/omero/plugins/metadata.py +++ b/src/omero/plugins/metadata.py @@ -10,7 +10,7 @@ import sys from omero.cli import CLI -from omero_cli_metadata import MetadataControl, HELP +from omero_metadata.cli import MetadataControl, HELP try: register("metadata", MetadataControl, HELP) except NameError: diff --git a/src/omero_metadata/__init__.py b/src/omero_metadata/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/omero_cli_metadata.py b/src/omero_metadata/cli.py similarity index 98% rename from src/omero_cli_metadata.py rename to src/omero_metadata/cli.py index 59fcad44..4f2b4faf 100755 --- a/src/omero_cli_metadata.py +++ b/src/omero_metadata/cli.py @@ -19,7 +19,7 @@ from omero.cli import ProxyStringType from omero.constants import namespaces from omero.gateway import BlitzGateway -import populate_metadata +import omero_metadata.populate from omero.util import populate_roi, pydict_text_io from omero.util.metadata_utils import NSBULKANNOTATIONSCONFIG from omero.util.metadata_utils import NSBULKANNOTATIONSRAW @@ -129,9 +129,9 @@ def __str__(self): class MetadataControl(BaseControl): POPULATE_CONTEXTS = ( - ("csv", populate_metadata.ParsingContext), - ("bulkmap", populate_metadata.BulkToMapAnnotationContext), - ("deletemap", populate_metadata.DeleteMapAnnotationContext), + ("csv", omero_metadata.populate.ParsingContext), + ("bulkmap", omero_metadata.populate.BulkToMapAnnotationContext), + ("deletemap", omero_metadata.populate.DeleteMapAnnotationContext), ) def _configure(self, parser): @@ -446,9 +446,9 @@ def populate(self, args): client, conn = self._clientconn(args) # TODO: Configure logging properly if args.report: - populate_metadata.log.setLevel(logging.DEBUG) + omero_metadata.populate.log.setLevel(logging.DEBUG) else: - populate_metadata.log.setLevel(logging.INFO) + omero_metadata.populate.log.setLevel(logging.INFO) context_class = dict(self.POPULATE_CONTEXTS)[args.context] diff --git a/src/populate_metadata.py b/src/omero_metadata/populate.py similarity index 99% rename from src/populate_metadata.py rename to src/omero_metadata/populate.py index bcb2c0bc..f898f19b 100644 --- a/src/populate_metadata.py +++ b/src/omero_metadata/populate.py @@ -57,7 +57,7 @@ from omero.util.populate_roi import ThreadPool -log = logging.getLogger("omero.util.populate_metadata") +log = logging.getLogger("omero_metadata.populate") def usage(error): diff --git a/test/integration/clitest/test_metadata.py b/test/integration/clitest/test_metadata.py index ab4c22c8..79eedb48 100644 --- a/test/integration/clitest/test_metadata.py +++ b/test/integration/clitest/test_metadata.py @@ -25,7 +25,7 @@ import omero.gateway from omero.constants.namespaces import NSBULKANNOTATIONS, NSMEASUREMENT from omero.gateway import BlitzGateway -from omero_cli_metadata import Metadata, MetadataControl +from omero_metadata.cli import Metadata, MetadataControl from omero.rtypes import rdouble, unwrap from omero.testlib.cli import CLITest from omero.model.enums import UnitsLength diff --git a/test/integration/metadata/test_populate.py b/test/integration/metadata/test_populate.py index a804117e..4d341326 100644 --- a/test/integration/metadata/test_populate.py +++ b/test/integration/metadata/test_populate.py @@ -44,7 +44,7 @@ from omero.rtypes import rdouble, rlist, rstring, unwrap from omero.sys import ParametersI -from populate_metadata import ( +from omero_metadata.populate import ( get_config, ParsingContext, BulkToMapAnnotationContext, diff --git a/test/integration/tablestest/test_populate_metadata.py b/test/integration/tablestest/test_populate_metadata.py index b033fe52..1ba90ed4 100644 --- a/test/integration/tablestest/test_populate_metadata.py +++ b/test/integration/tablestest/test_populate_metadata.py @@ -29,7 +29,7 @@ from omero.model import PlateI, WellI, WellSampleI, OriginalFileI from omero.rtypes import rint, rstring, unwrap -from populate_metadata import ParsingContext +from omero_metadata.populate import ParsingContext from omero.constants.namespaces import NSBULKANNOTATIONS