Skip to content

Commit

Permalink
Replace the unmaintained dependency appdirs with platformdirs
Browse files Browse the repository at this point in the history
  • Loading branch information
avalentino committed Mar 29, 2024
1 parent 9952f39 commit 4b33c34
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,4 @@ The following people have made contributions to this project:
- [Yufei Zhu (yufeizhu600)](https://github.com/yufeizhu600)
- [Youva Aoun (YouvaEUMex)](https://github.com/YouvaEUMex)
- [Will Sharpe (wjsharpe)](https://github.com/wjsharpe)
- [Antonio Valentino](https://github.com/avalentino)
2 changes: 1 addition & 1 deletion continuous_integration/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
- distributed
- dask-image
- donfig
- appdirs
- platformdirs
- toolz
- Cython
- numba
Expand Down
2 changes: 1 addition & 1 deletion doc/rtd_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
dependencies:
- python=3.10
- pip
- appdirs
- platformdirs
- dask
- dask-image
- defusedxml
Expand Down
6 changes: 3 additions & 3 deletions doc/source/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ locations:
3. ``~/.satpy/satpy.yaml``
4. ``<SATPY_CONFIG_PATH>/satpy.yaml`` (see :ref:`config_path_setting` below)

The above ``user_config_dir`` is provided by the ``appdirs`` package and
The above ``user_config_dir`` is provided by the ``platformdirs`` package and
differs by operating system. Typical user config directories are:

* Mac OSX: ``~/Library/Preferences/satpy``
Expand Down Expand Up @@ -90,7 +90,7 @@ Directory where any files cached by Satpy will be stored. This
directory is not necessarily cleared out by Satpy, but is rarely used without
explicitly being enabled by the user. This
defaults to a different path depending on your operating system following
the `appdirs <https://github.com/ActiveState/appdirs#some-example-output>`_
the `platformdirs <https://github.com/platformdirs/platformdirs#example-output>`_
"user cache dir".

.. _config_cache_lonlats_setting:
Expand Down Expand Up @@ -214,7 +214,7 @@ Data Directory
Directory where any data Satpy needs to perform certain operations will be
stored. This replaces the legacy ``SATPY_ANCPATH`` environment variable. This
defaults to a different path depending on your operating system following the
`appdirs <https://github.com/ActiveState/appdirs#some-example-output>`_
`platformdirs <https://github.com/platformdirs/platformdirs#example-output>`_
"user data dir".

.. _download_aux_setting:
Expand Down
4 changes: 2 additions & 2 deletions satpy/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from importlib.resources import files as impr_files
from typing import Iterable

import appdirs
from platformdirs import AppDirs
from donfig import Config

from satpy._compat import cache
Expand All @@ -40,7 +40,7 @@
# FIXME: Use package_resources?
PACKAGE_CONFIG_PATH = os.path.join(BASE_PATH, "etc")

_satpy_dirs = appdirs.AppDirs(appname="satpy", appauthor="pytroll")
_satpy_dirs = AppDirs(appname="satpy", appauthor="pytroll")
_CONFIG_DEFAULTS = {
"tmp_dir": tempfile.gettempdir(),
"cache_dir": _satpy_dirs.user_cache_dir,
Expand Down
2 changes: 1 addition & 1 deletion satpy/readers/ahi_l1b_gridded_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import dask.array as da
import numpy as np
import xarray as xr
from appdirs import AppDirs
from platformdirs import AppDirs
from pyresample import geometry

from satpy.readers.file_handlers import BaseFileHandler
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

requires = ["numpy >=1.21", "pillow", "pyresample >=1.24.0", "trollsift",
"trollimage >=1.23", "pykdtree", "pyyaml >=5.1", "xarray >=0.14.1",
"dask[array] >=0.17.1", "pyproj>=2.2", "zarr", "donfig", "appdirs",
"dask[array] >=0.17.1", "pyproj>=2.2", "zarr", "donfig", "platformdirs",
"packaging", "pooch", "pyorbital"]

test_requires = ["behave", "h5py", "netCDF4", "pyhdf", "imageio",
Expand Down

0 comments on commit 4b33c34

Please sign in to comment.