class_docstr: Test resampling a Scene to another Scene object.
docstr: Test that a composite with complex dependencies.
  
  This is specifically testing the case where a compositor depends on
  multiple resolution prerequisites which themselves are composites.
  These sub-composites depend on data with a modifier that only has
  optional dependencies. This is a very specific use case and is the
  simplest way to present the problem (so far).
  
  The general issue is that the Scene loading creates the "ds13"
  dataset which already has one modifier on it. The "comp27"
  composite requires resampling so its 4 prerequisites + the
  requested "ds13" (from the reader which includes mod1 modifier)
  remain. If the DependencyTree is not copied properly in this
  situation then the new Scene object will have the composite
  dependencies without resolution in its dep tree, but have
  the DataIDs with the resolution in the dataset dictionary.
  This all results in the Scene trying to regenerate composite
  dependencies that aren't needed which fail.
docstr_tok: ["Test","that","a","composite","with","complex","dependencies",".","This","is","specifically","testing","the","case","where","a","compositor","depends","on","multiple","resolution","prerequisites","which","themselves","are","composites",".","These","sub-composites","depend","on","data","with","a","modifier","that","only","has","optional","dependencies",".","This","is","a","very","specific","use","case","and","is","the","simplest","way","to","present","the","problem","(","so","far",")",".","The","general","issue","is","that","the","Scene","loading","creates","the","``","ds13","''","dataset","which","already","has","one","modifier","on","it",".","The","``","comp27","''","composite","requires","resampling","so","its","4","prerequisites","+","the","requested","``","ds13","''","(","from","the","reader","which","includes","mod1","modifier",")","remain",".","If","the","DependencyTree","is","not","copied","properly","in","this","situation","then","the","new","Scene","object","will","have","the","composite","dependencies","without","resolution","in","its","dep","tree",",","but","have","the","DataIDs","with","the","resolution","in","the","dataset","dictionary",".","This","all","results","in","the","Scene","trying","to","regenerate","composite","dependencies","that","are","n't","needed","which","fail","."]
code: def test_comps_need_resampling_optional_mod_deps(self):
      """Test that a composite with complex dependencies.
  
      This is specifically testing the case where a compositor depends on
      multiple resolution prerequisites which themselves are composites.
      These sub-composites depend on data with a modifier that only has
      optional dependencies. This is a very specific use case and is the
      simplest way to present the problem (so far).
  
      The general issue is that the Scene loading creates the "ds13"
      dataset which already has one modifier on it. The "comp27"
      composite requires resampling so its 4 prerequisites + the
      requested "ds13" (from the reader which includes mod1 modifier)
      remain. If the DependencyTree is not copied properly in this
      situation then the new Scene object will have the composite
      dependencies without resolution in its dep tree, but have
      the DataIDs with the resolution in the dataset dictionary.
      This all results in the Scene trying to regenerate composite
      dependencies that aren't needed which fail.
  
      """
      scene = Scene(filenames=["fake1_1.txt"], reader="fake1")
      # should require resampling
      scene.load(["comp27", "ds13"])
      assert "comp27" not in scene
      assert "ds13" in scene
  
      new_scene = scene.resample(resampler="native")
      assert len(list(new_scene.keys())) == 2
      assert "comp27" in new_scene
      assert "ds13" in new_scene
  
imports: from unittest import mock
  import numpy
  import pytest
  import xarray
  from dask import array
  from satpy import Scene
  from satpy.dataset.dataid import default_id_keys_config
  from satpy.tests.utils import make_cid, make_dataid
label_desc: Use image node_id 13 for calling the TestSceneResampling obj's underlying member method code with example usage: obj.test_comps_need_resampling_optional_mod_deps() without return types