Repository: DakaraProject/dakara-base

Issue:
Windows directories should use roaming

Discussion:

Patch:
diff --git a/setup.cfg b/setup.cfg
index a1ad068..a29a50b 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -27,12 +27,12 @@ package_dir =
 packages = find:
 # dependencies are pinned by interval
 install_requires =
-        appdirs>=1.4.4,<1.5.0
         coloredlogs>=15.0.1,<15.1.0
         environs>=9.5.0,<9.6.0
         furl>=2.1.3,<2.2.0
         importlib-resources>=5.6.0,<5.7.0; python_version < '3.7'
         path>=16.4.0,<16.5.0
+        platformdirs>=2.5.2,<2.6.0
         progressbar2>=4.0.0,<4.1.0
         PyYAML>=6.0,<6.1
         requests>=2.27.1,<2.28.0
diff --git a/src/dakara_base/directory.py b/src/dakara_base/directory.py
index de60080..1d68335 100644
--- a/src/dakara_base/directory.py
+++ b/src/dakara_base/directory.py
@@ -13,8 +13,8 @@ objects:
 >>> type(directories.user_config_dir)
 ... path.Path
 """
-from appdirs import AppDirs
 from path import Path
+from platformdirs import PlatformDirs as AppDirs
 
 APP_NAME = "dakara"
 PROJECT_NAME = "DakaraProject"
@@ -43,13 +43,21 @@ class AppDirsPath(AppDirs):
     def user_data_dir(self):
         return Path(super().user_data_dir)
 
+    @property
+    def user_documents_dir(self):
+        return Path(super().user_documents_dir)
+
     @property
     def user_log_dir(self):
         return Path(super().user_log_dir)
 
+    @property
+    def user_runtime_dir(self):
+        return Path(super().user_runtime_dir)
+
     @property
     def user_state_dir(self):
         return Path(super().user_state_dir)
 
 
-directories = AppDirsPath(APP_NAME, PROJECT_NAME)
+directories = AppDirsPath(APP_NAME, PROJECT_NAME, roaming=True)


Test patch:
diff --git a/tests/test_directory.py b/tests/test_directory.py
index 2ec395d..f5110a9 100644
--- a/tests/test_directory.py
+++ b/tests/test_directory.py
@@ -14,5 +14,7 @@ class AppDirsPathTestCase(TestCase):
         self.assertIsInstance(appdirs.user_cache_dir, Path)
         self.assertIsInstance(appdirs.user_config_dir, Path)
         self.assertIsInstance(appdirs.user_data_dir, Path)
+        self.assertIsInstance(appdirs.user_documents_dir, Path)
         self.assertIsInstance(appdirs.user_log_dir, Path)
+        self.assertIsInstance(appdirs.user_runtime_dir, Path)
         self.assertIsInstance(appdirs.user_state_dir, Path)