Skip to content
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
3 changes: 3 additions & 0 deletions .teamcity/Templates/AcceptanceTestsTemplate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ object AcceptanceTestsTemplate : Template({
workingDir = "imod-python"
scriptContent = """
SET PATH=%%PATH%%;%system.teamcity.build.checkoutDir%\modflow6

pixi config set --local detached-environments "C:\pixi_envs"
pixi install --environment user-acceptance --frozen

pixi run --environment user-acceptance --frozen dvc remote modify --local minio access_key_id %env.access_key%
pixi run --environment user-acceptance --frozen dvc remote modify --local minio secret_access_key %env.secret_access_key%
Expand Down
2 changes: 2 additions & 0 deletions .teamcity/Templates/ExamplesTemplate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ object ExamplesTemplate : Template({
workingDir = "imod-python"
scriptContent = """
SET PATH=%%PATH%%;%system.teamcity.build.checkoutDir%\modflow6
pixi config set --local detached-environments "C:\pixi_envs"
pixi install --environment default --frozen
pixi run --environment default --frozen examples
""".trimIndent()
formatStderrAsError = true
Expand Down
2 changes: 2 additions & 0 deletions .teamcity/Templates/LintTemplate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ object LintTemplate : Template({
id = "Static_code_analysis"
workingDir = "imod-python"
scriptContent = """
pixi config set --local detached-environments "C:\pixi_envs"
pixi install --environment default --frozen
pixi run --environment default --frozen lint
""".trimIndent()
formatStderrAsError = true
Expand Down
6 changes: 4 additions & 2 deletions .teamcity/Templates/MyPyTemplate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ object MyPyTemplate : Template({
id = "MyPy_analysis"
workingDir = "imod-python"
scriptContent = """
pixi config set --local detached-environments "C:\pixi_envs"
pixi install --environment default --frozen
pixi run --environment default --frozen mypy_report
pixi run --environment default --frozen mypy
pixi run --environment default --frozen mypy_lint
""".trimIndent()
formatStderrAsError = true
dockerImage = "%DockerContainer%:%DockerVersion%"
dockerImagePlatform = ScriptBuildStep.ImagePlatform.Windows
dockerRunParameters = """--cpus=4 --memory=16g"""
dockerRunParameters = """--cpus=8 --memory=16g"""
dockerPull = false
}
}
Expand Down
2 changes: 2 additions & 0 deletions .teamcity/Templates/PipPythonTemplate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ object PipPythonTemplate : Template({
id = "pip_install"
workingDir = "imod-python"
scriptContent = """
pixi config set --local detached-environments "C:\pixi_envs"
pixi install --environment %python_env% --frozen
pixi run --environment %python_env% --frozen test_import
""".trimIndent()
formatStderrAsError = true
Expand Down
6 changes: 5 additions & 1 deletion .teamcity/Templates/UnitTestsTemplate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ object UnitTestsTemplate : Template({
workingDir = "imod-python"
scriptContent = """
SET PATH=%%PATH%%;%system.teamcity.build.checkoutDir%\modflow6
pixi config set --local detached-environments "C:\pixi_envs"
pixi install --environment default --frozen
pixi run --environment default --frozen unittests
""".trimIndent()
formatStderrAsError = true
Expand All @@ -45,7 +47,9 @@ object UnitTestsTemplate : Template({
workingDir = "imod-python/imod/tests"
scriptMode = script {
content = """
${'$'}REPORT = echo "coverage report" | pixi shell --environment default
pixi config set --local detached-environments "C:\pixi_envs"

${'$'}REPORT = echo "coverage report" | pixi shell --environment default --frozen

${'$'}TOTALS = ${'$'}REPORT | Select-String -Pattern 'TOTAL' -CaseSensitive -SimpleMatch
${'$'}STATISTICS = ${'$'}TOTALS -split "\s+"
Expand Down
2 changes: 1 addition & 1 deletion docs/faq/python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ practical sense.)
To create a Pixi environment open a command prompt and ``cd`` to the imod folder.
In the imod folder use the following command::

pixi run install
pixi install

This will create a conda environment inside the imod folder. To activate the environment run::

Expand Down
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ With pixi you can install the latest development version of imod::

git clone https://github.com/Deltares/imod-python.git
cd imod-python
pixi run install
pixi install

This will install the same python installation the iMOD Python developers work
with, so it should work (otherwise we couldn't do our work!). This contains an
Expand Down
Loading
Loading