Closed smoia closed 4 years ago
Basically, this is what changes:
Hmmmm... it's probably worth dropping ordereddict, and with it the entirety of python2 support. Which means we can also drop six.
Also! It looks like we might really want a pyproject.toml
file instead of a setup.cfg
file. I could even be talked into the idea that the version number belongs both there and in _metadata.py
though it makes my soul cry, just a little bit. Though this offers some hope — looks like maybe introspecting with importlib
is a reasonable thing to do?
Anyhow, I'm gonna merge this for now, as it's better than what I'm doing now, and on the right track to being The Right Thing, I think.
Well, on a clean vagrant box, after installing I now get:
$ acq_info
Traceback (most recent call last):
File "/home/vagrant/.local/bin/acq_info", line 11, in <module>
load_entry_point('bioread==1.0.5', 'console_scripts', 'acq_info')()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2693, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2324, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2330, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/vagrant/.local/lib/python3.6/site-packages/bioread/__init__.py", line 13, in <module>
from bioread import reader
File "/home/vagrant/.local/lib/python3.6/site-packages/bioread/reader.py", line 31, in <module>
from bioread import headers as bh
File "/home/vagrant/.local/lib/python3.6/site-packages/bioread/headers.py", line 11, in <module>
from bioread.struct_dict import StructDict
File "/home/vagrant/.local/lib/python3.6/site-packages/bioread/struct_dict.py", line 13, in <module>
from bioread.vendor.ordereddict import OrderedDict
ModuleNotFoundError: No module named 'bioread.vendor'
so something is Not Quite Right yet
Aw, sorry for that!
It might be because it's not initiating the vendor
folder. Let me open a second PR.
@rmarkello set up versioneer for phys2bids
. We could try to do the same here and drop _metadata.py
.
Also, I think that the issue with vendor is due to the fact that I accidentally removed the __init__.py
library from that folder. I can put it back. Would you like to setup a CI to test that these things won't happen?
I 100% would love to set up CI, though I haven't done so in yonks and have mostly forgotten how to do it :/
It looks like Github has its own solution for this now?
Also, hi, @rmarkello!
Yes it turns out that re-adding __init__.py
to vendor/ makes this better, I've just done it.
Great, sorry for the bug! Github does have CI solutions now! We still use Travis and azure (still thanks to our great @rmarkello), but why not stay in house? (Probably there's a reason, but I don't know it)
Well, let me know if you cut a release for pypi any time soon, I can't wait to update our installation to make it flawless!
It looks like versioneer expects to be making a _version.py file which won't be compatible with updating a pypyroject.toml file... we'll figure something out though
Okay! I've upload 1.0.5 to pypi, let me know if it makes life better. There's more stuff to do here, but this might make your life better now.
As a little aside: I've set up a CI build with Github Actions and it works a charm. I'm gonna release a 2.0 (only supporting py3.6+) probably today... the last major change to make there is going to be to use pyproject.toml and make setup.py a stub.
Okay again! Just FYI, I've yanked 1.0.5 from pypi and replaced it with a full-on 2.0. I figured that a major release was good for the whole "dropping support for a major language version" thing.
Now I am 100% done commenting on this closed PR.
This is a proposed internal setup makeover.
Proposed Changes
setup.cfg
file for pip to better handle the requirements installationsetup.py
content intosetup.cfg
six
anddocopt
, add them as requirements during installation.h5py
andscipy
can be installed withpip install bioread[hdf5/mat/all]
Things that may be interesting to discuss about
ordereddict
is still packaged, mainly due to the fact that it becomes deprecated with python > 3.6, but then some refactoring is necessary to drop the dependency. It's still a possibility!