├── imodforge ├── obj │ └── .gitkeep ├── imodforge_prompt.bat ├── imodforge.wixproj ├── localization.wxl ├── EULA.rtf └── imodforge.wxs ├── open-vscode.bat ├── icons ├── top_banner.bmp ├── dialog_welcome.bmp ├── iMODforge_icon.ico ├── iMODforge_icon.png ├── deltaforge_icon.ico ├── deltaforge_icon.png ├── top_banner.svg └── dialog_welcome.svg ├── .gitattributes ├── .vscode ├── extensions.json └── settings.json ├── scripts └── convert_to_ico.py ├── .gitignore ├── get_package_version.ps1 ├── .teamcity ├── settings.kts └── pom.xml ├── LICENSE ├── pixi.toml └── README.MD /imodforge/obj/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /open-vscode.bat: -------------------------------------------------------------------------------- 1 | pixi run code . | exit 2 | -------------------------------------------------------------------------------- /icons/top_banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Deltares/deltaforge/main/icons/top_banner.bmp -------------------------------------------------------------------------------- /icons/dialog_welcome.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Deltares/deltaforge/main/icons/dialog_welcome.bmp -------------------------------------------------------------------------------- /icons/iMODforge_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Deltares/deltaforge/main/icons/iMODforge_icon.ico -------------------------------------------------------------------------------- /icons/iMODforge_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Deltares/deltaforge/main/icons/iMODforge_icon.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # SCM syntax highlighting 2 | pixi.lock linguist-language=YAML linguist-generated=true 3 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "redhat.vscode-xml" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /icons/deltaforge_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Deltares/deltaforge/main/icons/deltaforge_icon.ico -------------------------------------------------------------------------------- /icons/deltaforge_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Deltares/deltaforge/main/icons/deltaforge_icon.png -------------------------------------------------------------------------------- /imodforge/imodforge_prompt.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set "PROMPT=(imodforge) $P$G" 3 | call "%~dp0\activate.bat" 4 | cd /D %userprofile% 5 | -------------------------------------------------------------------------------- /scripts/convert_to_ico.py: -------------------------------------------------------------------------------- 1 | from PIL import Image 2 | 3 | icon = Image.open("../icons/iMODforge_icon.png") 4 | icon.save("../icons/iMODforge_icon.ico",format='ICO') 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .pixi 2 | *.log 3 | 4 | # ignore bin and obj, but keep the obj folder for pixi-pack to store the .tar file. 5 | imodforge/bin 6 | imodforge/obj/* 7 | !immodforge/obj/.gitkeep 8 | -------------------------------------------------------------------------------- /get_package_version.ps1: -------------------------------------------------------------------------------- 1 | param ( 2 | [string]$packageName 3 | ) 4 | 5 | $result = pixi list -e imodforge $packageName 2>$null | Select-String -Pattern "^$packageName\s+(?\d+)\.(?\d+)\.(?\d+).*" 6 | $firstMatch = $result.Matches[0] 7 | 8 | $major = $firstMatch.Groups["major"].Value 9 | $minor = $firstMatch.Groups["minor"].Value 10 | $patch = $firstMatch.Groups["patch"].Value 11 | 12 | # Write-Output "$major.$minor.$patch" 13 | Write-Output "0.1.0" 14 | -------------------------------------------------------------------------------- /imodforge/imodforge.wixproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | HKCU_Key=Software\Deltares\iMODforge;iMODVersion=$(iMODVersion) 4 | 5 | 6 | 8 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "*.wixproj": "xml" 4 | }, 5 | "[xml]": { 6 | "editor.formatOnSave": true, 7 | "editor.defaultFormatter": "redhat.vscode-xml" 8 | }, 9 | "files.insertFinalNewline": true, 10 | "xml.format.splitAttributes": "alignWithFirstAttr", 11 | "files.exclude": { 12 | "**/.git": true, 13 | "**/.svn": true, 14 | "**/.hg": true, 15 | "**/.DS_Store": true, 16 | "**/Thumbs.db": true, 17 | ".pixi": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /imodforge/localization.wxl: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /imodforge/EULA.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Arial;}} 2 | \viewkind4\uc1\pard\lang1033\f0\fs20 3 | MIT License\par 4 | \par 5 | Copyright (c) Deltares\par 6 | \par 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | this software and associated documentation files (the "Software"), to deal in 9 | the Software without restriction, including without limitation the rights to 10 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 11 | of the Software, and to permit persons to whom the Software is furnished to do 12 | so, subject to the following conditions:\par 13 | \par 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software.\par 16 | \par 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE.\par 24 | } 25 | -------------------------------------------------------------------------------- /.teamcity/settings.kts: -------------------------------------------------------------------------------- 1 | import jetbrains.buildServer.configs.kotlin.* 2 | import jetbrains.buildServer.configs.kotlin.buildSteps.script 3 | 4 | /* 5 | The settings script is an entry point for defining a TeamCity 6 | project hierarchy. The script should contain a single call to the 7 | project() function with a Project instance or an init function as 8 | an argument. 9 | 10 | VcsRoots, BuildTypes, Templates, and subprojects can be 11 | registered inside the project using the vcsRoot(), buildType(), 12 | template(), and subProject() methods respectively. 13 | 14 | To debug settings scripts in command-line, run the 15 | 16 | mvnDebug org.jetbrains.teamcity:teamcity-configs-maven-plugin:generate 17 | 18 | command and attach your debugger to the port 8000. 19 | 20 | To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View 21 | -> Tool Windows -> Maven Projects), find the generate task node 22 | (Plugins -> teamcity-configs -> teamcity-configs:generate), the 23 | 'Debug' option is available in the context menu for the task. 24 | */ 25 | 26 | version = "2025.03" 27 | 28 | project { 29 | buildType(iMOD6_Deltaforge_CreateInstaller) 30 | } 31 | 32 | object iMOD6_Deltaforge_CreateInstaller : BuildType({ 33 | id("CreateInstaller") 34 | name = "Create iMODforge Installer" 35 | 36 | artifactRules = "imodforge/bin/Release/en-us/imodforge.msi" 37 | 38 | vcs { 39 | root(DslContext.settingsRoot) 40 | } 41 | 42 | steps { 43 | script { 44 | name = "pixi run create-imodforge" 45 | id = "pixi_run_create" 46 | scriptContent = "pixi run create-imodforge" 47 | } 48 | } 49 | 50 | requirements { 51 | contains("teamcity.agent.jvm.os.name", "Windows") 52 | } 53 | }) 54 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The iMODforge installer uses the BSD-3-Clause License as stated below. 2 | 3 | Binary packages that come with it have their own licensing terms and by 4 | installing iMODforge you agree to the licensing terms of individual packages as 5 | well. They include different OSI-approved licenses including the GNU General 6 | Public License and can be found in pkgs//info/licenses folders. 7 | 8 | ================================================================================ 9 | 10 | Copyright (c) 2022, Deltares 11 | All rights reserved. 12 | 13 | Redistribution and use in source and binary forms, with or without 14 | modification, are permitted provided that the following conditions are met: 15 | 16 | 1. Redistributions of source code must retain the above copyright notice, this 17 | list of conditions and the following disclaimer. 18 | 19 | 2. Redistributions in binary form must reproduce the above copyright notice, 20 | this list of conditions and the following disclaimer in the documentation 21 | and/or other materials provided with the distribution. 22 | 23 | 3. Neither the name of the copyright holder nor the names of its contributors 24 | may be used to endorse or promote products derived from this software without 25 | specific prior written permission. 26 | 27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 28 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 29 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 30 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 31 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 32 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 33 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 34 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 35 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | -------------------------------------------------------------------------------- /pixi.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | name = "iMODforge" 3 | channels = ["conda-forge", "bioconda"] 4 | platforms = ["win-64"] 5 | 6 | [dependencies] 7 | pixi = "*" 8 | pixi-pack = ">=0.5.0,<2" 9 | pixi-unpack = "*" 10 | dotnet-sdk = ">=9.0.202,<10" 11 | 12 | [feature.imodforge.dependencies] 13 | python = "3.12.*" 14 | imod = "*" 15 | xugrid = "*" 16 | numpy = "*" 17 | matplotlib = "*" 18 | pandas = "*" 19 | pandamesh = "*" 20 | geopandas = "*" 21 | rasterio = "*" 22 | shapely = "*" 23 | xarray = "*" 24 | snakemake = "*" 25 | jupyter = "*" 26 | rioxarray = "*" 27 | 28 | # prevent GPL packages to be included 29 | libarchive = { version = "*", build = "lgpl*" } 30 | libspatialite = { version = "*", build = "lgpl*" } 31 | ffmpeg = { version = "*", build = "lgpl_*" } 32 | spyder-kernels = ">=3.1.0,<4" 33 | 34 | [tasks.update-lockfile] 35 | args = ["environment"] 36 | cmd = "pixi update -e {{ environment }}" 37 | 38 | [tasks.build] 39 | args = ["environment"] 40 | cmd = "IMOD_VERSION=$(powershell ./get_package_version.ps1 imod) && dotnet build {{ environment }} -c Release -p:iMODVersion=$IMOD_VERSION" 41 | 42 | [tasks.test-install] 43 | args = ["environment"] 44 | cmd = "msiexec /passive /i {{ environment }}\\bin\\Release\\en-us\\{{ environment }}.msi /lv install.log" 45 | 46 | [tasks.test-uninstall] 47 | args = ["environment"] 48 | cmd = "msiexec /passive /x {{ environment }}\\bin\\Release\\en-us\\{{ environment }}.msi /lv uninstall.log" 49 | 50 | [tasks.pack] 51 | args = ["environment"] 52 | cmd = "pixi-pack --environment {{ environment }} --output-file {{ environment }}\\obj\\{{ environment }}.tar pixi.toml" 53 | 54 | # TODO: Pixi 0.47 will be able to pass arguments as {{ environment}} into tasks. 55 | # https://github.com/prefix-dev/pixi/issues/3538 56 | # Then it will be possible to just have a task called "create". 57 | # [tasks.create] 58 | # args = ["environment"] 59 | # depends-on = [ 60 | # { task = "update-lockfile", args = [ 61 | # "{{ environment }}", 62 | # ] }, 63 | # { task = "pack", args = [ 64 | # "{{ environment }}", 65 | # ] }, 66 | # { task = "build", args = [ 67 | # "{{ environment }}", 68 | # ] }, 69 | # ] 70 | 71 | [tasks] 72 | create-imodforge = { depends-on = [ 73 | { task = "update-lockfile", args = [ 74 | "imodforge", 75 | ] }, 76 | { task = "pack", args = [ 77 | "imodforge", 78 | ] }, 79 | { task = "build", args = [ 80 | "imodforge", 81 | ] }, 82 | ] } 83 | imod-version = "IMOD_VERSION=$(powershell ./get_package_version.ps1 imod) && echo $IMOD_VERSION" 84 | 85 | [environments] 86 | imodforge = { features = ["imodforge"], no-default-feature = true } 87 | -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | # iMODforge 2 | 3 | ![iMODforge logo](icons/deltaforge_icon.png) 4 | 5 | ## What is it? 6 | 7 | iMODforge is a Windows installer of selected [Deltares](https://www.deltares.nl/en/) python packages and their dependencies. 8 | This makes the process of installing iMOD Python significantly easier. 9 | 10 | ## Getting Started 11 | 12 | You can download the signed installer here on [oss.deltares.nl](https://download2.deltares.nl/imod-suite/). 13 | After downloading, simply start the installer and follow the instructions. 14 | 15 | You can start an environment with all correct paths via the `iMODforge Prompt` that can be found in your start menu. 16 | From here you can start your editor so that the editor can find the installed components. 17 | You can also directly call `python` to start an interactive python terminal. 18 | 19 | ## What's included? 20 | 21 | Deltares packages currently included are: 22 | 23 | * [iMOD Python](https://deltares.gitlab.io/imod/imod-python) 24 | * [xugrid](https://deltares.github.io/xugrid/) 25 | 26 | Important non-Deltares packages included in iMODforge are: 27 | 28 | * [numpy](https://numpy.org/) 29 | * [matplotlib](https://matplotlib.org/) 30 | * [pandas](https://pandas.pydata.org/) 31 | * [geopandas](https://geopandas.org/en/stable/) 32 | * [rasterio](https://rasterio.readthedocs.io/en/latest/index.html) 33 | * [shapely](https://shapely.readthedocs.io/en/stable/manual.html) 34 | * [xarray](https://xarray.dev/) 35 | * [snakemake](https://snakemake.readthedocs.io/en/stable/) 36 | 37 | ## Why? 38 | 39 | Experience has shown that these packages can be difficult to install for new users, because it requires: 40 | 41 | 1. Using a shell 42 | 2. Knowledge of `conda` / `mamba` / `pixi` / `uv` / `pip`. 43 | 3. Installing a lot of dependencies, where something breaks every now and then. 44 | 4. Installing python packages without access to `conda-forge` or `PyPi` is cumbersome. 45 | Some computational servers have no direct internet connection. 46 | 47 | The iMODforge installer aids new users by installing a conda base environment 48 | with all the required Python packages installed. These packages are contained in 49 | the executable. The installer thus helps circumventing the four issues mentioned 50 | above. 51 | 52 | ## Contributing 53 | 54 | The tasks and dependencies for this package are handled via [pixi](https://pixi.sh/latest/). 55 | The `imodforge` environment is only used for the pixi-pack command to create the packages that are to be installed. 56 | The `default` environment is used to actually perform the tasks of creating an installer. 57 | 58 | To build an installer from scratch, `pixi pack` needs to be run, and after that `dotnet build`. 59 | This can be done in one go via `pixi run create-imodforge`. 60 | 61 | Other useful commands for testing are `pixi run build imodforge` (not packing every time), `pixi run test-install imodforge` and `pixi run test-uninstall imodforge` (create log files in the repo directory). 62 | -------------------------------------------------------------------------------- /.teamcity/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | iMOD6_Deltaforge Config DSL Script 5 | iMOD6_Deltaforge 6 | iMOD6_Deltaforge_dsl 7 | 1.0-SNAPSHOT 8 | 9 | 10 | org.jetbrains.teamcity 11 | configs-dsl-kotlin-parent 12 | 1.0-SNAPSHOT 13 | 14 | 15 | 16 | 17 | jetbrains-all 18 | https://download.jetbrains.com/teamcity-repository 19 | 20 | true 21 | 22 | 23 | 24 | teamcity-server 25 | https://dpcbuild.deltares.nl/app/dsl-plugins-repository 26 | 27 | true 28 | 29 | 30 | 31 | 32 | 33 | 34 | JetBrains 35 | https://download.jetbrains.com/teamcity-repository 36 | 37 | 38 | 39 | 40 | ${basedir} 41 | 42 | 43 | kotlin-maven-plugin 44 | org.jetbrains.kotlin 45 | ${kotlin.version} 46 | 47 | 48 | 49 | 50 | compile 51 | process-sources 52 | 53 | compile 54 | 55 | 56 | 57 | test-compile 58 | process-test-sources 59 | 60 | test-compile 61 | 62 | 63 | 64 | 65 | 66 | org.jetbrains.teamcity 67 | teamcity-configs-maven-plugin 68 | ${teamcity.dsl.version} 69 | 70 | kotlin 71 | target/generated-configs 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | org.jetbrains.teamcity 80 | configs-dsl-kotlin-latest 81 | ${teamcity.dsl.version} 82 | compile 83 | 84 | 85 | org.jetbrains.teamcity 86 | configs-dsl-kotlin-plugins-latest 87 | 1.0-SNAPSHOT 88 | pom 89 | compile 90 | 91 | 92 | org.jetbrains.kotlin 93 | kotlin-stdlib-jdk8 94 | ${kotlin.version} 95 | compile 96 | 97 | 98 | org.jetbrains.kotlin 99 | kotlin-script-runtime 100 | ${kotlin.version} 101 | compile 102 | 103 | 104 | -------------------------------------------------------------------------------- /icons/top_banner.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 36 | 38 | 42 | 49 | 53 | 60 | 67 | 74 | 81 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /imodforge/imodforge.wxs: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 21 | 23 | 25 | 27 | 29 | 30 | 31 | 33 | 34 | 35 | 37 | 41 | 42 | 43 | 44 | 45 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 55 | 56 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | 70 | 71 | 72 | 73 | 74 | 76 | 77 | 78 | 80 | 81 | 82 | 83 | 84 | 85 | 87 | 94 | 96 | 102 | 103 | 104 | 105 | 106 | 110 | 116 | 117 | 118 | 122 | 128 | 129 | 130 | 134 | 140 | 141 | 142 | 145 | 148 | 151 | 152 | 153 | 154 | 156 | 157 | 158 | 159 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /icons/dialog_welcome.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 36 | 38 | 42 | 49 | 52 | 55 | 60 | 64 | 69 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 106 | 107 | 108 | --------------------------------------------------------------------------------