Georgetown-IR-Lab / QuickUMLS

System for Medical Concept Extraction and Linking
MIT License
376 stars 95 forks source link

Feature request: include setup.py #18

Closed arnold-jr closed 5 years ago

arnold-jr commented 6 years ago

Would be nice to make this pip installable.

Thanks.

soldni commented 6 years ago

Joshua,

Thanks for the suggestion! I am a bit time constrained at the moment, but I plan to look into this in the future.

-Luca

burgersmoke commented 5 years ago

I was thinking about this too and I might try to get some time to add a setup.py and test this. I've been building something up using QuickUMLS and I'd love for it to be an easier dependency install for the pipeline I'm building. With any luck, I might have a pull request in a week or two.

soldni commented 5 years ago

Kelly,

I would be delighted if you can take up the mantle for that -- I'm currently a bit of capacity.

Best, Luca

burgersmoke commented 5 years ago

Excellent. I made some progress yesterday with both this and simstring. I'll keep you apprised of my progress. If this works out, we'll need to briefly discuss registering the package(s) and version numbering.

soldni commented 5 years ago

I finally have an update on this: I have a branch that is pip installable. I am not 100% ready to make a full announcement yet, but you can already install QuickUMLS via pip install quickumls. Please share any feedback/issue you encounter!

sandertan commented 5 years ago

@soldni Thanks for this awesome update! I successfully installed it with Python3, but get an error when using Python2.

To reproduce:

# Start Docker container with Python 2.7.16
docker run -it --rm python:2.7.16 bash

# In container install QuickUMLS
pip install QuickUMLS

There's quite a long stacktrace, but it ends with

Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-05LydY/quickumls-simstring/setup.py", line 122, in <module>
      'install_lib': _CommandInstallCythonized,
    File "/usr/local/lib/python2.7/distutils/core.py", line 151, in setup
      dist.run_commands()
    File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
      self.run_command(cmd)
    File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/usr/local/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 228, in run
      self.run_command('install')
    File "/usr/local/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/usr/local/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
      return orig.install.run(self)
    File "/usr/local/lib/python2.7/distutils/command/install.py", line 575, in run
      self.run_command(cmd_name)
    File "/usr/local/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/usr/local/lib/python2.7/distutils/command/install_lib.py", line 97, in run
      outfiles = self.install()
    File "/tmp/pip-install-05LydY/quickumls-simstring/setup.py", line 45, in install
      for file in outfiles]
    File "/tmp/pip-install-05LydY/quickumls-simstring/setup.py", line 30, in batch_rename
      dst_dir_fd=dst_dir_fd)
  TypeError: rename() takes no keyword arguments
  ----------------------------------------
  ERROR: Failed building wheel for quickumls-simstring
burgersmoke commented 5 years ago

Since Python 2.x is retiring in 6 months, I would propose that this may not warrant attention but instead users work within Python 3.x:

https://pythonclock.org/

burgersmoke commented 5 years ago

I finally have an update on this: I have a branch that is pip installable. I am not 100% ready to make a full announcement yet, but you can already install QuickUMLS via pip install quickumls. Please share any feedback/issue you encounter!

This is excellent news @soldni . If you could benefit from any testing, let me know. I still need to share the changes I've made to wrap QuickUMLS as a true spacy component in modular pipelines, but I wonder if I should do this after hearing what kind of announcement you have planned.

soldni commented 5 years ago

@sandertan as mentioned by Kelly, python 2 deprecation is imminent, so I was planning to drop support starting with version 1.3.

@burgersmoke That would be awesome -- I hope the changes I'm making (mostly related to packaging and squashing relative imports) will not cause any major headache when rebasing. I am currently testing for MacOS (and maybe Windows? compatibility); other than that, we should be good to go.

soldni commented 5 years ago

Testing was successful on macOS and UNIX. Merged!