DidYouMean-Python icon indicating copy to clipboard operation
DidYouMean-Python copied to clipboard

Make this pip installable

Open SylvainDe opened this issue 10 years ago • 13 comments

References:

https://docs.python.org/2/distutils/introduction.html http://peterdowns.com/posts/first-time-with-pypi.html http://docs.travis-ci.com/user/deployment/pypi/

SylvainDe avatar Oct 28 '14 16:10 SylvainDe

$ python setup.py register -r pypi running register running check Registering didyoumean to https://pypi.python.org/pypi Server response (403): Package name conflicts with existing package 'DidYouMean'

I guess I'll have to find another name.

SylvainDe avatar Oct 29 '14 21:10 SylvainDe

Also, I forgot to put the init.py and I am not quite sure how to make the whole thing work.

SylvainDe avatar Nov 04 '14 09:11 SylvainDe

http://www.discoversdk.com/blog/packaging-python-code

SylvainDe avatar Dec 16 '16 08:12 SylvainDe

What more do you need ? I can help you wish packaging, but appart for the name, you seem to be ok. Do you have another problem ?

sametmax avatar Mar 06 '17 10:03 sametmax

Hi @sametmax , quite an honor to see you here :) I guess I'll need to try with another name. I'll keep you posted but I'm very new to this packaging thing. If you have any suggestion regarding the name, you are more than welcome!

SylvainDe avatar Mar 06 '17 10:03 SylvainDe

:) It's a selfish visit. I'm gonna add DidYouMean to devpy.

DidYouMean could mean a spell checker or something from a search engine so adding a qualifier in the name wouldn't hurt anyway.

BetterErrorMessages, ErrorHints, ExceptionHints, ErrorTips, ExceptionTips, etc could be more self-explanatory names.

sametmax avatar Mar 06 '17 11:03 sametmax

Working on it :-)

https://www.reddit.com/r/Python/comments/5f6ev8/what_one_thing_took_your_python_to_the_next_level/dai0glj/

SylvainDe avatar Mar 06 '17 20:03 SylvainDe

$ python setup.py register -r pypitest
Registering BetterErrorMessages to https://upload.pypi.org/legacy/
Server response (410): This API is no longer supported, instead simply upload the file.

:(

SylvainDe avatar Mar 06 '17 21:03 SylvainDe

I'm getting punished for procrastinating on this issue :-)

SylvainDe avatar Mar 06 '17 21:03 SylvainDe

It works!!!!!

$ virtualenv toto_env
$ source toto_env/bin/activate
$ pip install BetterErrorMessages
$ python
>>> import didyoumean
>>> didyoumean.didyoumean_api.didyoumean_enablehook()
>>> abcdef = 'toto'
>>> abcdf
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'abcdf' is not defined. Did you mean 'abcdef' (local)?

SylvainDe avatar Mar 06 '17 21:03 SylvainDe

@sametmax Now it is pretty obvious (from the example above) that the API is terrible. I reckon being able to do import didyoumean and didyoumean.enablehook would probably be MUCH better. As you'll probably be the first user, you get to decide if that would be fine for you before it's too late :-). Also, I should be able to do so just by messing with the __init__.py file, right ?

SylvainDe avatar Mar 06 '17 21:03 SylvainDe

  • [ ] Make the API easier to use
  • [x] Update the readme

SylvainDe avatar Mar 06 '17 21:03 SylvainDe

@sametmax Any idea regarding the question above ?

SylvainDe avatar Mar 08 '17 17:03 SylvainDe