-
Notifications
You must be signed in to change notification settings - Fork 6
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
Convert os.path to pathlib based Paths #646
Conversation
@@ -47,7 +46,7 @@ def create_structured_project(self): | |||
|
|||
class CurrentSession: | |||
def __init__(self, fname=None): | |||
self.settings_dir = os.path.join(expanduser("~"), ".MDANSE") | |||
self.settings_dir = Path("~").expanduser() / ".MDANSE" |
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.
It should be noted this conflicts with the MDANSE.Core.Platform
definition.
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.
As far as I can tell, CurrentSession.py is not referred to by any other file, since in the end the 'session' objects were implemented in the GUI instead. You're welcome to solve the conflict by deleting CurrentSession.py
b5fade0
to
6379fbf
Compare
6379fbf
to
72442d0
Compare
At the moment, manual testing shows problems with saving the input parameters in the output files:
|
17cc4a0
to
bb87ec0
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.
I did not find any other problems caused by the changes. It seems to work fine now. I agree that the specific test for encoding all the inputs to JSON can be added in a separate PR.
c.f. #658 |
Description of work
os.path
methods withpathlib.Path
sMDANSE.Core.Platform
to work withPath
s rather thanstr
sTo test
Nothing should change, standard tests.