[default]

[meta]
mission = jwst
name = JWSTDP
version = 3.0.0
rc = 3
final = false
python = 3.13

[conda]
installer_name = Miniforge3
installer_version = 24.9.0-0
installer_platform = {{env:STASIS_CONDA_PLATFORM}}
installer_arch = {{env:STASIS_CONDA_ARCH}}
installer_baseurl = https://github.com/conda-forge/miniforge/releases/download/{{conda.installer_version}}
pip_packages = 
    jwst[sdp]=00a04aba0b3cd588876603fc66e42af3124c088a
    stcal@git+https://github.com/spacetelescope/stcal.git@fde2f9e40bf86aa8d9ad4f8b6b81697611ebdb1d
    stdatamodels@git+https://github.com/spacetelescope/stdatamodels.git@9d3391a28f9dde742e94757e18e3c27aa6b28010
    stpipe@git+https://github.com/spacetelescope/stpipe.git@34bc943c52398ea1f54b5688cf7b8fc0ef298da9

[runtime]
PYTHONUNBUFFERED = 1
TEST_BIGDATA = https://bytesalad.stsci.edu/artifactory
CRDS_CONTEXT = jwst_1559.pmap
CRDS_CACHE = ./crds_cache
CRDS_SERVER_URL = https://jwst-crds.stsci.edu
CRDS_CLIENT_RETRY_COUNT = 3
CRDS_CLIENT_RETRY_DELAY_SECONDS = 20

[test:jwst]
repository = https://github.com/spacetelescope/jwst
script_setup = 
    pip install --force-reinstall -U certifi
    pip install -e ".[test]"
    pip install pytest-xdist
script = 
    pytest -s \
        -v \
        -r=fEsx \
        --bigdata \
        --env="1.18.0" \
        --slow \
        -n $(( $CPU_COUNT )) \
        --dist=loadscope \
        --basetemp="{{ func:basetemp_dir() }}" \
        --junitxml="{{ func:junitxml_file() }}"

[deploy:artifactory:test results]
files = 
    {{ storage.results_dir }}/results-*.xml
dest = {{ meta.mission }}/{{ info.build_name }}/results/

[deploy:artifactory:delivery]
files = 
    {{ storage.output_dir }}/**
dest = {{ meta.mission }}/{{ info.build_name }}/

[deploy:docker]
registry = bytesalad.stsci.edu
image_compression = zstd -v -9 -c
build_args = 
    SNAPSHOT_INPUT={{ info.release_name }}.yml
    SNAPSHOT_PKGDIR=packages
tags = 
    {{ meta.name }}:{{ info.build_number }}-py{{ meta.python_compact }}
    {{ deploy.docker.registry }}/{{ meta.name }}:{{ info.build_number }}-py{{ meta.python_compact }}
test_script = 
    source /etc/profile
    python -m pip freeze
    mamba info

