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

Pydpiper should use pathlib's Path class to store all filepaths #444

Open
nzxwang opened this issue Oct 29, 2019 · 1 comment
Open

Pydpiper should use pathlib's Path class to store all filepaths #444

nzxwang opened this issue Oct 29, 2019 · 1 comment

Comments

@nzxwang
Copy link
Contributor

nzxwang commented Oct 29, 2019

Inspired by issue #443. filepaths should not be stored as strings and python>=3.4 has a builtin pathlib library for this. It also doesn't take all that much space

>>> sys.getsizeof("/hpf/largeprojects/MICe/lqiu/collaborator_40um/Picketts/Snf2H-Snf2L/symlink_distcorr_files//Snf2Hcko-emxcre_KO1.mnc")
164
>>> sys.getsizeof(Path("/hpf/largeprojects/MICe/lqiu/collaborator_40um/Picketts/Snf2H-Snf2L/symlink_distcorr_files//Snf2Hcko-emxcre_KO1.mnc"))
112
>>> sys.getsizeof("Snf2Hcko-emxcre_KO1.mnc")
72
>>> sys.getsizeof(Path("Snf2Hcko-emxcre_KO1.mnc"))
112
@bcdarwin
Copy link
Member

bcdarwin commented Oct 29, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants