Skip to content

Commit

Permalink
Merge pull request #19 from sbesson/package_renaming
Browse files Browse the repository at this point in the history
Package renaming
  • Loading branch information
joshmoore authored Jul 4, 2019
2 parents c9f8e01 + 7e06a11 commit ad50292
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
CHANGES
=======

0.4.0
-----

* Rename imports to omero_metadata.{cli,populate}
* Handle change in table closing semantics

0.3.1
-----

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion src/omero/plugins/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Empty file added src/omero_metadata/__init__.py
Empty file.
12 changes: 6 additions & 6 deletions src/omero_cli_metadata.py → src/omero_metadata/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion test/integration/clitest/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/integration/metadata/test_populate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion test/integration/tablestest/test_populate_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit ad50292

Please sign in to comment.