cbrnr / sleepecg

Sleep stage detection using ECG
BSD 3-Clause "New" or "Revised" License
93 stars 25 forks source link

switch from relative to absolute imports? #164

Closed tompollard closed 1 year ago

tompollard commented 1 year ago

This is a quick issue relating to the JOSS review comments at: https://github.com/openjournals/joss-reviews/issues/5411#issuecomment-1548163405

Absolute imports seem to be generally preferred by Python developers (https://peps.python.org/pep-0008/#imports). sleepecg uses relative imports in places (e.g. from .physionet import _list_physionet). Is this intentional? If not, perhaps switch to absolute imports at some point?

cbrnr commented 1 year ago

This is a good point. I have been using relative imports in my packages out of habit, with the main reason being that it makes some imports shorter. But you are right, I think it would definitely be worthwile to check if switching to absolute imports would make anything more complex. If not, I think we should go for it.