Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace appdirs with platformdirs #37

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ classifiers = [
"License :: OSI Approved :: GNU Affero General Public License v3",
]
dependencies = [
"appdirs == 1.4.4",
"attrs == 23.2.*",
"matplotlib == 3.8.*",
"numpy == 1.26.*",
"opencv-python == 4.9.0.*",
"platformdirs == 4.2.*",
"PyQt6 == 6.6.1", # QCamera does not work on 6.7.0 on Windows 11
"PyQt6-Qt6 == 6.6.1", # Force to match PyQt6 version otherwise DLL load may fail
"pyqtgraph == 0.13.*",
Expand Down Expand Up @@ -100,8 +100,6 @@ local_partial_types = true
# Third-party libraries without stubs
[[tool.mypy.overrides]]
module = [
"appdirs",
"cmapy",
"pyqtgraph",
"PySpin",
"scipy.*",
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This file was autogenerated by uv via the following command:
# uv pip compile pyproject.toml -o requirements-dev.txt --extra dev
appdirs==1.4.4
attrs==23.2.0
colorama==0.4.6
# via pytest
Expand Down Expand Up @@ -34,6 +33,7 @@ packaging==24.0
# pytest
pillow==10.3.0
# via matplotlib
platformdirs==4.2.2
pluggy==1.5.0
# via pytest
pyparsing==3.1.2
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This file was autogenerated by uv via the following command:
# uv pip compile pyproject.toml -o requirements.txt
appdirs==1.4.4
attrs==23.2.0
contourpy==1.2.1
# via matplotlib
Expand All @@ -23,6 +22,7 @@ packaging==24.0
# via matplotlib
pillow==10.3.0
# via matplotlib
platformdirs==4.2.2
pyparsing==3.1.2
# via matplotlib
pyqt6==6.6.1
Expand Down
6 changes: 3 additions & 3 deletions src/frheed/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

import os

import appdirs
import platformdirs

DATA_DIR = os.path.normpath(os.path.expanduser("~/FRHEED"))
os.makedirs(DATA_DIR, exist_ok=True)

CONFIG_DIR = os.path.join(appdirs.user_config_dir(), "FRHEED", "")
CONFIG_DIR = os.path.join(platformdirs.user_config_dir(), "FRHEED", "")
os.makedirs(CONFIG_DIR, exist_ok=True)

LOG_DIR = os.path.join(appdirs.user_log_dir(), "FRHEED", "")
LOG_DIR = os.path.join(platformdirs.user_log_dir(), "FRHEED", "")
os.makedirs(LOG_DIR, exist_ok=True)

_LOCAL_DIR = os.path.dirname(__file__)
Expand Down