Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove vmtk from installer for now #183

Merged
merged 2 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions .github/workflows/windows_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,23 +134,24 @@ jobs:
python.exe -m pip install pytest
pytest -vsx .\oq-mbtk\openquake\cat
if: github.event.inputs.oq-science == '1'
- name: Compare files of VMTK
run: |
$env:PATH="$env:LOCALAPPDATA\Programs\OpenQuake Engine\python3"
$env:PATH="$env:PATH;$env:LOCALAPPDATA\Programs\OpenQuake Engine\python3\Scripts"
python.exe -V
cd "$env:LOCALAPPDATA\Programs\OpenQuake Engine"
cd "oq-vmtk\demonstration_files"
dir
python.exe computation_scripts_example_lite.py
cd "outputs\out_dynamic_an_edps_imls\CR_LFINF-CDN_H1"
dir
$dirB = "$env:GITHUB_WORKSPACE\ci\to_compare"
$dirA = "$env:LOCALAPPDATA\Programs\OpenQuake Engine\oq-vmtk\demonstration_files\outputs\out_dynamic_an_edps_imls\CR_LFINF-CDN_H1"
if ( Compare-Object (Get-Content $dirA\max_accels.csv) -DifferenceObject (Get-Content $dirB\max_accels.csv) -SyncWindow 0 ) { exit 1} else {"Files are the same"}
if ( Compare-Object (Get-Content $dirA\imls.csv) -DifferenceObject (Get-Content $dirB\imls.csv) -SyncWindow 0 ) {exit 1} else {"Files are the same"}
if ( Compare-Object (Get-Content $dirA\max_disps.csv) -DifferenceObject (Get-Content $dirB\max_disps.csv) -SyncWindow 0 ) {exit 1} else {"Files are the same"}
if: github.event.inputs.oq-science == '1'
# Removed VMTK
#- name: Compare files of VMTK
# run: |
# $env:PATH="$env:LOCALAPPDATA\Programs\OpenQuake Engine\python3"
# $env:PATH="$env:PATH;$env:LOCALAPPDATA\Programs\OpenQuake Engine\python3\Scripts"
# python.exe -V
# cd "$env:LOCALAPPDATA\Programs\OpenQuake Engine"
# cd "oq-vmtk\demonstration_files"
# dir
# python.exe computation_scripts_example_lite.py
# cd "outputs\out_dynamic_an_edps_imls\CR_LFINF-CDN_H1"
# dir
# $dirB = "$env:GITHUB_WORKSPACE\ci\to_compare"
# $dirA = "$env:LOCALAPPDATA\Programs\OpenQuake Engine\oq-vmtk\demonstration_files\outputs\out_dynamic_an_edps_imls\CR_LFINF-CDN_H1"
# if ( Compare-Object (Get-Content $dirA\max_accels.csv) -DifferenceObject (Get-Content $dirB\max_accels.csv) -SyncWindow 0 ) { exit 1} else {"Files are the same"}
# if ( Compare-Object (Get-Content $dirA\imls.csv) -DifferenceObject (Get-Content $dirB\imls.csv) -SyncWindow 0 ) {exit 1} else {"Files are the same"}
# if ( Compare-Object (Get-Content $dirA\max_disps.csv) -DifferenceObject (Get-Content $dirB\max_disps.csv) -SyncWindow 0 ) {exit 1} else {"Files are the same"}
# if: github.event.inputs.oq-science == '1'
- run: |
Get-ChildItem -Path ${{ github.workspace }}
- name: Sign files with Trusted Signing
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/windows_with_mtk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,20 @@ jobs:
python.exe -m pip install pytest
pytest -vsx .\oq-mbtk\openquake\cat
if: github.event.inputs.oq-science == '1'
- name: Compare files of VMTK
run: |
$env:PATH="$env:LOCALAPPDATA\Programs\OpenQuake Engine\python3"
$env:PATH="$env:PATH;$env:LOCALAPPDATA\Programs\OpenQuake Engine\python3\Scripts"
python.exe -V
cd "$env:LOCALAPPDATA\Programs\OpenQuake Engine"
cd "oq-vmtk\demonstration_files"
dir
python.exe computation_scripts_example_lite.py
cd "outputs\out_dynamic_an_edps_imls\CR_LFINF-CDN_H1"
dir
$dirB = "$env:GITHUB_WORKSPACE\ci\to_compare"
$dirA = "$env:LOCALAPPDATA\Programs\OpenQuake Engine\oq-vmtk\demonstration_files\outputs\out_dynamic_an_edps_imls\CR_LFINF-CDN_H1"
if ( Compare-Object (Get-Content $dirA\max_accels.csv) -DifferenceObject (Get-Content $dirB\max_accels.csv) -SyncWindow 0 ) { exit 1} else {"Files are the same"}
if ( Compare-Object (Get-Content $dirA\imls.csv) -DifferenceObject (Get-Content $dirB\imls.csv) -SyncWindow 0 ) {exit 1} else {"Files are the same"}
if ( Compare-Object (Get-Content $dirA\max_disps.csv) -DifferenceObject (Get-Content $dirB\max_disps.csv) -SyncWindow 0 ) {exit 1} else {"Files are the same"}
if: github.event.inputs.oq-science == '1'
#- name: Compare files of VMTK
# run: |
# $env:PATH="$env:LOCALAPPDATA\Programs\OpenQuake Engine\python3"
# $env:PATH="$env:PATH;$env:LOCALAPPDATA\Programs\OpenQuake Engine\python3\Scripts"
# python.exe -V
# cd "$env:LOCALAPPDATA\Programs\OpenQuake Engine"
# cd "oq-vmtk\demonstration_files"
# dir
# python.exe computation_scripts_example_lite.py
# cd "outputs\out_dynamic_an_edps_imls\CR_LFINF-CDN_H1"
# dir
# $dirB = "$env:GITHUB_WORKSPACE\ci\to_compare"
# $dirA = "$env:LOCALAPPDATA\Programs\OpenQuake Engine\oq-vmtk\demonstration_files\outputs\out_dynamic_an_edps_imls\CR_LFINF-CDN_H1"
# if ( Compare-Object (Get-Content $dirA\max_accels.csv) -DifferenceObject (Get-Content $dirB\max_accels.csv) -SyncWindow 0 ) { exit 1} else {"Files are the same"}
# if ( Compare-Object (Get-Content $dirA\imls.csv) -DifferenceObject (Get-Content $dirB\imls.csv) -SyncWindow 0 ) {exit 1} else {"Files are the same"}
# if ( Compare-Object (Get-Content $dirA\max_disps.csv) -DifferenceObject (Get-Content $dirB\max_disps.csv) -SyncWindow 0 ) {exit 1} else {"Files are the same"}
# if: github.event.inputs.oq-science == '1'
14 changes: 8 additions & 6 deletions installers/windows/nsis/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ if [ $GEM_SET_BUILD_SCIENCE == 1 ]; then
cd oq-mbtk
wine ../../python-dist/python3/python.exe -m build -x -w . -o ../../oq-dist/oq-mbtk
cd ..
echo "Extracting python wheels for VMTK-Vulnerability-Modellers-ToolKit"
git clone -b master --depth=1 https://github.com/GEMScienceTools/VMTK-Vulnerability-Modellers-ToolKit.git $(pwd)/oq-vmtk
wine ../python-dist/python3/python.exe -m pip install --disable-pip-version-check --no-warn-script-location -r oq-vmtk/requirements_win64.txt
# FOR NOW remove VMTK that is the old repos
#echo "Extracting python wheels for VMTK-Vulnerability-Modellers-ToolKit"
#git clone -b master --depth=1 https://github.com/GEMScienceTools/VMTK-Vulnerability-Modellers-ToolKit.git $(pwd)/oq-vmtk
#wine ../python-dist/python3/python.exe -m pip install --disable-pip-version-check --no-warn-script-location -r oq-vmtk/requirements_win64.txt
fi

cd $DIR/oq-dist
Expand All @@ -145,10 +146,11 @@ if [ $GEM_SET_BUILD_SCIENCE == 1 ]; then
echo "Working in: $(pwd)"
sed -i '/^#GEM_SET_BUILD_SCIENCE/r science.sec' installer.nsi
sed -i 's/\-no\-toolkit/\-with\-toolkit/g' installer.nsi
# FOR NOW remove VMTK that is the old repos
# Get a copy of VMTK master repo
echo "Clone VMTK repos"
mkdir $(pwd)/oq-vmtk
git clone -b master --depth=1 https://github.com/GEMScienceTools/VMTK-Vulnerability-Modellers-ToolKit.git $(pwd)/oq-vmtk
#echo "Clone VMTK repos"
#mkdir $(pwd)/oq-vmtk
#git clone -b master --depth=1 https://github.com/GEMScienceTools/VMTK-Vulnerability-Modellers-ToolKit.git $(pwd)/oq-vmtk
echo "Clone MBTK repos"
git clone -b master --depth=1 https://github.com/GEMScienceTools/oq-mbtk.git
echo "Add GMT "
Expand Down
2 changes: 1 addition & 1 deletion installers/windows/nsis/installer.nsi.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ Section "Uninstall"
Delete "$INSTDIR\${PRODUCT_ICON}"
RMDir /r "$INSTDIR\GMT"
RMDir /r "$INSTDIR\oq-mbtk"
RMDir /r "$INSTDIR\oq-vmtk"
; RMDir /r "$INSTDIR\oq-vmtk"
RMDir /r "$INSTDIR\python3"
; Uninstall files
Delete "$INSTDIR\README.html"
Expand Down
13 changes: 6 additions & 7 deletions installers/windows/nsis/science.sec
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ Section "!OpenQuake Model Building Toolkit" SecMbtk
DetailPrint "Download the OpenQuake Model Building Toolkit and dependencies"
SectionEnd

Section "!OpenQuake VMTK" SecVmtk
SectionIn RO
SetOutPath "$INSTDIR\oq-vmtk"
File /r /x ".gitignore" "oq-vmtk\*.*"
DetailPrint "Download the OpenQuake Vulnerability-Modellers-ToolKit..."
SectionEnd

;Section "!OpenQuake VMTK" SecVmtk
; SectionIn RO
; SetOutPath "$INSTDIR\oq-vmtk"
; File /r /x ".gitignore" "oq-vmtk\*.*"
; DetailPrint "Download the OpenQuake Vulnerability-Modellers-ToolKit..."
;SectionEnd