Commit 0b4cdfe5 authored by Katerina Chatziioannou's avatar Katerina Chatziioannou

Merge branch 'polarization' into 'polarization'

Polarization

See merge request !173
parents a69563b8 9bdbea3a
Pipeline #131344 passed with stages
in 1 minute and 34 seconds
FROM containers.ligo.org/docker/base:el7
LABEL name="BayesWave Build Dependencies - EL7" \
maintainer="James Alexander Clark <james.clark@ligo.org>" \
support="Base image for buillding BayesWave " \
date="20190726"
# Yum dependencies
RUN yum upgrade -y && \
yum install -y cmake3 \
gcc \
gcc-c++ \
git \
help2man \
lalapps \
lal-devel \
lalframe-devel \
lalinference-devel \
lalsimulation-devel \
python-devel \
python-ligo-lw \
python-pip \
rpm-build && \
yum clean all && \
rm -rf /var/cache/yum
RUN pip install --no-cache-dir htchirp
......@@ -3,6 +3,7 @@ variables:
COMMIT: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
NIGHTLY: $CI_REGISTRY_IMAGE:nightly
TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
DEPENDS_IMAGE: $CI_REGISTRY_IMAGE/dependencies
BUILD_DIR: test-install
BUILD_TARGET: $CI_PROJECT_DIR/$BUILD_DIR
TEST_OUTPUT: test-output
......@@ -19,12 +20,13 @@ build-env:
- mkdir -p $BUILD_TARGET
- sed "s|INSTALL_DIR|$BUILD_DIR|g" $CI_PROJECT_DIR/etc/bayeswave-user-env.sh > $BUILD_TARGET/bayeswave-user-env.sh
artifacts:
expire_in: 6h
paths:
- $BUILD_DIR
build-bayeswave:
stage: build
image: ligo/software:el7
image: containers.ligo.org/lscsoft/bayeswave/dependencies:el7
script:
- pushd $CI_PROJECT_DIR
- mkdir -p build
......@@ -33,17 +35,36 @@ build-bayeswave:
- cmake3 --build . --target install
- popd
artifacts:
expire_in: 6h
paths:
- $BUILD_DIR
build-bayeswave-rpm:
stage: build
image: containers.ligo.org/lscsoft/bayeswave/dependencies:el7
script:
- pushd $CI_PROJECT_DIR
- mkdir -p $CI_PROJECT_DIR/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,RPMS}
- echo '%_topdir %(echo $CI_PROJECT_DIR)/rpmbuild' > ~/.rpmmacros
- cmake3 . -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=true
- cmake3 --build . --target package_source
- mv bayeswave-*.tar.xz $CI_PROJECT_DIR/rpmbuild/SOURCES
- rpmbuild -ba bayeswave.spec
- popd
artifacts:
expire_in: 6h
paths:
- $CI_PROJECT_DIR/rpmbuild/RPMS/x86_64/bayeswave-*.el7.x86_64.rpm
build-BayesWaveUtils:
stage: build
image: ligo/software:el7
image: containers.ligo.org/lscsoft/bayeswave/dependencies:el7
script:
- pushd BayesWaveUtils
- python setup.py install --prefix $BUILD_TARGET
- popd
artifacts:
expire_in: 6h
paths:
- $BUILD_DIR
......@@ -51,7 +72,7 @@ build-BayesWaveUtils:
# script in the repository that does the same thing.
test:BayesWave:
stage: test
image: ligo/software:el7
image: containers.ligo.org/lscsoft/bayeswave/dependencies:el7
script:
- source $BUILD_DIR/bayeswave-user-env.sh
- cat $BUILD_DIR/bayeswave-user-env.sh
......@@ -68,7 +89,7 @@ test:BayesWave:
test:BayesWavePost:
stage: test
image: ligo/software:el7
image: containers.ligo.org/lscsoft/bayeswave/dependencies:el7
script:
- source $BUILD_DIR/bayeswave-user-env.sh
- BayesWavePost --help
......@@ -78,7 +99,7 @@ test:BayesWavePost:
test:bayeswave_pipe:
stage: test
image: ligo/software:el7
image: containers.ligo.org/lscsoft/bayeswave/dependencies:el7
script:
- ls $BUILD_DIR
- source $BUILD_DIR/bayeswave-user-env.sh
......@@ -87,16 +108,25 @@ test:bayeswave_pipe:
- build-env
- build-BayesWaveUtils
test:docker:
stage: test
docker:nightly:
# Update the dependency image and bayeswave every night
stage: docker
image: docker:latest
only:
- schedules
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
script:
- docker build --pull -t $CI_REGISTRY_IMAGE:latest --file Dockerfile .
- docker run $CI_REGISTRY_IMAGE:latest /test-bayeswave.sh
# FIXME: Add a proper test stage for the docker images
# Build and push dependency image
- docker build --pull -t $DEPENDS_IMAGE:el7 --file .dependencies-el7.Dockerfile .
- docker push $DEPENDS_IMAGE:el7
- mkdir rpms && mv $CI_PROJECT_DIR/rpmbuild/RPMS/x86_64/bayeswave-*.el7.x86_64.rpm rpms
# Build, test and push bayeswave image
- docker build --pull -t $CI_REGISTRY_IMAGE:nightly --file Dockerfile .
- docker run $CI_REGISTRY_IMAGE:nightly /test-bayeswave.sh
- docker push $CI_REGISTRY_IMAGE:nightly
dependencies:
- build-bayeswave-rpm
docker:latest:
stage: docker
......@@ -107,11 +137,20 @@ docker:latest:
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
script:
- mkdir rpms && mv $CI_PROJECT_DIR/rpmbuild/RPMS/x86_64/bayeswave-*.el7.x86_64.rpm rpms
- docker build --pull -t $CI_REGISTRY_IMAGE:latest --file Dockerfile .
# Build, test and push bayeswave image
- docker run $CI_REGISTRY_IMAGE:latest /test-bayeswave.sh
- docker push $CI_REGISTRY_IMAGE:latest
dependencies:
- build-bayeswave-rpm
except:
- schedules
docker:tags:
# FIXME: Until we version the dependency image, the tags containers will
# always use the nightly build of the dependency image, which always has the
# latest release of the dependencies.
stage: docker
image: docker:latest
only:
......@@ -120,8 +159,15 @@ docker:tags:
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
script:
- mkdir rpms && mv $CI_PROJECT_DIR/rpmbuild/RPMS/x86_64/bayeswave-*.el7.x86_64.rpm rpms
- docker build --pull -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --file Dockerfile .
# Build, test and push bayeswave image
- docker run $CI_REGISTRY_IMAGE:latest /test-bayeswave.sh
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
dependencies:
- build-bayeswave-rpm
except:
- schedules
docs:
stage: build
......@@ -139,6 +185,7 @@ docs:
script:
- bash -ex doc/build.sh
artifacts:
expire_in: 6h
paths:
- doc/_build
cache:
......@@ -154,5 +201,6 @@ pages:
script:
- mv doc/_build/html public
artifacts:
expire_in: 6h
paths:
- public
......@@ -885,18 +885,6 @@ def condor_job_config(job_type, condor_job, config_parser):
requires=[]
# If the process exits successfully after receiving this signal, intermediate file transfer will occur
# "success" occurs when the process exits on signal CheckpointExitSignal
# Otherwise, "success" occurs when the process exits with code CheckpointExitCode
condor_job.add_condor_cmd('+CheckpointExitBySignal', False) #
condor_job.add_condor_cmd('+CheckpointExitSignal', '"SIGTERM"')
condor_job.add_condor_cmd('+CheckpointExitCode', 130)
condor_job.add_condor_cmd('+SuccessCheckpointExitBySignal', False) #
condor_job.add_condor_cmd('+SuccessCheckpointExitSignal', '"SIGTERM"')
condor_job.add_condor_cmd('+SuccessCheckpointExitCode', 130)
condor_job.add_condor_cmd('+WantFTOnCheckpoint', True)
condor_job.add_condor_cmd('+CheckpointSig', 130)
#condor_job.add_condor_cmd('+SpoolOnEvict', False)
#
# Singularity configuration
......@@ -933,8 +921,32 @@ def condor_job_config(job_type, condor_job, config_parser):
print("Configuring file transfers for {}".format(job_type), file=sys.stdout)
condor_job.add_condor_cmd('should_transfer_files', 'YES')
condor_job.add_condor_cmd("transfer_executable", False)
# Only checkpoitn bayeswave jobs
if job_type == 'bayeswave':
condor_job.add_condor_cmd('when_to_transfer_output', 'ON_EXIT_OR_EVICT')
#
# Checkpoint configuration
#
# See:
# https://htcondor-wiki.cs.wisc.edu/index.cgi/wiki?p=HowToRunSelfCheckpointingJobs
# Using +SuccessCheckpointExitCode (recommended approach)
if job_type == 'bayeswave':
condor_job.add_condor_cmd('+SuccessCheckpointExitCode', 77)
condor_job.add_condor_cmd('+WantFTOnCheckpoint', True)
# "Working Around The Assumptions"
#
# condor_job.add_condor_cmd('+SuccessCheckpointExitBySignal', True) #
# condor_job.add_condor_cmd('+SuccessCheckpointExitSignal', '"SIGTERM"')
# condor_job.add_condor_cmd('+CheckpointExitSignal', '"SIGTERM"')
# "Delayed Transfers" (strongly discouraged)
# condor_job.add_condor_cmd('+WantCheckpointSignal', True)
# condor_job.add_condor_cmd('+CheckpointSig', '"SIGINT"')
# condor_job.add_condor_cmd('when_to_transfer_output', 'ON_EXIT_OR_EVICT')
else:
condor_job.add_condor_cmd('when_to_transfer_output', 'ON_EXIT')
......@@ -966,6 +978,11 @@ def condor_job_config(job_type, condor_job, config_parser):
config_parser.get('condor','desired-sites'))
except configparser.NoOptionError:
pass
try:
condor_job.add_condor_cmd('+UNDESIRED_Sites',
config_parser.get('condor','undesired-sites'))
except configparser.NoOptionError:
pass
# Ensure LIGO data is present
if not config_parser.getboolean('datafind','sim-data'):
......@@ -1027,7 +1044,8 @@ def condor_job_config(job_type, condor_job, config_parser):
class bayeswaveJob(pipeline.CondorDAGJob, pipeline.AnalysisJob):
def __init__(self, cp, cacheFiles, injfile=None, numrel_data=None, dax=False):
def __init__(self, cp, cacheFiles, injfile=None, numrel_data=None,
dax=False):
#
# [condor]: Common workflow configuration
......@@ -1042,7 +1060,7 @@ class bayeswaveJob(pipeline.CondorDAGJob, pipeline.AnalysisJob):
'BayesWave_$(macrooutputDir)-$(cluster)-$(process).out'))
self.set_stderr_file(os.path.join(workdir, 'logs',
'BayesWave_$(macrooutputDir)-$(cluster)-$(process).err'))
self.set_log_file(os.path.join('workdir', 'logs',
self.set_log_file(os.path.join(workdir, 'logs',
'BayesWave_$(macrooutputDir)-$(cluster)-$(process).log'))
if cp.has_option('condor','arch'):
......@@ -1077,7 +1095,7 @@ class bayeswaveJob(pipeline.CondorDAGJob, pipeline.AnalysisJob):
self.add_condor_cmd("+PreArgs", '"$(macrooutputDir) bayeswave"')
# Configure file transfers
transferstring='setupdirs.py,datafind'
transferstring='datafind,setupdirs.py'
if cp.getboolean('condor','copy-frames'):
transferstring += ',$(macroframes)'
......@@ -1265,8 +1283,8 @@ class bayeswave_postJob(pipeline.CondorDAGJob,pipeline.AnalysisJob):
'BayesWavePost_$(macrooutputDir)-$(cluster)-$(process).out'))
self.set_stderr_file(os.path.join(workdir, 'logs',
'BayesWavePost_$(macrooutputDir)-$(cluster)-$(process).err'))
self.set_log_file(os.path.join('workdir', 'logs',
'BayesWave_$(macrooutputDir)-$(cluster)-$(process).log'))
self.set_log_file(os.path.join(workdir, 'logs',
'BayesWavePost_$(macrooutputDir)-$(cluster)-$(process).log'))
if cp.has_option('condor','arch'):
self.add_condor_cmd('+arch',cp.get('condor','arch'))
......@@ -1576,7 +1594,7 @@ class megaskyJob(pipeline.CondorDAGJob,pipeline.AnalysisJob):
'megasky_$(macrooutputDir)-$(cluster)-$(process).out'))
self.set_stderr_file(os.path.join(workdir, 'logs',
'megasky_$(macrooutputDir)-$(cluster)-$(process).err'))
self.set_log_file(os.path.join('workdir', 'logs',
self.set_log_file(os.path.join(workdir, 'logs',
'megasky_$(macrooutputDir)-$(cluster)-$(process).log'))
#
......@@ -1623,7 +1641,7 @@ class megaplotJob(pipeline.CondorDAGJob,pipeline.AnalysisJob):
'megaplot_$(macrooutputDir)-$(cluster)-$(process).out'))
self.set_stderr_file(os.path.join(workdir, 'logs',
'megaplot_$(macrooutputDir)-$(cluster)-$(process).err'))
self.set_log_file(os.path.join('workdir', 'logs',
self.set_log_file(os.path.join(workdir, 'logs',
'megaplot_$(macrooutputDir)-$(cluster)-$(process).log'))
#
......@@ -1666,6 +1684,8 @@ class submitToGraceDB(pipeline.CondorDAGJob,pipeline.AnalysisJob):
# --- Allow desired sites
if cp.has_option('condor','desired-sites'):
self.add_condor_cmd('+DESIRED_Sites',cp.get('condor','desired-sites'))
if cp.has_option('condor','undesired-sites'):
self.add_condor_cmd('+UNDESIRED_Sites',cp.get('condor','desired-sites'))
if cp.has_option('condor', 'accounting-group'):
self.add_condor_cmd('accounting_group', cp.get('condor', 'accounting-group'))
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -208,8 +208,12 @@ def make_skyview(directory='.', mdc=None, NSIDE=128, inj=None, npost=5000, geo=F
# -- Input skymap data
print("Extracting RA/DEC samples")
filename = './chains/' + 'signal_params_h0.dat.0'
data = np.loadtxt(filename, unpack=True,usecols=(0,1,2))
try:
filename = './chains/' + 'signal_params_h0.dat.0'
data = np.loadtxt(filename, unpack=True,usecols=(0,1,2))
except:
filename = './chains/' + 'full_params_h0.dat.0'
data = np.loadtxt(filename, unpack=True,usecols=(0,1,2))
ralist = data[1]
sin_dec = data[2]
print("Total samples are {0}".format(ralist.size))
......
......@@ -10,7 +10,7 @@ cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
project(
bayeswave
LANGUAGES C
VERSION 1.0.3
VERSION 1.0.5
DESCRIPTION "LIGO/VIRGO burst analysis algorithm"
HOMEPAGE_URL "https://git.ligo.org/lscsoft/bayeswave"
)
......
FROM containers.ligo.org/lscsoft/lalsuite/lalsuite-v6.53:el7
ARG version
RUN echo "Building bayeswave"
MAINTAINER James Alexander Clark <james.clark@ligo.org>
FROM containers.ligo.org/lscsoft/bayeswave/dependencies:el7
RUN yum upgrade -y && \
yum install -y gcc \
cmake3 \
gcc-c++ \
help2man \
rpm-build \
which \
git \
python-ligo-lw && \
yum clean all && \
rm -rf /var/cache/yum
# RUN curl -O https://bootstrap.pypa.io/get-pip.py && \
# python get-pip.py && \
# rm get-pip.py
# Copy and build BayesWave
WORKDIR /tmp
RUN mkdir /tmp/bayeswave
COPY bayeswave.spec.in /tmp/bayeswave
COPY .git /tmp/bayeswave
COPY CMakeLists.txt /tmp/bayeswave
COPY src /tmp/bayeswave/src
COPY etc/bayeswave-user-env.sh /tmp/bayeswave/etc/bayeswave-user-env.sh
COPY README.md /tmp
COPY BayesWaveUtils /tmp/bayeswave/BayesWaveUtils
ADD test/test-bayeswave.sh /
# Python Utils
RUN cd /tmp/bayeswave/BayesWaveUtils && \
python /tmp/bayeswave/BayesWaveUtils/setup.py install
RUN mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
RUN echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
RUN mkdir dist && \
pushd dist && \
cmake3 /tmp/bayeswave && \
cmake3 --build . --target package_source && \
mv bayeswave-*.tar.xz /root/rpmbuild/SOURCES/ && \
popd
RUN rpmbuild -ba /tmp/bayeswave/bayeswave.spec
RUN rpm -ivh /root/rpmbuild/RPMS/x86_64/bayeswave-1.0.3-1.el7.x86_64.rpm
LABEL name="BayesWave - EL7" \
maintainer="James Alexander Clark <james.clark@ligo.org>" \
support="Reference Platform" \
date="20190726"
RUN rm -rf .git install.sh /src /BayesWaveUtils /etc/bayeswave-user-env.sh /build.sh /CMakeLists.txt /build
# Directories we may want to bind
RUN mkdir -p /cvmfs /hdfs /hadoop /etc/condor /test
# Clean up
RUN rm -rf /tmp/* ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
# Build and install from RPM built in CI
COPY rpms /rpms
RUN yum upgrade -y && \
yum -y localinstall /rpms/*.rpm && \
rm -rf /rpms && yum clean all
# Python Utils
COPY test/test-bayeswave.sh /test-bayeswave.sh
COPY BayesWaveUtils /tmp/BayesWaveUtils
RUN cd /tmp/BayesWaveUtils && \
python /tmp/BayesWaveUtils/setup.py install
RUN rm -rf /tmp/*
# Remove build dependencies
RUN yum remove -y cmake3 \
gcc \
gcc-c++ \
help2man \
lal-devel \
lalframe-devel \
lalinference-devel \
lalsimulation-devel \
python-pip \
rpm-build && \
yum clean all && \
rm -rf /var/cache/yum
WORKDIR /
ENTRYPOINT ["/bin/bash"]
......@@ -68,7 +68,7 @@ and we will strive to provide what assistance we can.
## Installation and operation
* [Minimal quick-start guide](https://git.ligo.org/lscsoft/bayeswave/blob/master/doc/quickstart.md)
* [Full Installation instructions](https://git.ligo.org/lscsoft/bayeswave/blob/master/doc/install.mdl)
* [Full Installation instructions](https://git.ligo.org/lscsoft/bayeswave/blob/master/doc/install.md)
* [Running Analyses](https://git.ligo.org/lscsoft/bayeswave/blob/master/doc/running.md)
## Available Branches
......
......@@ -59,12 +59,11 @@ This package contains the files needed for building bayeswave programs
# -- build stages -----------
%prep
%setup -c -T -D -a 0 -n %{name}-%{version}
%setup -n %{name}-%{version}
%build
%cmake3 \
-DCMAKE_BUILD_TYPE=Release \
%{name}-%{version}
-DCMAKE_BUILD_TYPE=Release .
%make_build
%install
......
......@@ -3,13 +3,39 @@ set -e
INSTALL_PREFIX=$1
# Get cmake
if hash cmake 2>/dev/null; then
CMAKE=cmake
# Check version >2
CMAKE_VERSION=$(${CMAKE} --version | head -1 | awk '{print $3}')
CMAKE_VERSION=( ${CMAKE_VERSION//./ } )
CMAKE_MAJOR_VERSION=${CMAKE_VERSION[0]}
if [ ${CMAKE_MAJOR_VERSION} -lt 3 ]; then
echo "cmake executable is version ${CMAKE_VERSION}, checking for cmake3 executable..."
if hash cmake3 2> /dev/null; then
CMAKE=cmake3
else
echo "cmake3 not found"
exit 1
fi
fi
elif hash cmake3 2>/dev/null; then
CMAKE=cmake3
else
echo "No cmake detected. BayesWave requires cmake version 3."
exit 1
fi
${CMAKE} --version
rm -rf build
mkdir -p build
pushd build
cmake3 .. \
${CMAKE} .. \
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_EXPORT_COMPILE_COMMANDS=true
cmake3 --build . -- VERBOSE=1
cmake3 --build . --target install
${CMAKE} --build . -- VERBOSE=1
${CMAKE} --build . --target install
popd
FROM ligo/builder:el7
LABEL name="BayesWave LALInference_o2 EL7" \
maintainer="James Alexander CLark <james.clark@ligo.org>" \
date="20190328" \
support="Experimental Platform"
# Setup directories for binding
RUN mkdir -p /cvmfs /hdfs /hadoop /etc/condor
# Dependencies
RUN yum upgrade -y && \
yum clean all && \
rm -rf /var/cache/yum
RUN yum update -y && \
yum install -y lscsoft-lalsuite-dev cmake3 && \
yum clean all && \
rm -rf /var/cache/yum
# Clone and build lalsuite from source
RUN git clone https://git.ligo.org/lscsoft/lalsuite.git
RUN cd lalsuite && \
./00boot && \
./configure --prefix /opt/lscsoft/lalsuite --enable-swig-python --disable-lalstochastic --disable-laldetchar && \
make -j && \
make install && \
cd / && \
rm -rf lalsuite
#git checkout -b lalinference_o2 origin/lalinference_o2 && \
# Copy files from context into container and build BayesWave
COPY .git /.git
COPY install.sh /install.sh
COPY build.sh /build.sh
COPY src /src
COPY CMakeLists.txt /CMakeLists.txt
COPY bayeswave.spec.in /bayeswave.spec.in
COPY etc/bayeswave-user-env.sh /etc/bayeswave-user-env.sh
COPY BayesWaveUtils /BayesWaveUtils
RUN ["/bin/bash", "-c", "source /opt/lscsoft/lalsuite/etc/lalsuiterc && \
sh install.sh /opt/lscsoft/bayeswave"]
RUN rm -rf /.git /install.sh /build.sh /src /bayeswave.spec.in /BayesWaveUtils /etc/bayeswave-user-env.sh
# Set up an entry point so we can source lalsuite and bayeswave user env scripts at startup
COPY docker-entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
ENTRYPOINT ["docker-entrypoint.sh"]
# Keep a note of explicit build commmand for potential future use:
# RUN ["/bin/bash", "-c", "source /opt/lscsoft/lalsuite/etc/lalsuiterc && \
# mkdir build && \
# pushd build && \
# cmake3 .. \
# -DCMAKE_INSTALL_PREFIX=/opt/lscsoft/bayeswave \
# -DCMAKE_BUILD_TYPE=DEBUG \
# -DCMAKE_EXPORT_COMPILE_COMMANDS=true && \
# cmake3 --build . -- VERBOSE=1 && \
# cmake3 --build . --target install"]
......@@ -15,6 +15,7 @@ cat >> index.rst << EOF
quickstart
running
examples
releasing
EOF
# run sphinx
......
......@@ -22,7 +22,7 @@ copyright = '2019, Neil J. Cornish, Tyson B. Littenberg'
author = 'Neil J. Cornish, Tyson B. Littenberg'
# The full version, including alpha/beta/rc tags
release = '1.0.2'
release = '1.0.5'
# -- General configuration ---------------------------------------------------
......
# Preparing A Release
Please familiarise yourself with this entire procedure before starting.
1. [Update Hardcoded Version Info](#update-hardcoded-version-info)
1. [Create a tag](#create-a-tag)
1. [Build A Release Tarball](#build-a-release-tarball)
1. [upload Source Tarball](#upload-source-tarball)
1. [Open SCCB Request](#open-sccb-request)
1. [Deployment](#deployment)
## Update Hardcoded Version Info
There are a couple of places with (currently) hardcoded version numbers.
Update these with the version you're about to release.
Specifically, edit :
* `conf.py` [here](https://git.ligo.org/lscsoft/bayeswave/blob/master/doc/conf.py#L25).
* `CMakeLists.txt` [here](https://git.ligo.org/lscsoft/bayeswave/blob/master/CMakeLists.txt#L13)
Future releases may automate this step.
## Create a tag
Tag the state of the repository you'd like to release: [create new tag in
gitlab](https://git.ligo.org/lscsoft/bayeswave/-/tags/new). See [previous
tags](https://git.ligo.org/lscsoft/bayeswave/-/tags) for examples of notes and
the semantic version name used (e.g. vX.Y.Z)
## Build A Source Tarball
LSC software is released by uploading a source tarball to the
[software.ligo.org](software.ligo.org) software repository. This tarball can
then be unpacked and built by package managers. At this time, BayesWave can be
managed by the following systems:
* `conda`, in which case the BayesWave release will eventually show up in the
[LIGO conda reference environments](https://docs.ligo.org/lscsoft/conda/).
* `yum`, in which case BayesWave can be installed directly from the LSCSoft
SL7 repositories.
The easiest way to enter a suitable build environment is to use the BayesWave
dependencies docker image. Assuming we're starting at the root of the
BayesWave repository:
```
$ docker run -it -u $(id -u):$(id -g) -w $PWD -v /home:/home containers.ligo.org/lscsoft/bayeswave/dependencies:el7
$ mkdir dist
$ pushd dist
$ cmake3 ..
$ cmake3 --build . --target package_source
```
(Noting that the Cmake executable in the BayesWave dependencies image is called
`cmake3`).
On success, this should produce a compressed tarball `bayeswave-X.Y.Z.tar.xz`,
where `X.Y.Z` is your tag version.
## Upload Source Tarball
Acquire the upload script `lscsrc_new_file.sh` from UWM. If using
linux (rather than OSX), make sure you change the call to `gmktemp` to `mktemp`: