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

Merge branch 'update-vlass-python' into 'main'

update vlass templates for pimscache python3.10 upgrade

See merge request !1618
parents be540136 8c3f0f96
No related branches found
No related tags found
1 merge request!1618update vlass templates for pimscache python3.10 upgrade
Pipeline #15032 canceled
"""upgrade pimcache python310
Revision ID: f9d03744dd49
Revises: d3bf0fcd237c
Create Date: 2024-04-02 16:21:05.867044
"""
from pathlib import Path
from alembic import op
# revision identifiers, used by Alembic.
revision = "f9d03744dd49"
down_revision = "82f7b57c8ad7"
branch_labels = None
depends_on = None
coarse_old_content = (Path.cwd() / "versions" / "templates" / "vlass_coarse" / "fetch_2.8.1.txt").read_text()
coarse_new_content = (Path.cwd() / "versions" / "templates" / "vlass_coarse" / "fetch_2.8.3.txt").read_text()
ql_old_content = (Path.cwd() / "versions" / "templates" / "vlass_quicklook" / "fetch_2.8.1.txt").read_text()
ql_new_content = (Path.cwd() / "versions" / "templates" / "vlass_quicklook" / "fetch_2.8.3.txt").read_text()
seci_old_content = (Path.cwd() / "versions" / "templates" / "vlass_seci" / "fetch_2.8.1.txt").read_text()
seci_new_content = (Path.cwd() / "versions" / "templates" / "vlass_seci" / "fetch_2.8.3.txt").read_text()
def upgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{coarse_new_content}'
WHERE filename='vlass_coarse_fetch.sh' AND workflow_name='vlass_coarse'
"""
)
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{ql_new_content}'
WHERE filename='vlass_ql_fetch.sh' AND workflow_name='vlass_quicklook'
"""
)
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{seci_new_content}'
WHERE filename='vlass_seci_fetch.sh' AND workflow_name='vlass_seci'
"""
)
def downgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{coarse_old_content}'
WHERE filename='vlass_coarse_fetch.sh' AND workflow_name='vlass_coarse'
"""
)
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{ql_old_content}'
WHERE filename='vlass_ql_fetch.sh' AND workflow_name='vlass_quicklook'
"""
)
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{seci_old_content}'
WHERE filename='vlass_seci_fetch.sh' AND workflow_name='vlass_seci'
"""
)
#!/bin/sh
export HOME=$TMPDIR
export PATH=$PATH:/home/ssa/bin
TILE=$(echo $1 | cut -d "/" -f 1)
PHCENTER=$(echo $1 | cut -d "/" -f 2)
STAGE=$1
......
#!/bin/sh
set -o errexit
export HOME=$TMPDIR
export PATH=$PATH:/home/ssa/bin
./update_stage FETCH
chmod 770 .
cd rawdata/
../pimscache ln -c $1 -p $2 .
../productfetcher --product-locator $4 --product-locator $5
cd ../
./update_stage FETCH --complete
#!/bin/sh
export CAPO_PROFILE=vlass.{{vlass_env}}
export PATH=$PATH:/home/ssa/bin
if [ -n "$5" ]; then
./pimscache rm -c $1 -p $2
......
#!/bin/sh
set -o errexit
export HOME=$TMPDIR
export PATH=$PATH:/home/ssa/bin
./update_stage FETCH
./pimscache ln -c $1 -p $2 $3
./update_stage FETCH --complete
#!/bin/sh
set -o errexit
export HOME=$TMPDIR
export PATH=$PATH:/home/ssa/bin
./update_stage FETCH
./pimscache ln -c $1 -p $2 $3
./update_stage FETCH --complete
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