Skip to content
Snippets Groups Projects
Commit c413fe06 authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

fix type in carta.sh template

parent 26184a20
No related branches found
No related tags found
1 merge request!520fix typo in carta.sh template
Pipeline #2966 passed
"""fix typo in carta
Revision ID: f1c9ee975883
Revises: c717f781828d
Create Date: 2021-09-17 14:17:53.507967
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "f1c9ee975883"
down_revision = "c717f781828d"
branch_labels = None
depends_on = None
content = """#!/bin/sh
set -o errexit
export HOME=$TMPDIR
fetch_foundation(){
../productfetcher{{product_locator}}
echo "Moving images out of subdirectories...."
for dir in *.fits; do mv $dir $dir.1; done;
find . -mindepth 1 -type f -print -exec mv {} . \;
find . -mindepth 1 -type d -empty -delete
echo "Done. Ready for Carta!"
}
{{#need_data}}
./framework.sh -r .
chmod 770 .
cd rawdata/
fetch_foundation {{^single_image}}&{{/single_image}}
.{{/need_data}}./carta_envoy {{#need_data}}--parallel{{/need_data}} {{#single_image}}--single -i {{imageName}}{{/single_image}} -d $1 -n $2 -wf $3 -r $4
{{#need_data}}wait{{/need_data}}
"""
old_content = """#!/bin/sh
set -o errexit
export HOME=$TMPDIR
fetch_foundation(){
../productfetcher{{product_locator}}
echo "Moving images out of subdirectories...."
for dir in *.fits; do mv $dir $dir.1; done;
find . -mindepth 1 -type f -print -exec mv {} . ;
find . -mindepth 1 -type d -empty -delete
echo "Done. Ready for Carta!"
}
{{#need_data}}
./framework.sh -r .
chmod 770 .
cd rawdata/
fetch_foundation {{^single_image}}&{{/single_image}}
.{{/need_data}}./carta_envoy {{#need_data}}--parallel{{/need_data}} {{#single_image}}--single -i {{imageName}}{{/single_image}} -d $1 -n $2 -wf $3 -r $4
{{#need_data}}wait{{/need_data}}
"""
def upgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{content}' WHERE filename='carta.sh'
"""
)
def downgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{old_content}' WHERE filename='carta.sh'
"""
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment