Skip to content

Commit bf395b8

Browse files
committed
Replace 'appdirs' with 'platformdirs' (#275)
1 parent d8e7faa commit bf395b8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
appdirs==1.4.4
21
cycler==0.11.0
32
decorator==5.1.1
43
docopt==0.6.2
@@ -8,6 +7,7 @@ matplotlib==3.7.1
87
networkx==3.1
98
numpy==1.24.3
109
Pillow==9.5.0
10+
platformdirs==4.2.2
1111
pyparsing==3.0.9
1212
pyqt-distutils==0.7.3
1313
PyQt6==6.4.2

uilib/fileIO.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from PyQt6.QtWidgets import QApplication
66
import yaml
7-
import appdirs
7+
import platformdirs
88

99
from .defaults import DEFAULT_PREFERENCES, DEFAULT_PROPELLANTS, KNSU_PROPS
1010
from .logger import logger
@@ -59,7 +59,7 @@ def loadFile(path, dataType):
5959
# Mac OS put these files alongside the executable, but the v0.5.0 added an installer for windows so it makes more
6060
# sense to use the user's data directory now.
6161
def getConfigPath():
62-
path = appdirs.user_data_dir('openMotor', 'openMotor')
62+
path = platformdirs.user_data_dir('openMotor', 'openMotor')
6363
if not os.path.isdir(path): # Create directory if it doesn't exist
6464
os.mkdir(path)
6565
return '{}/'.format(path)

uilib/logger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44
import traceback
55
import os
6-
import appdirs
6+
import platformdirs
77

88
class Logger():
99
def __init__(self):
@@ -16,7 +16,7 @@ def __init__(self):
1616
self.log('Application started at {}'.format(startDate))
1717

1818
def _openLogFile(self):
19-
path = appdirs.user_log_dir('openMotor', 'openMotor')
19+
path = platformdirs.user_log_dir('openMotor', 'openMotor')
2020
if not os.path.isdir(path):
2121
os.makedirs(path)
2222
self._file = open(os.path.join(path, "openMotor.log"), 'a')

0 commit comments

Comments
 (0)