Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/GEMScienceTools/oq-mbtk i…
Browse files Browse the repository at this point in the history
…nto ratios
  • Loading branch information
CB-quakemodel committed Oct 17, 2024
2 parents 2842263 + 52dfc87 commit a4fc792
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 24 deletions.
55 changes: 35 additions & 20 deletions .github/workflows/test_win64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- test
pull_request:
schedule:
- cron: "0 4 * * *"
workflow_dispatch:
Expand All @@ -12,10 +13,16 @@ jobs:
name: Windows Installation
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-2019]
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Installation of GMT from standalone
run: |
Invoke-WebRequest -Uri "https://github.com/GenericMappingTools/gmt/releases/download/6.4.0/gmt-6.4.0-win64.exe" -OutFile $HOME\gmt.exe
Expand All @@ -32,34 +39,42 @@ jobs:
#
$curDir = Get-Location
Write-Host "Current Working Directory: $curDir"
Get-ChildItem -Path .\windows –recurse
Write-Host "Install oqmbtk on branch ${{ github.ref_name }}"
.\windows\install_oqmbtk.ps1 -mbtk_branch ${{ github.ref_name }}
$MYPATH = $HOME + "\mbtk"
Write-Host "Print USERPROFILE folder: $env:USERPROFILE"
Write-Host "Print MYPATH folder: $MYPATH"
$Env:PATH += ";$MYPATH"
$Env:PATH += ";$MYPATH\python3\Scripts"
$Env:PYTHONUTF8=1
Write-Host "Test python version"
python -V
Write-Host "Install OQ form master and mbtk from branch ${{ github.ref_name }}"
python -m pip install -U pip
git clone --depth 1 -b master https://github.com/gem/oq-engine.git
python -m pip install -r oq-engine/requirements-py311-win64.txt
cd oq-engine
python -m pip install -e .
cd ..
python -m pip install -r requirements_win64.txt
python -m pip install -e .
#.\windows\install_oqmbtk.ps1 -mbtk_branch ${{ github.ref_name }}
# do not use powershell scripts but install with devel installation
#$MYPATH = $HOME + "\mbtk"
#Write-Host "Print USERPROFILE folder: $env:USERPROFILE"
#Write-Host "Print MYPATH folder: $MYPATH"
#$Env:PATH += ";$MYPATH"
#$Env:PATH += ";$MYPATH\python3\Scripts"
#Added to disable TCL
#$Env:PY_PIP=$MYPATH += '\Scripts'
#$Env:PY_PIP=$MYPATH += '\python3\Scripts'
#$Env:PY_HOME=$MYPATH
#$Env:PY_LIBS="$MYPATH\python3\Lib;$MYPATH\python3\Lib\site-package"
#Write-Host "MYPATH Directory: $MYPATH"
$Env:MPLBACKEND="AGG"
$Env:PY_PIP=$MYPATH += '\Scripts'
$Env:PY_PIP=$MYPATH += '\python3\Scripts'
$Env:PY_HOME=$MYPATH
$Env:PY_LIBS="$MYPATH\python3\Lib;$MYPATH\python3\Lib\site-package"
Write-Host "MYPATH Directory: $MYPATH"
$Env:PYTHONUTF8=1
Start-Job -ScriptBlock{& 'oq.exe' engine --upgrade-db}
oq.exe --version
Write-Host "Print all environments variables to check"
dir env:
Write-Host "Print all pypip packages"
pip list
$MBTK = $HOME + "\mbtk"
Write-Host "MBTK Directory: $MBTK"
Set-Location -Path $MBTK
#$MBTK = $HOME + "\mbtk"
#Write-Host "MBTK Directory: $MBTK"
#Set-Location -Path $MBTK
$curDir = Get-Location
Write-Host "Current Working Directory: $curDir"
cd oq-mbtk\openquake
Write-Host "Install pytest and run tests"
pip install pytest==8.1.2
cd openquake
pytest -vs --color=yes --durations=10 cat ghm man mbt sub wkf smt
2 changes: 1 addition & 1 deletion requirements-py311-linux.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# OQ mbtk requirements
# From OQ wheels
#
#https://wheelhouse.openquake.org/v3/linux/py311/numpy-1.23.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
https://wheelhouse.openquake.org/v3/linux/py311/numpy-1.26.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
https://wheelhouse.openquake.org/v3/linux/py311/pyproj-3.6.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
https://wheelhouse.openquake.org/v3/linux/py311/GDAL-3.7.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
https://wheelhouse.openquake.org/v3/linux/py311/fiona-1.9.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Expand Down
6 changes: 4 additions & 2 deletions requirements_win64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ pylint >= 2.1.1
rtree >= 0.9.4
netCDF4 < 1.7.0
xarray==2022.09
#
h3 < 4.0.0
jupyter-server==2.7.2
pyproj==3.6.1
numpy==1.26.2
# Generic
openpyxl
xlrd
Expand All @@ -29,7 +32,6 @@ obspy
prettytable
tqdm
tables
h3
pygmt
reportlab
igraph
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_version():
'obspy',
'prettytable',
'tqdm',
'h3',
'h3 <= 3.7.7',
'reportlab',
'igraph',
# 'GDAL',
Expand Down

0 comments on commit a4fc792

Please sign in to comment.