Skip to content

Coupling to containerised LPJmL - #19

Merged
sieben-gea merged 19 commits into
mainfrom
s_container
Oct 6, 2026
Merged

sieben-gea merged 19 commits into
mainfrom
s_container

Conversation

@sieben-gea

@sieben-gea sieben-gea commented Jun 18, 2026 •

Copy link
Copy Markdown
Collaborator

This pull request combines changes needed to couple to LPJmL when run from a container by setting the necessary environment variables and using lpjml executables from the PATH instead of a specific directory.

Changes

  • submit_lpjml() does writes the coupling command into the SLURM script directly and does not create a separate runscript
  • Support for using meta as an input format
  • Support for LPJmL 6.1.x
  • Support for coupling to containerized LPJmL. In this current version, containers are transparent to pycoupler, expecting the container binaries to be linked in the PATH. It also expects an environment variable LPJML_CONTAINER to be set.

Bugfix

  • The model_path does not need to be set and is now fully optional.

Deprecations

  • run_lpjml() has been deprecated, use operate_lpjml(wait_for_exit=True) instead.

Breaking changes

  • Potentially breaking: New default port and host are now set to 0.0.0.0:2224.
  • config.version should be set to the actual version of the running LPJmL.
  • If there are inputs without absolute paths, config.inpath or the environment variable LPJINPATH needs to be set.
  • check_lpjml() only outputs to stdout in case of an error

@codecov

codecov Bot commented Jun 18, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 54.31310% with 143 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.32%. Comparing base (1334b1b) to head (df55f1d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pycoupler/config.py 48.73% 101 Missing ⚠️
pycoupler/run.py 50.00% 36 Missing ⚠️
pycoupler/coupler.py 89.65% 3 Missing ⚠️
pycoupler/utils.py 85.71% 2 Missing ⚠️
pycoupler/data.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
- Coverage   78.80%   75.32%   -3.48%     
==========================================
  Files           7        7              
  Lines        1684     1836     +152     
==========================================
+ Hits         1327     1383      +56     
- Misses        357      453      +96     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sieben-gea
sieben-gea force-pushed the s_container branch 3 times, most recently from bb6e3aa to cbf2057 Compare September 1, 2026 11:49
sieben-gea and others added 3 commits September 10, 2026 16:00
These changes add support for the new way of
reading metadata in higher versions of LPJmL,
but are desighned to be backwards compatible.
@sieben-gea
sieben-gea marked this pull request as ready for review September 17, 2026 14:26
@sieben-gea
sieben-gea requested a review from jnnsbrr September 17, 2026 14:26
@sieben-gea sieben-gea changed the title WIP: Coupling to containerised LPJmL Coupling to containerised LPJmL Sep 17, 2026

@jnnsbrr jnnsbrr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing to change, otherwise looks good!

Comment thread pycoupler/config.py
@sieben-gea
sieben-gea force-pushed the s_container branch 2 times, most recently from 71590ae to 6fa97a0 Compare October 1, 2026 12:49

@jnnsbrr jnnsbrr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine from my side.

@sieben-gea
sieben-gea merged commit 2c38624 into main Oct 6, 2026
1 of 3 checks passed
@sieben-gea
sieben-gea deleted the s_container branch October 6, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants