Skip to content

Commit

Permalink
Write tracking_id as global attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
schlunma committed Apr 29, 2024
1 parent 2cf5723 commit 996ca36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def create_test_file(filename, tracking_id=None):
attributes = {}
if tracking_id is not None:
attributes['tracking_id'] = tracking_id
cube = iris.cube.Cube([], attributes=attributes)
cube = iris.cube.Cube([])
cube.attributes.globals = attributes

iris.save(cube, filename)

Expand Down
3 changes: 2 additions & 1 deletion tests/integration/recipe/test_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def create_test_file(filename, tracking_id=None):
attributes = {}
if tracking_id is not None:
attributes['tracking_id'] = tracking_id
cube = iris.cube.Cube([], attributes=attributes)
cube = iris.cube.Cube([])
cube.attributes.globals = attributes

iris.save(cube, filename)

Expand Down

0 comments on commit 996ca36

Please sign in to comment.