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

test omero53 in travis #19

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ before_script:

script:
- echo 'Tested in CI'
Copy link
Member

Choose a reason for hiding this comment

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

This can be moved. (Seen while working on ome/rOMERO-gateway#14 (comment))

Copy link
Member Author

Choose a reason for hiding this comment

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

ci is locked, no more changes at the moment

# - docker-compose -f docker/docker-compose.yml up --build --abort-on-container-exit
# - exitcode=$(docker inspect -f '{{.State.ExitCode}}' docker_maprtest_1)
# - docker-compose -f docker/docker-compose.yml rm -fv
# - exit $exitcode
- docker-compose -f docker/docker-compose.yml up --build --abort-on-container-exit
- exitcode=$(docker inspect -f '{{.State.ExitCode}}' docker_maprtest_1)
- docker-compose -f docker/docker-compose.yml rm -fv
- exit $exitcode
2 changes: 1 addition & 1 deletion omero_mapr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from omero_mapr.utils.version import get_version


VERSION = (0, 1, 14)
VERSION = (0, 2, 0)

__version__ = get_version(VERSION)

Expand Down
23 changes: 3 additions & 20 deletions omero_mapr/testlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from omero.constants.namespaces import NSBULKANNOTATIONS
from omero.util.populate_metadata import BulkToMapAnnotationContext
from omero.util.populate_metadata import ParsingContext
from omero.util.temp_files import create_path

from omeroweb.testlib import IWebTest

Expand All @@ -39,22 +38,6 @@ class IMaprTest(IWebTest):
Extends IWebTest (ITest)
"""

def create_csv(
self,
col_names="Well,Well Type,Concentration",
row_data=("A1,Control,0", "A2,Treatment,10")
):

csv_file_name = create_path("test", ".csv")
csv_file = open(csv_file_name, 'w')
try:
csv_file.write(col_names)
csv_file.write("\n")
csv_file.write("\n".join(row_data))
finally:
csv_file.close()
return str(csv_file_name)

def set_name(self, obj, name):
q = self.client.sf.getQueryService()
up = self.client.sf.getUpdateService()
Expand All @@ -68,8 +51,8 @@ def create_screen(self, row_count, col_count):
plate = self.importPlates(plateRows=row_count,
plateCols=col_count)[0]
except AttributeError:
plate = self.import_plates(plateRows=row_count,
plateCols=col_count)[0]
plate = self.import_plates(plate_rows=row_count,
plate_cols=col_count)[0]
plate = self.set_name(plate, "Plate001")
screen = ScreenI()
screen.name = rstring("Screen001")
Expand Down Expand Up @@ -125,6 +108,6 @@ def populate_data(self, csv, cfg):
fileid = table_file_ann.file.id.val

ctx = BulkToMapAnnotationContext(
self.client, self.screen.proxy(), fileid=fileid, cfg=cfg)
self.client, self.screen.proxy(), fileid=fileid, cfg=cfg)
ctx.parse()
ctx.write_to_omero()
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def pytest_configure():
"config": {
"default": ["Gene Symbol"],
"all": ["Gene Symbol", "Gene Identifier"],
"ns": ["openmicroscopy.org/omero/bulk_annotations"],
"ns": ["openmicroscopy.org/mapr/gene"],
"label": "Gene",
"case_sensitive": True,
}
Expand All @@ -58,7 +58,7 @@ def pytest_configure():
"config": {
"default": ["Phenotype"],
"all": ["Phenotype", "Phenotype Term Accession"],
"ns": ["openmicroscopy.org/omero/bulk_annotations"],
"ns": ["openmicroscopy.org/mapr/phenotype"],
"label": "Phenotype",
}
},
Expand All @@ -67,7 +67,7 @@ def pytest_configure():
"config": {
"default": ["Organism"],
"all": ["Organism"],
"ns": ["openmicroscopy.org/omero/bulk_annotations"],
"ns": ["openmicroscopy.org/mapr/organism"],
"label": "Organism",
}
},
Expand Down
42 changes: 31 additions & 11 deletions tests/integration/bulk_to_map_annotation_context.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Screen001
version: 1
version: 2

defaults:
# Should the column be processed when creating bulk-annotations (yes/no)
Expand All @@ -21,19 +21,39 @@ defaults:

columns:

- name: Organism
- name: Channels
include: yes

- name: Gene Identifier
include: yes
- name: Gene Identifier
clientname: Gene Identifier URL
clientvalue: http://www.ebi.ac.uk/cmpo/{{ value|urlencode }}
include: yes
- name: Gene Symbol
include: yes
- group:
namespace: openmicroscopy.org/mapr/gene
columns:
- name: Gene Identifier
include: yes
- name: Gene Identifier
clientname: Gene Identifier URL
clientvalue: http://www.pombase.org/spombe/result/{{ value|urlencode }}
include: yes
- name: Gene Symbol
include: yes

- group:
namespace: openmicroscopy.org/mapr/organism
columns:
- name: Organism
include: yes

advanced:
# If a map-annotation is attached to a well also attach it to all images
# in the well
well_to_images: yes
well_to_images: yes

# TODO: Primary key config should be in a global config
ignore_missing_primary_key: yes
primary_group_keys:
- namespace: openmicroscopy.org/mapr/gene
keys:
- Gene Identifier
- Gene Symbol
- namespace: openmicroscopy.org/mapr/organism
keys:
- Organism
59 changes: 0 additions & 59 deletions tests/integration/bulk_to_map_annotation_context_2.yml

This file was deleted.

14 changes: 7 additions & 7 deletions tests/integration/bulk_to_map_annotation_context_ns.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Plate,Well Number,Well,Gene Identifier,Gene Symbol,Organism
Plate001,1,A1,cdc14,CG7134,Homo sapiens
Plate001,1,A2,cdc14,FBgn0031952,Homo sapiens
Plate001,2,A3,CDC14,YFR028C,Mouse
Plate001,2,A4,Cdc14,YFR028C,Mouse
Plate001,3,A5,beta'Cop,apostrophe,Human
Plate001,4,A6,percent,123 (abc%def),Some organism
Plate,Well Number,Well,Gene Identifier,Gene Symbol,Organism,Channels
Plate001,1,A1,cdc14,CG7134,Homo sapiens,1a
Plate001,1,A2,cdc14,FBgn0031952,Homo sapiens,1b
Plate001,2,A3,CDC14,YFR028C,Mouse,2a
Plate001,2,A4,Cdc14,YFR028C,Mouse,2b
Plate001,3,A5,beta'Cop,apostrophe,Human,3
Plate001,4,A6,percent,123 (abc%def),Some organism,4
6 changes: 3 additions & 3 deletions tests/integration/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def wildcard_settings(settings):
"config": {
"default": ["Gene Symbol"],
"all": ["Gene Symbol", "Gene Identifier"],
"ns": ["openmicroscopy.org/omero/bulk_annotations"],
"ns": ["openmicroscopy.org/mapr/gene"],
"label": "Gene",
"case_sensitive": True,
}
Expand All @@ -79,7 +79,7 @@ def wildcard_settings(settings):
"config": {
"default": ["Phenotype"],
"all": ["Phenotype", "Phenotype Term Accession"],
"ns": ["openmicroscopy.org/omero/bulk_annotations"],
"ns": ["openmicroscopy.org/mapr/phenotype"],
"label": "Phenotype",
"wildcard": {
"enabled": False
Expand All @@ -91,7 +91,7 @@ def wildcard_settings(settings):
"config": {
"default": ["Organism"],
"all": ["Organism"],
"ns": ["openmicroscopy.org/omero/bulk_annotations"],
"ns": ["openmicroscopy.org/mapr/organism"],
"label": "Organism",
"wildcard": {
"enabled": True
Expand Down