Closed atwinkelman closed 5 years ago
Okay, so if I understand this correctly — and to [attempt to] use proper Python terminology — you made a subpackage called local
that now contains modules local
and smart24
?
And the line from . import local
runs the __init__.py
of the local
subpackage, thereby exposing the function read_local()
and the class Smart24
?
Okay, so if I understand this correctly — and to [attempt to] use proper Python terminology — you made a subpackage called
local
that now contains moduleslocal
andsmart24
?
More or less. Check out how obspy has their __init__.py
files organized for some motivation.
And the line
from . import local
runs the__init__.py
of thelocal
subpackage, thereby exposing the functionread_local()
and the classSmart24
?
Yes, from . import local
acts just like if you ran that command manually in an interpreter.
What do you think about renaming the class
smart24
toSmart24
to match Python class naming convention?
Sure. Done.
Hmm... after pulling in the changes I'm now getting this error when I attempt
import waveform_collection
Error:
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-1-2f98d1172391> in <module>
----> 1 import waveform_collection
~/repos/waveform_collection/waveform_collection.py in <module>
4 __import__('pkg_resources').require('waveform-collection==0.0.0')
5 __file__ = '/Users/ldtoney/repos/waveform_collection/waveform_collection.py'
----> 6 with open(__file__) as f:
7 exec(compile(f.read(), __file__, 'exec'))
FileNotFoundError: [Errno 2] No such file or directory: '/Users/ldtoney/repos/waveform_collection/waveform_collection.py'
Does setup.py
need to be modified? I wouldn't think so, given that I'm using find_packages()
...
Weird. It works with Python but not IPython... see below.
My best guess is you're having an environment issue. The FileNotFoundError
is telling you it cannot find the file /Users/ldtoney/repos/waveform_collection/waveform_collection.py
. Looking back in time on git shows that this project used to be just a waveform_collection.py
file. Perhaps you need to update your install?
Are you sure the ipython you're running has the latest waveform_collection installed? In the current env, where does which ipython
point?
Solved this in a different environment by running conda update ipython
. So it must have been a stale path issue as you suggest. Kind of frustrating!
Add capability to read CD-1.1 formatted files from Geotech SMART24 digitizers and start providing structure for adding more read-from-file formats.