Skip to content

Feature/bump to python3.12 - #74

Open
mfroelund wants to merge 14 commits into
ACCORD-NWP:developfrom
mfroelund:feature/bump-to-python3.12
Open

Feature/bump to python3.12#74
mfroelund wants to merge 14 commits into
ACCORD-NWP:developfrom
mfroelund:feature/bump-to-python3.12

Conversation

@mfroelund

Copy link
Copy Markdown
Collaborator

Describe your changes

< Summary of the changes.>

< Please also include relevant motivation and context. >

< List any dependencies that are required for this change. >

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist before requesting a review

Testing

  • I have tested this on ATOS using the atos_bologna.toml configuration in the latest version of Tactus-test-runner
  • I have tested this on LUMI using the lumi.toml configuration in the latest version of Tactus-test-runner

For further information see the development guide

Code quality

  • My change follows the best practices for this project.
  • My local environment is correctly initialised as described in the README file.
  • My branch is up-to-date with the target branch - if not update your fork with the changes from the target branch (use pull with --rebase option if possible).
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation and docstrings to reflect the changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have ensured that the code is still installable with poetry after the changes and runs
  • I have requested one or more reviewer(s) and an assignee (assignee is responsible for merging). At least one reviewer has accepted to review.

Checklist for reviewers

Each PR comes with its own improvements and flaws. The reviewer should check the following:

  • the code readable
  • the code well tested (checked coverage report)
  • the code documented
  • the code easy to maintain

Author checklist after completed review

  • I have added a line to the CHANGELOG describing this change (in section
    reflecting type of change, for example "bug fixes", add section where
    missing)

Checklist for assignees

  • PR is up to date with the base branch
  • the tests passing
  • author has added an entry to the changelog (and designated the change as added, changed or fixed)
  • the PR has been approved by all the reviewers, that accepted to review.
  • Once the PR ready to be merged, squash commits and merge the PR.

Tag possible reviewers

You can @-tag people to review this PR in addition to formal review requests.

Comment thread pyproject.toml Outdated
"troika @ git+https://github.com/ecmwf/troika.git",
"urllib3<2",
"utci @ git+https://github.com/ACCORD-NWP/utci.git",
"utci @ git+https://github.com/mfroelund/utci.git@feature/bump-python-to-3.12",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Shall be updated before merge

@uandrae uandrae added this to the v1.2.0 milestone Jun 1, 2026
@mfroelund mfroelund self-assigned this Jun 1, 2026
@mfroelund
mfroelund marked this pull request as ready for review June 3, 2026 08:17
@uandrae

uandrae commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Tried on atos and installed naively with poetry after loading python3/3.12.11-01 and got the error below. Is there some uv documentation missing or is it still expected to work with poetry?

[snh@ac6-101 tactus_pr74]$ poetry run tactus case ?tactus/data/config_files/configurations/cy50t2_arome --case-name python3_12 --start-suite 
2026-06-04 09:14:24 | INFO     | Start tactus v1.0.0 --> "tactus case ?tactus/data/config_files/configurations/cy50t2_arome --case-name python3_12 --start-suite"
...
2026-06-04 09:14:30 | INFO     | suite definition: TactusSuiteDefinition
Traceback (most recent call last):
  File "/etc/ecmwf/nfs/dh2_perm_b/snh/git/tactus_pr74/.venv/bin/tactus", line 6, in <module>
    sys.exit(main())
             ^^^^^^
  File "/etc/ecmwf/nfs/dh2_perm_b/snh/git/tactus_pr74/tactus/logs.py", line 109, in wrapper
    function_rtn = function(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/etc/ecmwf/nfs/dh2_perm_b/snh/git/tactus_pr74/tactus/__main__.py", line 43, in main
    args.run_command(args=args, config=config)
  File "/etc/ecmwf/nfs/dh2_perm_b/snh/git/tactus_pr74/tactus/commands_functions.py", line 151, in create_exp
    start_suite(args, config)
  File "/etc/ecmwf/nfs/dh2_perm_b/snh/git/tactus_pr74/tactus/commands_functions.py", line 204, in start_suite
    server = EcflowServer(config, start_command=args.start_command)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/etc/ecmwf/nfs/dh2_perm_b/snh/git/tactus_pr74/tactus/scheduler.py", line 106, in __init__
    raise ModuleNotFoundError("Ecflow not found")

@mfroelund

Copy link
Copy Markdown
Collaborator Author

Tried on atos and installed naively with poetry after loading python3/3.12.11-01 and got the error below. Is there some uv documentation missing or is it still expected to work with poetry?

[snh@ac6-101 tactus_pr74]$ poetry run tactus case ?tactus/data/config_files/configurations/cy50t2_arome --case-name python3_12 --start-suite 
2026-06-04 09:14:24 | INFO     | Start tactus v1.0.0 --> "tactus case ?tactus/data/config_files/configurations/cy50t2_arome --case-name python3_12 --start-suite"
...
2026-06-04 09:14:30 | INFO     | suite definition: TactusSuiteDefinition
Traceback (most recent call last):
  File "/etc/ecmwf/nfs/dh2_perm_b/snh/git/tactus_pr74/.venv/bin/tactus", line 6, in <module>
    sys.exit(main())
             ^^^^^^
  File "/etc/ecmwf/nfs/dh2_perm_b/snh/git/tactus_pr74/tactus/logs.py", line 109, in wrapper
    function_rtn = function(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/etc/ecmwf/nfs/dh2_perm_b/snh/git/tactus_pr74/tactus/__main__.py", line 43, in main
    args.run_command(args=args, config=config)
  File "/etc/ecmwf/nfs/dh2_perm_b/snh/git/tactus_pr74/tactus/commands_functions.py", line 151, in create_exp
    start_suite(args, config)
  File "/etc/ecmwf/nfs/dh2_perm_b/snh/git/tactus_pr74/tactus/commands_functions.py", line 204, in start_suite
    server = EcflowServer(config, start_command=args.start_command)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/etc/ecmwf/nfs/dh2_perm_b/snh/git/tactus_pr74/tactus/scheduler.py", line 106, in __init__
    raise ModuleNotFoundError("Ecflow not found")

Yes this PR doesn't outfaces poetry, so it should still work. For me it works, I have

Currently Loaded Modules:
  1) gcc/8.5.0   2) prgenv/gnu   3) ecflow/5.15.1   4) ecmwf-toolbox/2025.10.1.0   5) python3/3.12.11-01

and ran

poetry install;
poetry run tactus case ?tactus/data/config_files/configurations/cy50t2_arome --case-name python3_12 --start-suite;

With uv, my experience is, that you have to tell it to use system packages in order for it to find ecflow:

uv venv --system-site-packages --no-managed-python
uv sync
uv run tactus case ?tactus/data/config_files/configurations/cy50t2_arome --case-name python3_12 --start-suite

@uandrae

uandrae commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Thanks, but this suggest and update of the documentation, right?

@mfroelund

Copy link
Copy Markdown
Collaborator Author

Thanks, but this suggest and update of the documentation, right?

Yes, we can do that, but soon pixi will come, but you'll still be able to install with at least uv. So just a question if we should documentation installation procedures for both pixi, uv, (and poetry, if it still works after pixi - I haven't tested) ?

@uandrae

uandrae commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

I think we said in yesterdays meeting that we go for this first and do pixi later to allow e.g. DW on LUMI time to adapt. Do you agree @jacobsnoeijer?

@mfroelund

Copy link
Copy Markdown
Collaborator Author

I think we said in yesterdays meeting that we go for this first and do pixi later to allow e.g. DW on LUMI time to adapt. Do you agree @jacobsnoeijer?

Yes, I agree. It was just to know, if we then add documentation for uv now, and then either replace it with pixi at some point, or if we'll continue to have documentation for multiple package managers. I don't think I'm against either of the options.

@jacobsnoeijer

Copy link
Copy Markdown
Contributor

I will try to test this today on LUMI (and if it works also with #75). Hope to give a status update later today

@jacobsnoeijer

jacobsnoeijer commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

I have a procedure of this PR (together with #75) to be able to launch a suite on LUMI and LEONARDO. On the compute nodes of LUMI we cannot get the gdal anymore. Need to see how we can setup the venv also on the compute nodes there

@jacobsnoeijer

Copy link
Copy Markdown
Contributor

I have a procedure of this PR (together with #75) to be able to launch a suite on LUMI and LEONARDO. On the compute nodes of LUMI we cannot get the gdal anymore. Need to see how we can setup the venv also on the compute nodes there

In #75: I mentioned the solution to remove explicit loading the gdal module; then the pixi installed gdal can be found.

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.

3 participants