Skip to content

Commit

Permalink
Merge pull request #587 from gwarmstrong/issue586
Browse files Browse the repository at this point in the history
change labman to labcontrol in .travis.yml
  • Loading branch information
AmandaBirmingham committed Sep 11, 2019
2 parents 1427ad1 + a704083 commit 69cd932
Show file tree
Hide file tree
Showing 20 changed files with 299 additions and 265 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ install:
script:
- python labcontrol/gui/js_tests/js_tester.py all-tests
- nosetests --exclude-dir=labcontrol/gui/js_tests --with-doctest --with-coverage -v --cover-package=labcontrol
- flake8 labman setup.py scripts/*
- flake8 labcontrol setup.py scripts/*
# Run prettier to verify that the JS/CSS ("front end") code doesn't need any
# stylistic adjustments.
- make festylecheck
Expand Down
2 changes: 0 additions & 2 deletions labcontrol/db/composition.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# ----------------------------------------------------------------------------

import re
from enum import Enum
from . import base
from . import sql_connection
from . import process
Expand Down Expand Up @@ -1115,7 +1114,6 @@ def get_assay_type_for_sequencing_process(sequencing_process_id):

return assay_type


@staticmethod
def get_components_type(components):
"""Return class name of components of pool
Expand Down
8 changes: 4 additions & 4 deletions labcontrol/db/configuration_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ def __init__(self):
self.conf_fp = expanduser('~/.labcontrol.cfg')
if not exists(self.conf_fp):
raise RuntimeError(
'Please, configure labcontrol using `labcontrol config`. If the '
'config file is not in `~/.labcontrol.cfg`, please set the '
'`LABCONTROL_CONFIG_FP` environment variable to the '
'configuration file')
'Please, configure labcontrol using `labcontrol config`. '
'If the config file is not in `~/.labcontrol.cfg`, please '
'set the `LABCONTROL_CONFIG_FP` environment variable to '
'the configuration file')

# Parse the configuration file
config = ConfigParser()
Expand Down
6 changes: 4 additions & 2 deletions labcontrol/db/equipment.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def list_equipment(equipment_type=None):
if equipment_type is not None else '')
sql = """SELECT equipment_id, external_id
FROM labcontrol.equipment
JOIN labcontrol.equipment_type USING (equipment_type_id)
JOIN labcontrol.equipment_type
USING(equipment_type_id)
{}
ORDER BY external_id""".format(sql_where)
TRN.add(sql, [equipment_type])
Expand Down Expand Up @@ -101,7 +102,8 @@ def create_type(cls, description):
'Equipment type', [('description', description)])

# Proceed to create the new type
sql = "INSERT INTO labcontrol.equipment_type (description) VALUES (%s)"
sql = "INSERT INTO labcontrol.equipment_type (description)" \
"VALUES (%s)"
TRN.add(sql, [description])
TRN.execute()

Expand Down
12 changes: 8 additions & 4 deletions labcontrol/db/plate.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ def list_plates(plate_types=None, only_quantified=False,
creation_timestamp
FROM labcontrol.plate
JOIN labcontrol.well USING (plate_id)
JOIN labcontrol.composition USING (container_id)
JOIN labcontrol.composition
USING (container_id)
JOIN labcontrol.composition_type USING
(composition_type_id)
{}
Expand Down Expand Up @@ -433,7 +434,8 @@ def duplicates(self):
array_agg(content ORDER BY well_id)
FROM labcontrol.well
JOIN labcontrol.composition USING (container_id)
JOIN labcontrol.sample_composition USING (composition_id)
JOIN labcontrol.sample_composition
USING (composition_id)
WHERE sample_id IS NOT NULL AND plate_id = %s
GROUP BY sample_id
HAVING array_length(array_agg(well_id), 1) > 1
Expand All @@ -456,7 +458,8 @@ def unknown_samples(self):
sql = """SELECT well_id
FROM labcontrol.well
JOIN labcontrol.composition USING (container_id)
JOIN labcontrol.sample_composition USING (composition_id)
JOIN labcontrol.sample_composition
USING (composition_id)
JOIN labcontrol.sample_composition_type
USING (sample_composition_type_id)
WHERE plate_id = %s AND
Expand Down Expand Up @@ -517,7 +520,8 @@ def get_wells_by_sample(self, sample_id):
sql = """SELECT well_id
FROM labcontrol.well
JOIN labcontrol.composition USING (container_id)
JOIN labcontrol.sample_composition USING (composition_id)
JOIN labcontrol.sample_composition
USING (composition_id)
WHERE plate_id = %s AND sample_id = %s
ORDER BY well_id"""
TRN.add(sql, [self.id, sample_id])
Expand Down
18 changes: 12 additions & 6 deletions labcontrol/db/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,8 @@ def gdna_plate(self):
USING (gdna_composition_id)
JOIN labcontrol.composition gc
ON gc.composition_id = gdc.composition_id
JOIN labcontrol.well w ON gc.container_id = w.container_id
JOIN labcontrol.well w
ON gc.container_id = w.container_id
WHERE lc.upstream_process_id = %s"""
TRN.add(sql, [self.process_id])

Expand All @@ -1039,7 +1040,8 @@ def primer_plate(self):
USING (primer_composition_id)
JOIN labcontrol.composition pc
ON pc.composition_id = prc.composition_id
JOIN labcontrol.well w ON pc.container_id = w.container_id
JOIN labcontrol.well w
ON pc.container_id = w.container_id
WHERE lc.upstream_process_id = %s"""
TRN.add(sql, [self.process_id])
return plate_module.Plate(TRN.execute_fetchlast())
Expand Down Expand Up @@ -1231,7 +1233,8 @@ def compressed_plate(self):
USING (compressed_gdna_composition_id)
JOIN labcontrol.composition cc
ON cc.composition_id = cgdnac.composition_id
JOIN labcontrol.well w ON cc.container_id = w.container_id
JOIN labcontrol.well w
ON cc.container_id = w.container_id
WHERE nc.upstream_process_id = %s"""
TRN.add(sql, [self.process_id])
return plate_module.Plate(TRN.execute_fetchlast())
Expand Down Expand Up @@ -1605,7 +1608,8 @@ def normalized_plate(self):
USING (normalized_gdna_composition_id)
JOIN labcontrol.composition nc
ON ngdnac.composition_id = nc.composition_id
JOIN labcontrol.well w ON nc.container_id = w.container_id
JOIN labcontrol.well w
ON nc.container_id = w.container_id
WHERE lc.upstream_process_id = %s"""
TRN.add(sql, [self.process_id])
return plate_module.Plate(TRN.execute_fetchlast())
Expand All @@ -1628,7 +1632,8 @@ def i5_primer_plate(self):
prc.primer_composition_id
JOIN labcontrol.composition pc
ON prc.composition_id = pc.composition_id
JOIN labcontrol.well w ON pc.container_id = w.container_id
JOIN labcontrol.well w
ON pc.container_id = w.container_id
WHERE lc.upstream_process_id = %s"""
TRN.add(sql, [self.process_id])
return plate_module.Plate(TRN.execute_fetchlast())
Expand All @@ -1651,7 +1656,8 @@ def i7_primer_plate(self):
prc.primer_composition_id
JOIN labcontrol.composition pc
ON prc.composition_id = pc.composition_id
JOIN labcontrol.well w ON pc.container_id = w.container_id
JOIN labcontrol.well w
ON pc.container_id = w.container_id
WHERE lc.upstream_process_id = %s"""
TRN.add(sql, [self.process_id])
return plate_module.Plate(TRN.execute_fetchlast())
Expand Down

0 comments on commit 69cd932

Please sign in to comment.