Skip to main content

Python wrapper for LPJ-Guess experiment runner (via pythonnet + .NET 9)

Project description

lpjguess-runner

Python wrapper for LPJ-Guess experiment runner (via pythonnet + .NET 9)

Build

Prerequisites:

  • .NET 9 SDK
  • Python 3.11 (if building wheel)
# Clone the repository with submodules
git clone --recurse-submodules git@github.com:hie-dave/lpjg-gui.git
make

Install

  • Prerequisites: .NET 9 runtime

From PyPI

pip install lpjguess-runner

From Source

make install                 # install globally
make install-venv VENV=.venv # install into a local virtual environment
make install-user            # install for the current user

Example Usage

from lpjguess_runner import *

run_settings = RunSettings.Local(
    "/path/to/guess/executable",
    "/path/to/output/directory",
    "nc",   # input module
    4,      # cpu count
    "job_name")

simulations = [
    simulation("nindiv_max_0_sla_26", [           # Run all .ins files with:
        TopLevelParameter("nindiv_max", "0"),     # - nindiv_max = 0
        BlockParameter("sla", "pft", "MRS", "26") # - SLA of "MRS" pft set to 26
    ]),
    simulation("nindiv_max_1_sla_39", [           # Run all .ins files with:
        TopLevelParameter("nindiv_max", "1"),     # - nindiv_max = 1
        BlockParameter("sla", "pft", "MRS", "39") # - SLA of "MRS" pft set to 39
    ]),
]

ins = ["/path/to/file1.ins", "/path/to/file2.ins"]
pfts = ["MRS"]

result = run_simulations(run_settings,
                            simulations,
                            ins,
                            pfts,
                            ConsoleProgressReporter(), # Write progres messages to stdout
                            ConsoleOutputHelper())     # Propagate subprocess output to stdout

print(f"Total jobs: {result.TotalJobs}")
print(f"Successful jobs: {result.SuccessfulJobs}")
print(f"Failed jobs: {result.FailedJobs}")
print(f"Error: {result.Error}")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

lpjguess_runner-0.0.0-py3-none-win_amd64.whl (1.0 MB view details)

Uploaded Python 3Windows x86-64

lpjguess_runner-0.0.0-py3-none-macosx_11_0_arm64.whl (1.0 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file lpjguess_runner-0.0.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for lpjguess_runner-0.0.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 79bce873a7591da1212eb78f8013ef6be79e65f87ae26f36af8430b50c677dec
MD5 f86526308e07e4bc4e588bbeb7e2b903
BLAKE2b-256 73b507c3505fae3610c11b960a24696bd8e634080071bef6907099feb4c01dd3

See more details on using hashes here.

Provenance

The following attestation bundles were made for lpjguess_runner-0.0.0-py3-none-win_amd64.whl:

Publisher: ci.yml on hie-dave/lpjg-gui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lpjguess_runner-0.0.0-py3-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lpjguess_runner-0.0.0-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2907e534dd984267b2092282d92bd59ee89c19b887d33aa3cd5b3b16abddffb6
MD5 a3b6b8eba2b5eb480c5e03e81126e454
BLAKE2b-256 898e43a87150ef3ccd64f23a71b33c751e0d3ca12b9354e2ed02d9cfec60f464

See more details on using hashes here.

Provenance

The following attestation bundles were made for lpjguess_runner-0.0.0-py3-none-manylinux2014_x86_64.whl:

Publisher: ci.yml on hie-dave/lpjg-gui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lpjguess_runner-0.0.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lpjguess_runner-0.0.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 069fe96d6e0809edba4184d7e31c16233ab60d7b8441b1aa4f6cc44aa44160a0
MD5 afe7eab38eecfb111dee4fc24c8a132d
BLAKE2b-256 d95e961af99e0f87732c233e19126630c5734c525aa215a05df39084f72bc0b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for lpjguess_runner-0.0.0-py3-none-macosx_11_0_arm64.whl:

Publisher: ci.yml on hie-dave/lpjg-gui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page