Skip to content

Commit

Permalink
Merge pull request #626 from ratt-ru/caracal-840
Browse files Browse the repository at this point in the history
Caracal 840
  • Loading branch information
SpheMakh authored May 22, 2020
2 parents b58e7b7 + 24382fb commit a30e1f1
Show file tree
Hide file tree
Showing 51 changed files with 5,998 additions and 5,643 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ cp -r $TEST_DATA_DIR/beams $TEST_OUTPUT_DIR/input/beams
docker -v
podman -v
singularity -v
export SINGULARITY_PULLFOLDER=${WORKSPACE_ROOT}/singularity_images
mkdir $SINGULARITY_PULLFOLDER
export STIMELA_PULLFOLDER=${WORKSPACE_ROOT}/singularity_images
mkdir $STIMELA_PULLFOLDER

#########################################################################
# PYTHON 3 TEST
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],

PACKAGE_NAME = "stimela"
__version__ = "1.5.4"
__version__ = "1.6.0"

setup(name=PACKAGE_NAME,
version=__version__,
Expand Down
2 changes: 1 addition & 1 deletion stimela/cargo/base/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM kernsuite/base:dev
FROM kernsuite/base:5
RUN docker-apt-install \
python3-setuptools \
libboost-python-dev \
Expand Down
10 changes: 5 additions & 5 deletions stimela/cargo/base/katdal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM stimela/base:1.2.5
FROM stimela/base:1.6.0
MAINTAINER <[email protected]>
RUN docker-apt-install libboost-dev \
casacore-dev \
python3-casacore python3-pip
RUN pip3 install -U pip setuptools pyyaml
RUN pip3 install katdal[ms,s3]
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.6 10
gfortran
RUN pip install -U six numpy
RUN pip install katdal[ms,s3]
RUN export NUMBA_CACHE_DIR=/dat
RUN mvftoms.py -h
RUN python --version

12 changes: 6 additions & 6 deletions stimela/cargo/base/wsclean/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM stimela/base:1.2.0
FROM stimela/base:1.6.0
MAINTAINER <[email protected]>
RUN docker-apt-install cmake \
wget \
Expand All @@ -25,12 +25,12 @@ RUN docker-apt-install cmake \
liblog4cplus-dev \
libhdf5-dev \
casacore-dev
RUN wget https://tenet.dl.sourceforge.net/project/wsclean/wsclean-2.8/wsclean-2.8.tar.bz2
RUN tar xvf wsclean-2.8.tar.bz2
RUN mkdir wsclean-2.8/build
RUN cd wsclean-2.8/build && \
RUN wget https://tenet.dl.sourceforge.net/project/wsclean/wsclean-2.9/wsclean-2.9.tar.bz2
RUN tar xvf wsclean-2.9.tar.bz2
RUN mkdir wsclean-2.9/build
RUN cd wsclean-2.9/build && \
cmake .. -DPORTABLE=Yes -DCMAKE_BUILD_TYPE=Release && \
make -j 10 && \
make install
RUN pip install astropy
RUN ulimit -p 9000
RUN wsclean
21 changes: 15 additions & 6 deletions stimela/cargo/cab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,24 +131,32 @@ def __init__(self,
base=None,
binary=None,
description=None,
tag=None,
tag=[],
prefix=None,
parameters=[],
version=None,
version=[],
junk=[]):

self.indir = indir
self.outdir = outdir


if parameter_file:
cab = utils.readJson(parameter_file)
if not isinstance(cab["tag"], list):
tag = [cab["tag"]]
version = [cab.get("version", "x.x.x")]
else:
tag = cab["tag"]
version = cab["version"]

self.task = cab["task"]
self.base = cab["base"]
self.binary = cab["binary"]
self.tag = cab["tag"]
self.tag = tag
self.junk = cab.get("junk", [])
self.wranglers = cab.get("wranglers", [])
self.version = cab.get("version", "x.x.x")
self.version = version
if cab["msdir"]:
self.msdir = msdir
else:
Expand Down Expand Up @@ -274,13 +282,14 @@ def toDict(self):
})
return conf

def update(self, options, saveconf):
def update(self, options, saveconf, tag=None):
required = filter(lambda a: a.required, self.parameters)
tag = tag or self.tag
for param0 in required:
if param0.name not in options.keys() and param0.mapping not in options.keys():
raise StimelaCabParameterError(
"Parameter {} is required but has not been specified".format(param0.name))
self.log.info(f"Validating parameters for cab {self.task} ({self.base}:{self.tag})")
self.log.info(f"Validating parameters for cab {self.task} ({self.base}:{tag})")

for name, value in options.items():
found = False
Expand Down
Loading

0 comments on commit a30e1f1

Please sign in to comment.