Skip to content

Commit

Permalink
Merge branch 'asdf-guides' of github.com:SolarDrew/dkist into asdf-gu…
Browse files Browse the repository at this point in the history
…ides
  • Loading branch information
SolarDrew committed Feb 18, 2025
2 parents 2582b1b + 7c4967c commit a40c57d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/howto_guides/asdf_warnings.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _dkist:howto-guide:asdf-warnings
Understand version warnings when loading ASDFs
=================================================
==============================================

When you load a recently-downloaded ASDF file you may see a warning something like this:

Expand Down
16 changes: 8 additions & 8 deletions docs/howto_guides/replacing_asdfs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ For example:

.. code-block:: python
Fido.fetch(res, path="~/sunpy/data/{instrument}/{dataset_id}", overwrite=True) # doctest: +SKIP
Fido.fetch(res, path="~/sunpy/data/{instrument}/{dataset_id}", overwrite=True) # doctest: +SKIP
where `res` is the result of a `Fido` search for some dataset you already have saved locally.
where ``res`` is the result of a ``Fido`` search for some dataset you already have saved locally.

You might also need to force a refresh of the sample data which is included with the Python tools.
Again, we can use the `overwrite` keyword for this.
Again, we can use the ``overwrite`` keyword for this.

.. code-block:: python
from dkist.data.sample import download_all_sample_data
download_all_sample_data(overwrite=True) # doctest: +REMOTE_DATA
download_all_sample_data(overwrite=True) # doctest: +REMOTE_DATA
Occasionally, the naming convention for the ASDF files has also changed, meaning that the usual checks to stop you downloading a dataset you already have locally may fail and you will end up with two (likely identical) metadata files.
If you re-download a dataset that you already had locally before the rename, you may see a warning like this when you load the dataset:
In the past, the naming convention for the metadata ASDF files has also changed, meaning that the usual checks to stop you downloading a dataset you already have locally may fail and you will end up with two separate metadata files.
If you try and load a dataset where a file with an old name is present you will see a warning similar to this:

.. code-block:: python
Expand All @@ -42,6 +42,6 @@ If you re-download a dataset that you already had locally before the rename, you
When this happens the newer ASDF file is loaded so the old one can safely be ignored.
However, to remove the warning the old file can simply be deleted or moved elsewhere.

Note that this behaviour is new in dkist v1.10.0.
Note that this warning was added in dkist version 1.10.0.
In older versions the loader will return a list containing the corresponding dataset for each ASDF file present, which is likely to cause problems.
Deleting the old file will still solve the issue, although you should also update your Python tools installation to v1.10.1 or later if possible.
Deleting the old file will still solve the issue, although you should also update your Python tools installation to v1.10.0 or later.

0 comments on commit a40c57d

Please sign in to comment.