-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add get data dir function to ConfigManager #299
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no suggestions.
Comments skipped due to low confidence (1)
surfactant/configmanager.py:145
- The new function
get_data_dir_path
introduces new behavior that should be covered by tests. Please add tests to ensure this function works correctly on different platforms.
def get_data_dir_path(self) -> Path:
d0e2c66
to
7ac43fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no suggestions.
Comments skipped due to low confidence (2)
tests/config/test_configmanager.py:81
- The environment variable used here should be 'LOCALAPPDATA' to match the implementation in 'get_data_dir_path'.
expected_data_dir = Path(os.getenv("APPDATA", str(Path("~\AppData\Local").expanduser())))
surfactant/configmanager.py:152
- The environment variable
LOCALAPPDATA
is used here, but the test usesAPPDATA
. This inconsistency could lead to errors. UseAPPDATA
in both the code and the test.
data_dir = Path(os.getenv("LOCALAPPDATA", os.path.expanduser("~\AppData\Local")))
8bbb60f
to
9f962a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 suggestion.
Comments skipped due to low confidence (3)
tests/config/test_configmanager.py:82
- The test should assert that the data_dir path ends with the app_name to ensure the path is correctly formed.
assert expected_data_dir in data_dir.parents
tests/config/test_configmanager.py:92
- The test should assert that the data_dir path ends with the app_name to ensure the path is correctly formed.
assert expected_data_dir in data_dir.parents
surfactant/configmanager.py:152
- Inconsistent method usage for expanding user directory. Use Path().expanduser() for consistency.
data_dir = Path(os.getenv("LOCALAPPDATA", os.path.expanduser("~\AppData\Local")))
e9bac44
to
c74059b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no suggestions.
c74059b
to
22b8dc3
Compare
22b8dc3
to
0d5d03b
Compare
Cherry-picked adding get_data_dir function to the ConfigManager from PR #267.