File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,6 +97,11 @@ class IngestReader(XMLDumpFileReader):
9797 Dataset_complete = "false"
9898 """Value to prescribe in the `complete` attribute of datasets.
9999
100+ .. note::
101+ The value for this class attribute is subject to change in
102+ version 2.0. You might want to override it in order to pin it
103+ to a value that is suitable for you.
104+
100105 .. versionadded:: 1.5.0
101106 """
102107 DatasetType_name = "raw"
@@ -198,6 +203,20 @@ def get_environment(self, client):
198203 Subclasses may override this method to control the attributes
199204 set in the environment.
200205
206+ .. note::
207+ If you override this method, it is advisable to call the
208+ inherited method from the parent class and augment the
209+ result. This avoids inadvertently dropping environment
210+ settings added in future versions. E.g. do something
211+ like the following in your subclass:
212+
213+ .. code-block:: python
214+
215+ def get_environment(self, client):
216+ env = super().get_environment(client)
217+ env['mykey'] = 'value'
218+ return env
219+
201220 :param client: the client object being used by this
202221 IngestReader.
203222 :type client: :class:`icat.client.Client`
You can’t perform that action at this time.
0 commit comments