Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Fix.session to access Session in fixes #1988

Merged
merged 10 commits into from
May 26, 2023

Conversation

schlunma
Copy link
Contributor

@schlunma schlunma commented Mar 24, 2023

Description

To make fixes even more flexible I added a session attribute which includes the current Session. Example use case is loading additional data in the fix from the auxiliary_data_dir, which can now be accessed via Fix.session['auxiliary_data_dir'].

Closes #1986

Link to documentation: https://esmvaltool--1988.org.readthedocs.build/projects/ESMValCore/en/1988/develop/fixing_data.html#fix-structure


Before you get started

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.


To help with the number pull requests:

@schlunma schlunma added the enhancement New feature or request label Mar 24, 2023
@schlunma schlunma added this to the v2.9.0 milestone Mar 24, 2023
@schlunma schlunma self-assigned this Mar 24, 2023
@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Merging #1988 (e1656dd) into main (88827d6) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1988   +/-   ##
=======================================
  Coverage   92.79%   92.79%           
=======================================
  Files         236      236           
  Lines       12484    12485    +1     
=======================================
+ Hits        11585    11586    +1     
  Misses        899      899           
Impacted Files Coverage Δ
esmvalcore/dataset.py 100.00% <ø> (ø)
esmvalcore/cmor/_fixes/fix.py 98.57% <100.00%> (-0.03%) ⬇️
esmvalcore/cmor/fix.py 100.00% <100.00%> (ø)

Copy link
Contributor

@valeriupredoi valeriupredoi left a comment

Choose a reason for hiding this comment

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

two small comments that don't warrant a rejection 😁 Cheers, bud 🍺

@valeriupredoi valeriupredoi added the fix for dataset Related to dataset-specific fix files label May 25, 2023
@bouweandela bouweandela merged commit 83b12a2 into main May 26, 2023
@bouweandela bouweandela deleted the use_auxiliary_data_dir_in_fixes branch May 26, 2023 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fix for dataset Related to dataset-specific fix files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use auxiliary_data_dir in fixes
3 participants